mod_rewrite and AllowOverride FIleinfo
|
klinion
Joined: 2009-02-26
Posts: 176 |
Posted: Sat, 2010-12-04 18:41
|
|
Hi, Photos can be hidden but not accessed when the registered owner logs in. Just get boxes and titles but no photos. Happens in Firefox 3.6.12 and IE8. URL;- www.talkingwalk.com/gallerywalk Hope you can help, |
|

Posts: 26091
On a different host a user has done this:
modules/gallery/helpers/access.php
Around line 719 change
fwrite($fp, "Options +FollowSymLinks\n");to
fwrite($fp, "Options +SymLinksIfOwnerMatch\n");Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 176
Thanks Dave. Tried that. No difference
Ken
www.talkingwalk.com
Posts: 176
I forgot something. I created a theme but can't think that I have done anything to affect this,
Ken
www.talkingwalk.com
Posts: 176
The Oh No - mod_rewrite and AllowOverride Fileinfo box still appears. Album is hidden until owner/admin logs in then the album appears but no photos. Have briefly had the first page of 20 photos. Do you think it's my system or my host? Hope you can help,
Ken
Happens in Firefox 3.6.12 and IE8.
URL;- www.talkingwalk.com/gallerywalk
Host;- DowntownHost.com
Apache version 2.2.15
PHP version 5.2.9
MySQL version 5.1.51-log
Operating system linux
www.talkingwalk.com
Posts: 176
Hi,
Have tried a few things to try to solve the problem. In .htaccess I uncommented;-
# <IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /gallerywalk
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L]
RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L]
RewriteRule ^index.php/(.*) $1 [QSA,R,L]
# </IfModule>
# </IfModule>
I no longer get index.php in my URL addresses so the mod_rewrite is presumably enabled.
In relation to Allowoveride I have trawled the forum topics and tried those I was able to understand and find but all to no avail so any further help appreciated,
Thanks,
Ken
www.talkingwalk.com
Posts: 7988
I just wrote a FAQ, does it help?
http://codex.gallery2.org/Gallery3:FAQ#I_get_an_.22Oh_no.22_message_when_trying_to_set_permissions
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!
Posts: 176
Thanks bharat. I missed your reply somehow. Passed your link on to my web host who discovered quote;-
"there was an issue with the .htaccess file on your public_html which was preventing this to be working fine. I renamed it to htaccess (without the dot in front) which disabled it. If you found that this cause any trouble on your site, please rename it back, but you'll need to debug the .htaccess file to find out what's causing the issue."
This solved a problem of;- When an album owner restricted access to photos only they could view the photos until an action e.g. Edit title, was performed. Then all access to photos disappeared until Everyone was permitted, then not allowed, then access to photos came back. Now permissions work as they should.
The "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" message is still there though.
Am I likely to have problems? I must say this host is both quick to reply and so very helpful. A bit like this forum,
Many Thanks,
Ken
www.talkingwalk.com/gallerywalk
Posts: 26091
I just want to confirm it was a .htaccess file not generated by gallery in the public_html/gallerywalk directory but in the public_html directory?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 176
Was lying in bed at much the same time as your note wondering which .htaccess it was.
It's in the public_html directory and not the gallerywalk directory. Disabled by leaving off the dot and called htacess (one c). Another .htaccess file has appeared which is empty. Copy of disabled htacess below.
AllowOverride FileInfo Options
#suphp_configpath /home/talkingw
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php
# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
# There is no end quote below, for compatibility with Apache 1.3.
ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
<IfModule mod_php4.c>
</IfModule>
# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
</IfModule>
# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
# $Id: .htaccess,v 1.90.2.3 2008/12/10 20:04:08 goba Exp $
Wonder if "Options +FollowSymLinks" should be changed to
"Options +SymLinksIfOwnerMatch"
Thanks,
Ken
www.talkingwalk.com/gallerywalk
Posts: 176
Have tried both "Options +FollowSymLinks" and "Options +SymLinksIfOwnerMatch" in the renamed .htaccess in the public_html directory. Everything, (except the "Oh no" message is still there,) now works ok with, in fact, nothing changed from what was there originally. A mystery to me,
Ken
www.talkingwalk.com/gallerywalk
Posts: 7988
Can you try moving your G3 out from under Drupal to see if it works independently? If it does, then we know it's the Drupal .htaccess file causing the problems.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!
Posts: 176
Hi, as explained, I returned everything back to normal i.e. the original .htaccess and all permissions now work correctly. Only dilemma is the "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" message still appears even though albums/photos can be hidden and accessed by the owner.
Nevertheless, I created another public_html directory and put just the G3 directory in it while disabling the original public_html directory. Everything still worked and the message still appeared. Sorry, as I guess this info is not much use.
Don't recommend the above actions as, on returning the file to the original public_html and deleting the created one, I lost links to my site and just got a 404 error. My host fixed it for me.
Any thoughts on how to remove the message as I have regularly checked that everything still works,
Thanks,
Ken
www.talkingwalk.com/gallerywalk
Posts: 16503
You're not using Apache. Litespeed is not a supported webserver.
I recall when trying to get rid of that message using Lighttpd (not to be confused as a relative of Litespeed, it's not), I think I had to not only edit /modules/gallery/helpers/access.php (where gallery is expecting HTTP/1.1 in the header and Lighttpd wasn't doing that) but also create a custom rule in Lighttpd's config to actually do the rewriting for every file since Lighttpd doesn't process Apache's .htaccess files or rules.
____________________________________________
Like Gallery? Like the support? Donate now!
Posts: 176
Ouch! Thought I was using Apache. Wish I'd known that before changing hosts. Would using Litespeed have created the problem of permissions not working properly? I guess if everything works ok I'll live with the "Oh No" message for now,
Thanks,
Ken
www.talkingwalk.com/gallerywalk
Posts: 16503
If the site you're talking about is your talkingwalk.com site, yeah, it's telling me that it's running Litespeed. Yeah, that would have caused these issues. mod_rewrite is specific to Apache. Litespeed probably has it's own rewriting ability, but you'll need to work with your host on figuring that out.
____________________________________________
Like Gallery? Like the support? Donate now!
Posts: 176
Thanks. Guess I'll run into the same problems when I upgrade so will have to talk to my host and work something out,
Ken
www.talkingwalk.com/gallerywalk
Posts: 337
I have the exact same problem of the 'Oh no!' message being displayed while all permission functionalities work as expected. I am using the same host (DownTownHost.com) and as nivekiam stated, they indeed use Litespeed Web Server. However, .htaccess override files work perfectly for me. I have no issue with Gallery 3 except the 'Oh no!' message being displayed, and also some of server errors sometimes while uploading even with simultaneous_upload_limit set to 1, which I cannot really tell if it has something to do with Litespeed.
In fact, I do think that it's something to do with the detecting code, because I have it working perfectly with no core modifications.
Posts: 16503
Quite possibly. I'd probably start here:
http://gallery.menalto.com/node/101606#comment-372076
I know that thread is about lighttpd, but that's what I'd check first.
____________________________________________
Like Gallery? Like the support? Donate now!
Posts: 337
I've tried to change the protocol version to HTTP/1.0, but nothing changed belonging to the mentioned error message. The second recommendation is out here, since .htaccess seems to work with Litespeed.
Posts: 16503
Don't know what to say. Litespeed isn't supported and probably never will be unless the litespeed developers want to toss out some free licenses and support...
Even then we probably won't have the time to try to get everything working properly. They are the ones claiming litespeed is "apache interchangable", obviously it's not. Litespeed doesn't even make the list here: http://news.netcraft.com/archives/2011/04/06/april-2011-web-server-survey.html#more-4187 So it's usage is pretty dang low. Google's own web server has a higher usage rate than Litespeed....
I can only suggest ignoring that message or editing the view that displays that message to not show it...
____________________________________________
Like Gallery? Like the support? Donate now!
Posts: 337
As I see here, there is a free version:
http://www.litespeedtech.com/litespeed-web-server-downloads.html
Why do you say that? from my experience I have no problems at all, even with scripts that require Apache like Gallery 3. That error message is the only issue I had and it doesn't affect any functionality as I said previously. Overall I am so happy with this host. It's one of a little hosts that provide shared hosting plans with FFMpeg and other video tools that are needed for video scripts. Add to this that the guys there are nice, and their support is very good and amazingly fast.
Posts: 26091
Because of threads like this where the user is using a different web-server and has issues we can't see when using Apache.
I understand that you like your host and all it support, but we as a team don't have the time or resources to investigate, test and support something so low on the list. We have much larger issues to deal with that have a bigger impact on the project to get further down the road.
If somebody comes to the plate with the time and resources to investigate, test and support we welcome them, but I don't see anybody from the community putting their hand up in the air.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 176
Hi, regarding the "Oh No" message in the permissions. It is a Litespeed problem and I have asked my brilliant host to change to Apache which they have obligingly done. I now have no "Oh No" message.
I know this should be a different thread but the question about the upload not uploading all photos and returning an Error#2038 IO was broached by mamouneyya. My host looked at this and tells me it is a browser problem and to try another browser. I've been using Firefox so tried IE. It needed flash installing but flash doesn't work with Windows 7 64bit. Changed IE to 32bit and all photos uploaded. Have no idea how to get Firefox to operate flash properly but tomorrow is another day,
Ken
www.talkingwalk.com/gallerywalk