Hi.
I have given G3 a try and I seem to be having some trouble. Some background info, I use Dreamhost as the host and the PHP version is 5.2.9
The trouble is, when I change the permissions so that only registered users can see the photos, all photos become blank. If I try to navigate directly to a photo via a direct link it simply says "No input file specified.". It looks to me like the .htaccess file was generated correctly:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule (.*) /gallery3/index.php/file_proxy/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
Order Deny,Allow
Deny from All
</IfModule>
Just for kicks I tried to enable short urls in the root .htaccess and this caused even more problems. It is now failing to load the css. If I try to open the URL to the combined css directly it will say "Content Encoding Error" in FF3.5 and it will give me a blank css in chrome, BUT if I use wget to get the file I get the css correctly... Does this give any clues as to what is wrong? I can help debug this process, if I get some help and pointers.
regards
/p
Posts: 7934
There's probably a clue in your Apache error logs telling you why you're getting an error. Without that clue, it's hard to tell what's going wrong. Can you ask Dreamhost for help here?
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!
Posts: 18
I'm having the exact same problem. The full size image doesn't show up. The link is pointing to an exist image which I checked the existence through FTP. If I directly visit the URL, it gave me No input file specified error.
I had permission set for Everyone: no permission to view full size, Registered user: yes. The htaccess is the same as OP posted. I'm with Dreamhost too.
Thanks.
Posts: 7934
I need more info to diagnose this. Can anybody who is having this problem trawl through their Apache error logs to see if there's anything relevant in there?
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!
Posts: 18
Hi bharat, Thanks for your reply. I have contacted DH, and found the error.log file, but it doesn't seem to have any relevant information regarding to this issue... From the access.log file, I can see the http request to access the gallery3/var/albums/xxx/xxx.jpg , but at that time stamp, there is no error logged.
Posts: 4
Same thing here, nothing relevant in the apache logs. I'll await your answer from DH.
Edit: Seems like DH must have changed something because now all the problems I had in my initial post are gone and I have done nothing to fix it...
Posts: 6
I'm having the same problem too. Installed today, on dreamhost. Nothing comes up in apache error.log or Gallery3 logdir.
Relevant part of access log:
Posts: 6
I have been in contact with DH customer support, and they say they're using a plain apache and mod_rewrite install.
Is there any inbuilt debugging I could activate to try and narrow down the problem?
Posts: 22892
FAQ: How do I see debug information?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 6
Thanks
Posts: 6
I've been trying to do some debugging to find out where this problem occurs.
My basic understanding on how this works is as follows (Please correct me if wrong):
1. Someone tries to load the image using the direct uri (http://site.com/gallery3/var/albums/album/img.jpg)
2. mod_rewirte redirects this to http://site.com/gallery3/index.php/file_proxy/img.jpg
3. modules/gallery/controllers/file_proxy.php should be called trough some magic
4. after checking SERVER_REQUEST_URI for correct dir and file it checks permissions ...
5. ...sets mime type and invokes fpassthru so the browser gets the image.
I have enabled debugging output using local.php (from FAQ)
I have set $config["log_threshold"] = 4; in application/config/config.php
This by itself didn't add anything relevant to the log files, so i added some kohana::log('debug', ''); lines in file_proxy.php. They are before the class statement, after $request_uri is unescaped and before kohana::show_404() statements.
When I load index.php I don't see my own debug statements. Same if I access a image directly. However, if I try to access gallery3/index.php/file_proxy/photo2008-05-17T13_03_02-000039.jpg I get my own debug statements in the log. (It dies on the var/ check).
As it seemed the file was most likely redirected wrongly, I tried adding http://site.com to the mod_rewrite rule. This however will not produce the _SERVER["REDIRECT_SCRIPT_URI"] variable, and will thus not produce images. But it redirects correctly as file_proxy.php is called and i get my debug statements in the log file.
I have tried to test mod_rewrite using with a plain html file, that gets redirected to a php file that just runs phpinfo(). It seems like it behaves properly in my test case. I will see if I'm able to come up with some more advanced test cases later on.
If anyone have any ideas or hints they would be most welcome
~Slegge
EDIT: Added forgotten index.php in step two
Posts: 7934
The request should be getting rewritten to http://site.com/gallery3/index.php/file_proxy/img.jpg which does the magic to pass it on to the file_proxy controller. It sounds like that rewrite rule isn't firing properly. What's in the .htaccess file in var/albums/album? Let's see if we can get that right.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!
Posts: 6
Edit: typo in my last post, i did indeed mean gallery3/index.php/file_proxy/img.jpg
Seems correct to me. When i try to open a image i get "No input file specified." (And no debug info in the log file at all)(no html, just plain text as far as i can tell). If i change [L] to [R], or adds http://site.com in front of the url, file_proxy gets called. (but wont work ofcourse)
Posts: 7934
The "No input file specified" error seems to be related to mod_rewrite config issues with PHP as CGI. http://www.google.com/search?q=%22No+input+file+specified%22
I'm not sure what's going wrong for sure, though.. somebody will have to dig into your setup to figure it out. If you can provide me with ssh access, I'll be willing to poke around a bit.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!
Posts: 6
When changing my PHP options in dreamhost panel from "PHP5 Fastcgi" to "PHP5 cgi" everything seems to be in order.
It seems script_filename isn't set for "PHP5 Fastcgi".
Thanks for all the help
Posts: 7
I have the same problems on "dreamhost" hosting.
Is this the only solution for this problem? Change PHP options in dreamhost panel from "PHP5 Fastcgi" to "PHP5 cgi" ?
Posts: 132
Same problem here. I cannot find how to change the PHP5 Fastcgi setting. Tried the MultiViews options without any luck.
Posts: 132
Just upgraded to version 16 and the problem disappeared. Thanks!