Have you looked at what is in $HTTP_SERVER_VARS['PHP_SELF']? Does this array
element even exist? I am wondering if there is an Apache setting that
affects this, but I sure don't know.

Kirk

> -----Original Message-----
> From: John Steele [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 15, 2001 6:36 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] What version did $PHP_SELF still work?
> 
> 
> Hi Mike and Jim,
> 
>   From my earlier message [Re: PHP 4.0.6 $PHP_SELF empty?]:
> 
> >  No, I updated my php.ini manually (just to change the zend 
> optimizer and
> >add the DBG debugger.  These two lines from php.ini haven't 
> changed for sure:
> >
> >variables_order = "EGPCS";
> >register_globals = On;
> 
> >  According to phpinfo, $PHP_SELF is set, but simply empty!
> 
>   I'm fully aware of the scope issues, and $GLOBALS[PHP_SELF] 
> returns the same thing as $PHP_SELF (= ''), and these aren't 
> withing classes, functions or anything like that.  It's as 
> simple as this not working in somefile.php:
> 
> <form action="<?php echo $PHP_SELF ?>" method="POST">
>   <input ...>
> </form>
> 
>   I've looked over every single line in my php.ini, the only 
> thing changed (checked with diff) is adding the debugger info 
> for DBG.  That doesn't do it either, I replaced it with my 
> original from PHP4.0.2, no go either.
> 
> Help!
>   John
> 
> >$PHP_SELF still works fine, just make sure that 
> register_globals is on.
> >
> >Also, don't forget that you must define global $PHP_SELF if 
> you need to 
> >use it within a function, like so:
> >
> >function foo() {
> >    global $PHP_SELF;
> >}
> >
> >Mike
> >
> >John Steele wrote:
> >
> >>Hello,
> >>
> >>  I'm trying this again with a different header.  After 
> installing PHP4.0.6 
> >$PHP_SELF is set (empty), and this is breaking many scripts 
> of mine (and 
> >others).  I can't seem to find any mention of this in the 
> commented manual, 
> >or anywhere else for that matter.
> >>
> >>  I can try and install an earlier version, but I'm not 
> sure which one (I'd 
> >like to use DBG though).  I'd hate to have to go back to 4.0.2!
> >>
> >>Any advice welcome!
> >>  John

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to