Click to See Complete Forum and Search --> : Win and avoiding /php3/php.exe/


Anon
12-28-2000, 08:01 AM
I have a small problem. When debugging PHP pages on my local pc with Apache on Windows 98, I get a strange behaviour when I use $PHP_SELF and other functions or variables, which should return a path to the current directory.

In stead of the proper path, I always get a reference to the location of the PHP3.EXE module (in my case http://x.x.x.x/php3/php.exe/ in stead of http://x.x.x.x/htdocs/somepath/). This renders the path or filename useless and breaks links to pages and pictures.

It will work fine once it's uploaded and run on a Unix server.

Anybody know a way of avaoiding this on Windows - an Apache hack or global setting?

Martin

Anon
12-28-2000, 02:48 PM
I have the same behaviour. I suppose it's the way Apache handles CGI (it's not Windows-related). localhost/php3/php.exe/index.php3 is a valid URL. I don't know why Apache does this transformation, but I'm sure there's a reason.
Unless you use a module version of PHP (I don't know if it's available on Windows, especially for PHP3), I don't think you can change this.

Anon
12-29-2000, 02:08 PM
Yeah its a CGI mode thing I usually put $PHP_SELF = $PATH_INFO at the top of my scripts for use while on windows then I just comment it out before uploading to the unix server