Stange Global Variable problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dev_silent
Forum Newbie
Posts: 3
Joined: Tue May 05, 2009 7:01 am

Stange Global Variable problem

Post 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?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Stange Global Variable problem

Post by Benjamin »

:arrow: Moved to PHP - Code
dev_silent
Forum Newbie
Posts: 3
Joined: Tue May 05, 2009 7:01 am

Re: Stange Global Variable problem

Post 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?
Post Reply