problem with http://<hostname>/<scriptname>.php/

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
johnhollister
Forum Newbie
Posts: 3
Joined: Thu Feb 12, 2004 4:42 pm

problem with http://<hostname>/<scriptname>.php/

Post by johnhollister »

I've installed eZpublish 3 on my Win2k machine with Apache 1.3 and PHP 4.3.4 CGI. EZpublish uses URLs like this: http://localhost/eZpublish/index.php/path/to/article. The arg, "/path/to/article", should be available in $_ENV['PATH_INFO"], but everytime I try to use such a URL, I get "No input file specified". I wrote a simple test script, but got the same results:
try.php:
<?
echo '<br/>path_info: ' . $_ENV['PATH_INFO'];
?>

My phpinfo.php script displays PATH_INFO as "/phpinfo.php", which is an error, I think.

Does anyone know what the problem is? I checked the php bugs site and found that the same problem had occurred with Apache 2 and IIS, but not with Apache 1.3

Thanks in advance.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

You need to turn AcceptPathInfo On in httpd.conf ...
see http://www.ez.no/community/forum/instal ... th_info__1 and http://www.apacheweek.com/issues/02-07-12 for more info
johnhollister
Forum Newbie
Posts: 3
Joined: Thu Feb 12, 2004 4:42 pm

Post by johnhollister »

The AcceptPathInfo directive was added in 2.0. I'm running 1.3. AcceptPathInfo doesn't work in 1.3.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Ah, apologies, i misread your post and thought you were on 1.3.

Strange as AcceptPathInfo is supposed to be 'built in/On' by default with 1.3 .. try doing a var_dump($_ENV) and possibly a var_dump($_SERVER) and see if PATH_INFO appears in any of them.
johnhollister
Forum Newbie
Posts: 3
Joined: Thu Feb 12, 2004 4:42 pm

Post by johnhollister »

Ok, I updated try.php to dump $_SERVER and $_ENV. I always get "No input file specified" whenever I invoke /try.php/whatever. When I invoke just /try.php, both _SERVER and _ENV get it wrong: "/try.php".
Post Reply