NYCPHP Meetup

NYPHP.org

[nycphp-talk] $_SERVER['PHP_SELF'} not working?

Michael Southwell michael.southwell at nyphp.org
Wed Jul 20 10:14:17 EDT 2005


I have run into an odd (odd to me, at least) problem where 
$_SERVER['PHP_SELF'] doesn't seem to be working.

The code is this:
===========
   // required entries missing
   if ( $reqEntries < 6 ) {
     header( 
"Location:$_SERVER[PHP_SELF]?action=internet&reqflag=1&join=$joinFlag");

// debug
exit( "reqentries is $reqEntries so exiting" );

   }
===========
This is working perfectly on my localhost, PHP 4.3.9, Apache 1.3.24.  It is 
not working on my test site,
PHP 4.3.11, Apache 1.3.33.  The debug exit shows that the if clause is 
true, and it's the header that's not
working.  phpinfo seems to show nothing weird or unexpected about the value 
of _SERVER['PHP_SELF']
on the test site.

Anybody have any ideas about what might be going on here?  Thanks in advance.


Michael Southwell, Vice President for Education
New York PHP
http://nyphp.org/twoday - In-depth PHP Training Courses




More information about the talk mailing list