It seems to happen to me on windows boxes that are running PHP.EXE as a CGI instead of loading the php4apache module. There is mention of this in the PHP manual, it says that the $PHP_SELF variable isnt set when PHP is running as a standalone program. I'm not sure if this really applies when its called by apache thoguh, but that seems to be true in my experience.