Click to See Complete Forum and Search --> : PHP_SELF path problem


Anon
03-27-2001, 03:56 PM
I have PHP3 running under Windows 95 with Apache as my server. If I make alink referencing PHP_SELF, the resulting URL takes the form of: http://localhost/php/php3.exe/form.php3

How can I prevent the /php/php3.exe from appearing in the path?

mikeypotter
03-27-2001, 04:58 PM
Try SCRIPT_NAME, it might give you what you are looking form.
Or, write a simple replace function that takes out the /php/php3.exe from the PHP_SELF variable.
Mike

Anon
03-27-2001, 05:07 PM
I guess what I was really trying to say was why does it insert that into the path to begin with. Is there something I can set in httpd.conf or php.ini to keep this from appearing? When I load things to my hosting environment, the path does not show /var/bin/php or anything like that...

Anon
03-27-2001, 11:08 PM
$PHP_SELF=basename($PHP_SELF);

can't see php.exe


=================================
http://www.tood.net
korea php kingdom

http://www.ttl.co.kr

eblade
03-27-2001, 11:31 PM
Here's a fun one. What makes $PHP_SELF blank?? I've had that come up in a couple of my logs.. (all my files write a log file saying who called them when)

Anon
03-28-2001, 03:03 AM
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.