After much trouble I have an .htaccess file, loaded and working. I have verified with my host (dreamhost) that mod_rewrite is infact installed. I have turned on mod_rewrite in the admin page and in the .htaccess file. What happens though is when the .htaccess file has the rewrite engine turned on, index.php and all the albums, images, and search pages seem to work, but my phpinfo.php page, setup.php and admin.php pages stop working. They report the error "No input file specified." This happens whether or not I turn mod_rewrite on in the admin page, which I do by turning mod_rewrite off in the .htaccess page so I can get to the admin page.
Mod_rewrite is making my URLs clean, its just that I cant access the admin section now.
I have the same problem on one of my servers. I asked the hosting company, but they say everything on the server is all right. If I put the .htaccess on the server I get te following error in the server log files: [Mon Jul 21 09:47:29 2008] [error] [client xxx.xxx.xxx.xx] Premature end of script headers: php-script
I'm having a very similar problem. My domain is hosted at Dreamhost, and I installed ZenPhoto 1.1.7 into the root of my site. I edited the .htaccess file that came with the release to set my RewriteBase to "/" and turned on the ZenPhoto mod_rewrite option. I can still view the gallery, but if I attempt to access any admin functions, I see only the words "No input file specified." Renaming the .htaccess file to .htaccess-disabled makes the admin stuff work again.
nsander: I found the same thing happened. If you disable it, go to your admin page and turn on mod_rewrite, then change the .htaccess name back, you will find those files not working again but the rest of the site gets pretty URLs.
sbillard:
I have tracked the problem down to the last line of the .htaccess file before the endif.
RewriteRule ^(.*)/?$ index.php?album=$1 [L,QSA]
If I comment out this line with a # the rest of the nice URLs stop working, clicking on an album thumbnail no longer works, but the setup.php, phpinfo.php, and admin.php files can be accessed again. If I take the comment out and let the line work, those files return the error but the album, image, and search pages load again.
I stumbled upon the same findings, depending on what Dreamhost web server you are on you may end up with this issue.
As you discovered jasronq, commenting out the last htaccess line fixes some pages but breaks others. I think that sbillard is onto something about the rules at the beginning but changing them has had no effect for me thus far.
Hi to all,
I get similar problems with netsons.org, an italian host.
As jasronq discovered, the core of the problem is the last line in .htaccess file.
If I don't comment it, I get a 500 code error when trying to access admin.php page.
It seems to break some policy rule on their server.
So far I was not able to solve the problem...
Minor update on that without solution yet: I can confirm that there is something wrong with our htaccess file for some server setups somehow. I moved to a new host and run into the same trouble. My host has no idea nor do I, so I hope I get that solved somehow.
I'm chiming in with the same issue. On Dreamhost. Worked fine for ages, now can't log in to admin.php - new behavior within the last week or two. Have no idea if Dreamhost changed the configuration of the server I'm on or not. I know I haven't changed anything. Odd. I'll be following this thread in case someone comes up with a solution!
Steve
I was with the help of krainbolt and sbillard (and a little of my provider) able to fix it. It is just a small change you might want to try. Locate this rewrite rule in the htaccess file:
RewriteRule ^.*$ - [R,L]
and remove the R so it looks like
RewriteRule ^.*$ - [L]
Please report if that fixes your issues, too.
acrylian - that fixed it for me on DreamHost and also cleared up an odd problem I just noticed where some images failed to show up. (All thumbnails were fine. The links to the un-resized images were fine. Some thumbnails however pointed to images that didn't show up)
Fantastic - back in top working order. THANKS!!
But I wonder what caused this, since it seemed recent.
Steve
I got a nice form letter from DreamHost support in response to my question. Since it wasn't directed at me specifically there isn't an exact reason why [R,L] in the RewriteRule stopped working in some cases, but one paragraph indicated some problems w/ htaccess:
So maybe now that they have changed things the original zenphoto htaccess file will work, but since I'm not having problems with the modified version I'm not going to change it back!
Thanks again acrylian. That was FAST work!
Steve