oh no error message when changing permissions but it's working

ahotik

Joined: 2014-04-11
Posts: 2
Posted: Fri, 2014-04-11 11:32

Hi guys!
I'm new to gallery, I have just downloaded and installed it for a couple of days ago and I have managed to get it working. The only thing not working as it should right now is the Edit permissions dialog.
1. It takes between 5 and 10 sec to load while everything else on the site take up to 1 sec
2. I get the error: "Oh no! Your server needs a configuration change in order for you to hide photos! Ask your server administrator to enable mod_rewrite and set AllowOverride FileInfo Options to fix this." even though I have made the config changes mentioned.
So just to confirm when I choose an album as not visible and try to see it I get "Dang... Page not found!" which is expected. Also when I try to access a direct-linked photo I get a white page with the text "File not found.". I even tried wget on a link and I got "ERROR 404: File Not Found."
I can also confirm that mod_rewrite works since I now can get stuff to work without the index.php and the config (e.g. the file size limit) is read form the local .htaccess-file.
This tells me that the permissions and mod_rewrite are working great.

Now, my suspicion is that G3 takes so long to load the permissions dialog because it executes the mod_rewrite test which takes some time and the test fails some how thus the error message is shown.

I'm running on my own Ubuntu server. Here are the directory config lines in the apache2.conf:

<Directory /var/www/test/gallery3>
AllowOverride All
</Directory>

I have even tried with AllowOverride FileInfo Options

Running apache2ctl -M show that the rewrite_module (shared) is loaded.

This is what the http access log show when trying to take the permissions dialog:

127.0.0.1 - - [11/Apr/2014:13:22:55 +0200] "GET /test/gallery3/var/security_test/verify HTTP/1.0" 404 6768 "-" "Gallery3"
the Ip of where I si now :) - - [11/Apr/2014:13:22:55 +0200] "GET /test/gallery3/permissions/browse/1 HTTP/1.1" 200 1933 "http://my_server_address/test/gallery3/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36"

So base-line:
It seems that the permissions are working well but I still get the Oh no error message and the dialog takes some time to load.

So I would appreciate any kind of help with this. Maybe disabling the mod_rewrite test or make it pass? :)

Thanks for the awesome free software and support guys!

 
spags

Joined: 2010-03-26
Posts: 120
Posted: Fri, 2014-04-11 21:52

Have a browse through your gallery3/var/logs file and see if there is something indicated in there.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2014-04-12 02:09
Quote:
127.0.0.1

why a local address and not your hostname?
Some others have suggested:

Quote:
My internal host does not resolve the the external host address -- so adding an entry to /etc/hosts solved this problem.

Quote:
mod_rewrite is working, but your server can't make loopback http requests to itself

This is the bit of code that you can decipher to see where it fails:
https://github.com/gallery/gallery3/blob/ffecd3feffdb0d49e14c75d90e2765dcb3bddc02/modules/gallery/helpers/access.php#L721

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team