Page 1 of 1

Stange Global Variable problem

Posted: Sun Aug 16, 2009 8:38 am
by dev_silent
I am recently facing a strange problem. I have setup apache 2.2 in centOS with php 5.1.6. The ip of the box is 198.100.100.17 and the hostname is myserver. The Server Name, I have specified in httpd.conf is "mysite".

If I try to access the site by the setvername ie. http://mysite, it will not display the $PHP_AUTH_USER & $PHP_AUTH_PW values, but if I use http://198.100.100.17, it shows both the values. I must have done something wrong in some confif file.

Can anyone help me?

Re: Stange Global Variable problem

Posted: Sun Aug 16, 2009 1:58 pm
by Benjamin
:arrow: Moved to PHP - Code

Re: Stange Global Variable problem

Posted: Wed Aug 19, 2009 11:41 pm
by dev_silent
I can access the page by both http://mysite/testpage.php and http://198.100.100.17/testpage.php but in first case $_SERVER['PHP_AUTH_USER'] & $_SERVER['PHP_AUTH_PW'] values are not available but second case it is available.

Strange?