php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17755 $PHP_SELF IE5.5 vs Opera6.03
Submitted: 2002-06-13 18:13 UTC Modified: 2002-09-11 11:19 UTC
From: ad at premiere-host dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.2.1 OS: Windows98
Private report: No CVE-ID: None
 [2002-06-13 18:13 UTC] ad at premiere-host dot com
My script contains the following line

$table .= "<td{$bg}><a href={$PHP_SELF}?ap=1&plid={$plid}>Edit</a></td>";

In IE5.5 it performs as expected.

In Opera6.03 $PHP_SELF is absent.  However, phpinfo() shows the correct value for $PHP_SELF.

PHP4.2.1 is the downloaded binary.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-13 18:59 UTC] sniper@php.net
Do you have register_globals=On ??

 [2002-06-14 09:26 UTC] ad at premiere-host dot com
My phpinfo() reports both for local and master values.
 [2002-06-14 09:27 UTC] ad at premiere-host dot com
OOPS - phpinfo() reports register globals ON for both master and local values
 [2002-06-14 15:14 UTC] sniper@php.net
Do you see the _SERVER["PHP_SELF"] in phpinfo() output?
(should be in the last part of it)

--Jani

 [2002-06-14 15:33 UTC] ad at premiere-host dot com
Yes, I see _SERVER["PHP_SELF"] and it is correct
 [2002-06-14 15:58 UTC] sniper@php.net
Could you try using that instead? e.g $_SERVER['PHP_SELF'] 
instead of $PHP_SELF as that is the preferred way to access
these. Also, are you sure the page is not cached by IE?
as if this is server side issue if any, not browser..
(same cache thing goes for Opera too)

Try flushing the caches on both browsers.

 [2002-06-18 03:57 UTC] ad at premiere-host dot com
I have tried flushing the caches and that has no effect.  I also tried $_SERVER[..] with no luck.

I also loaded the files to my remote (Apache) server where it performs correctly.

So, I deduce, that it is the localhost configuration of Opera and Win98 that produces this problem and it is not truly a PHP problem.

I have demonstrated that

1. Opera under Windows sees phpinfo() and within that $PHP_SELF correctly.  register_globals is ON.
2. In the code under consideration, URL's can be generated by the PHP and are correctly presented in the output HTML.  Only $PHP_SELF is ignored.  It is not ignored in this code under IE5.5.

That said, it seems that there are two possibilities both of which seem pretty bizarre.
1. Some aspect of my code under Opera inhibits the action of $PHP_SELF replacement.  But other globals and other variables are replaced ok.
2. Opera is somehow snipping out the link - but how would it know that the link is created by $PHP_SELF, if the same link is created in other ways it remains in place.

Opera say they are working on it, but next week.
 [2002-06-18 04:01 UTC] ad at premiere-host dot com
The remote server is Apache under RedHat.  And the files work correctly with IE5.5, Opera, Netscape on my Win98 machine.
 [2002-06-18 15:50 UTC] sniper@php.net
Under which webserver are you running PHP when it doesn't work?? 


 [2002-06-20 04:17 UTC] ad at premiere-host dot com
The PHP problem arises when running Apache 1.3.14 (Win32) as localhost but only when the browser on the is Opera.  They are both on the same computer - ie I have not tried on two machines on a local network.  But using Apache 1.3.20 on my remote server it performed OK under Opera on my machine.
 [2002-06-20 04:25 UTC] derick@php.net
Can you please try the latest apache too?

Derick
 [2002-09-11 11:19 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 01:01:28 2024 UTC