From: [EMAIL PROTECTED] Operating system: Solaris 2.7 sparc PHP version: 4.3.0 PHP Bug Type: Variables related Bug description: PHP_SELF gives wrong info
I was able to use this workaround: $_SERVER['SCRIPT_NAME'] = substr($_SERVER['PATH_TRANSLATED'], strlen($_SERVER['DOCUMENT_ROOT'])); if (substr($_SERVER['SCRIPT_NAME'], 0, 2) == '//') { $_SERVER['SCRIPT_NAME'] = substr($_SERVER['SCRIPT_NAME'], 1); } to fix an invalid PHP_SELF on Solaris 2.7 Sparc, PHP 4.3.0 . Simply doing phpinfo(); and then appending the value of PHP_SELF onto an 'ls ' statement yielded "no such file". The file did not exist: $ ls /~russ/tryseed/showSeed.phtml /~russ/tryseed/showSeed.phtml: No such file or directory The clue here is this: I was running out of a "pubic_html" subdirectory off of ~russ (see above). The URL typed into IE 5.2 (Mac OS X) was: "http://hostname/~russ/tryseed/showSeed.html" ** I have other pages on same web server, same PHP which are hosted out of the server's normal root directory and they don't have this problem. ** --Thank you to whoever came up with that workaround above. I just put similar text as a COMMENT on a CLOSED linux Bug #21261. This needs to be considered OPEN AFAIK. -- Edit bug report at http://bugs.php.net/?id=22116&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22116&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22116&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22116&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22116&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22116&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22116&r=support Expected behavior: http://bugs.php.net/fix.php?id=22116&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22116&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22116&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22116&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22116&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22116&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22116&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22116&r=gnused