NYCPHP Meetup

NYPHP.org

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

CED Consult at CovenantEDesign.com
Wed Jul 20 10:30:58 EDT 2005


Try echoing out the string to get a better idea of what you're actually
sending.


----- Original Message ----- 
From: "Michael Southwell" <michael.southwell at nyphp.org>
To: <talk at lists.nyphp.org>
Sent: Wednesday, July 20, 2005 10:14 AM
Subject: [nycphp-talk] $_SERVER['PHP_SELF'} not working?


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

_______________________________________________
New York PHP Talk Mailing List
AMP Technology
Supporting Apache, MySQL and PHP
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org






More information about the talk mailing list