Bug #15690 Updated: $PHP_SELF empty

From: Date: Fri, 26 Apr 2002 09:45:08 +0000
Subject: Bug #15690 Updated: $PHP_SELF empty
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-6079@lists.php.net to get a copy of this message
ID: 15690 Updated by: bugphp@rawurl.nl Reported By: beat-x@gmx.net Status: Open Bug Type: Scripting Engine problem Operating System: Windows 2000 PHP Version: 4.1.1 New Comment: For me it's a 2 year problem. It means that I'm used to it, but I had always a persistent internet connection. I use Apache 1.3.24 with PHP 4.2.0 and still the same problem Windows 98 and windows 2000 Charlie Previous Comments: ------------------------------------------------------------------------ [2002-03-18 06:42:33] marcel.lorette@freeworld.be I have the same problem. I use PHP 4.1.2 with Xitami 2.4d9 on windows ME. If I use apache 1.3.23 instead of Xitami, everything is all right... ------------------------------------------------------------------------ [2002-02-24 08:53:02] cseiler@cyberspace.org I've got a workaround for this problem, that seems to work perfectly: 1. Create a file somewhere, e.g. c:\self_fix.php 2. Insert to following content: <?php $PHP_SELF = ereg_replace("/$","",$SERVER_URL).$SCRIPT_NAME; ?> (This will create a 'new' variable $PHP_SELF by pasting $SERVER_URL and $SCRIPT_NAME together) 3. Close and save the file. Now open your php.ini (probabely located in your C:\Windows-directoy). 4. Add the following lines to the [php] section: auto_prepend_file = c:\self_fix.php register_globals = on (These will prepend the file created above to every PHP-file called by the interpreter. The second line makes $PHP_SELF globally available.) ------------------------------------------------------------------------ [2002-02-23 12:07:19] beat-x@gmx.net Using PHP 4.1.1. (I downloaded the *.msi package) and Xitami 2.4d9 on Windows 2000. $PHP_SELF seems not to be set. phpinfo() gives me an empty field, in scripts it is not set at all. When I use PHP3 everything is okay. Who can I fix this? Does it work with the ZIP-file (but it's 4 MB, phew, I'm a modem user)? Anybody got a solution? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15690&edit=1

« previous php.bugs (#6079) next »