I’ve been tracking this down and found a variety of solutions.
Problem 1: $_SERVER[‘PHP_SELF’] is used in WordPress 1.2.0 but is not defined in all PHP installations.
Problem 2: The link in the resulting error message is incorrect when WordPress is installed in a subdirectory instead of in the document root.
You can ignore Problem 2 as it is just confusing things.
Problem 1 fixes:
First, you can confirm that this is your problem by displaying your PHP configuration using a test page named something like test.php that looks like
<?php
phpinfo()
?>
That should display a lot of information about your PHP configuration, including a section titled PHP Variables that has an entry for _SERVER[“PHP_SELF”]. If that entry says ‘no value’ this is your problem.
If you are running the Xitami web server, put this in your php.ini file (it may be the default in newer versions of PHP, and this information was added to the Xitami install doc recently)
cgi.fix_pathinfo=1
If you are running PHP as a cgi that is invoked through an Apache redirect, perhaps using suPHP or suexec, then the above php.ini directive may fix the problem. Try it. I don’t have access to a system set up that way and my Google results were less certain about that than it was about the Xitami case.
If you are running PHP as a cgi indirectly through a shell script cgi that invokes the cgi version of PHP on a command line, you must ensure that all the environment variables that are listed in the CGI 1.1 spec are defined and exported before the call to PHP. Failing to define PATH_INFO will cause this particular error.
Last ditch fix:
If you are unable to get $_SERVER[‘PHP_SELF’] to be defined in your PHP environment, you can work around the problem by changing every instance of $_SERVER[‘PHP_SELF’] in the WordPress php files to say $_SERVER[‘SCRIPT_NAME’]
There are only a handful of those and that will fix the problem.