danami
Silver Pleskian
Username:
TITLE
Running plesk bin apache --listen-on-localhost true breaks PHP $_SERVER["SERVER_ADDR"];
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Product version: Plesk Obsidian 18.0.56.2
OS version: AlmaLinux 9.2 x86_64
Build date: 2023/10/26 16:00
Revision: efc2bfd78637f11b087afdee6d383b777ff03a12
PROBLEM DESCRIPTION
After enabling the Apache listen on localhost with:
The PHP $_SERVER["SERVER_ADDR"] reports as "127.0.0.1" instead of the real server address. This breaks any PHP scripts that used the $_SERVER["SERVER_ADDR"]. (Like WHMCS license checks).
STEPS TO REPRODUCE
Run:
Run this PHP code:
ACTUAL RESULT
Only 127.0.0.01 is displayed: E.g
["SERVER_ADDR"]=> string(9) "127.0.0.1"
EXPECTED RESULT
It should report the real server address: E.g.
["SERVER_ADDR"]=> string(9) "192.168.1.123"
ANY ADDITIONAL INFORMATION
(DID NOT ANSWER QUESTION)
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug
TITLE
Running plesk bin apache --listen-on-localhost true breaks PHP $_SERVER["SERVER_ADDR"];
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Product version: Plesk Obsidian 18.0.56.2
OS version: AlmaLinux 9.2 x86_64
Build date: 2023/10/26 16:00
Revision: efc2bfd78637f11b087afdee6d383b777ff03a12
PROBLEM DESCRIPTION
After enabling the Apache listen on localhost with:
Code:
plesk bin apache --listen-on-localhost true
The PHP $_SERVER["SERVER_ADDR"] reports as "127.0.0.1" instead of the real server address. This breaks any PHP scripts that used the $_SERVER["SERVER_ADDR"]. (Like WHMCS license checks).
STEPS TO REPRODUCE
Run:
Code:
plesk bin apache --listen-on-localhost true
Run this PHP code:
Code:
<?php var_dump($_SERVER["SERVER_ADDR"]); ?>
ACTUAL RESULT
Only 127.0.0.01 is displayed: E.g
["SERVER_ADDR"]=> string(9) "127.0.0.1"
EXPECTED RESULT
It should report the real server address: E.g.
["SERVER_ADDR"]=> string(9) "192.168.1.123"
ANY ADDITIONAL INFORMATION
(DID NOT ANSWER QUESTION)
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug