|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-02-23 12:07 UTC] beat-x at gmx dot 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? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 16:00:02 2025 UTC |
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.)i have php 4.0.6 i am running windows ME i have xitami 2.4d9 i see the same thing - php_self is empty. register_globals is on, but note that HTTP_SERVER_VARS("PHP_SELF") is also empty!