Php $_SERVER['PATH_INFO'] supported?


#1

I’m just setting up my site, which works fine on my old host, but links to some pages are giving me a “No input file specified.” message. Other pages work just fine.

The site is here at the moment: http://thenewzealandsite.dreamhosters.com/

Some of the links work, others do not.

I use search-engine friendly URL, so the parameters are / separated like folder paths (eg: http://thenewzealandsite.dreamhosters.com/article/)

I’m using mod_rewrite to redirect like this:
RewriteRule ^article/([a-zA-Z]) /article.php?file=$1.php [L,NC]
RewriteRule ^postcards/([a-zA-Z0-9/]
) /postcards.php/$1 [L,NC]

The 1st redirect above works fine. The 2nd gives me the error. In every case where I have used the format /mypage.php/$1 I get the error. I have just tried changing one of them to /mypage.php?$1 and I do get redirected - even though I get errors for other reasons. There must be some config difference between DreamHost and my other host. Is there some way around that so I can still use /mypage.php/$1? I don’t want to have to re-write things on my site.

Just in case this is the problem: I’ve got some php code that parses the data out of the URL, my index page then uses that to determine which content page to include. I’m wondering if there is something in the php code that’s used?

<?php // getPath returns any path info as an array function getPathInfo() { if(isset($_SERVER['PATH_INFO'])) { $params = array_filter(explode('/', $_SERVER['PATH_INFO'])); return $params; } else { return $params=array(); } } ?>

#2

I went to your site and all the links worked except "Postcards:"
Text paste>
Send a Postcard
Send a postcard to a friend by email. Any photo can be sent as a postcard from the photos section of the website, the most popular postcards are displayed in the galleries here.
Step 1: Select the thumbnail of the photo you want to send as a postcard.
I cannot connect to the database because:

Incidentally most pages do not render correctly on my Mac Safari 2.0.1 browser. The top logo image covers text.
Works OK on Firefox 1.0.7 and Opera 8.5 though.
Hope this helps.