[SOLVED] "Not acceptable" error in certain albums when I try to edit the album, add items, open site admin... (multi-site instal

Ammo

Joined: 2006-03-23
Posts: 51
Posted: Wed, 2013-04-03 06:36

Hello,

I suddenly started having a problem with my Gallery 2 multi-site installation tonight while trying to upload new photos.
Strangely, only one of the sites seems to be affected (http://pix.alaporte.net/pub), and only some of the albums within the site are causing problems.
Basically, in these albums (such as http://pix.alaporte.net/pub/USA/Washington+DC/Art+and+Statues/), none of the admin links will work: I can't edit the album, add items, open site admin. When I try do so, I always get the same error:

"Not Acceptable
An appropriate representation of the requested resource /pub/main.php could not be found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

I did a quick re-install (I've customized a few files so data integrity isn't perfect), cleared all the caches, checked the chmod permissions on my key files... Everything seems to be OK. And most of the albums in the site seem to be working fine. I can edit them, add items...
I also tried clearing my browser's cache, and using a different browser (Chrome instead of Firefox).
I tried deleting one of the albums with problems and recreating it (http://pix.alaporte.net/pub/USA/Chicago+IL/) but the sub-albums that had problems still do (for example http://pix.alaporte.net/pub/USA/Chicago+IL/Ships+and+Lighthouses/ and http://pix.alaporte.net/pub/USA/Chicago+IL/Art+and+Statues).
Finally, I just tried adding this to my .htaccess file (to disable mod_security since that seems to be an issue in similar problems), but it doesn't help either.
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
SecRuleEngine Off
</IfModule>

What could be causing problems in some albums and not others? Could it be a database issue?

Thank you very much!

Amaury

System Information:
I've created a phpinfo.php file.
Gallery URL = http://pix.alaporte.net/pub/main.php
Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.3.21 cgi-fcgi
Webserver = Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database = mysql 5.1.68-cll, lock.system=flock
Toolkits = ArchiveUpload, Exif, NetPBM, SquareThumb, Gd
Acceleration = full/86400, full/86400
Operating system = Linux server127.advancednetworkhosting.com 2.6.18-348.1.1.el5 #1 SMP Tue Jan 22 16:19:19 EST 2013 x86_64
Default theme = slider
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Rows in GalleryAccessMap table = 23
Rows in GalleryAccessSubscriberMap table = 13058
Rows in GalleryUser table = 3
Rows in GalleryItem table = 13056
Rows in GalleryAlbumItem table = 995
Rows in GalleryCacheMap table = 77

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2013-04-03 11:55

The most common issue is w/ filesystem permissions in g2data. Try: chmod-R 0777 /path/to/g2data where -R is for recursive.

If you are receiving 500 errors check the server error_log for clues.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
Ammo

Joined: 2006-03-23
Posts: 51
Posted: Wed, 2013-04-03 12:14

Thanks suprsidr! I reset all permissions recursively to 777 in my gdata folder yesterday (using my FTP software, my host makes it difficult to use the command line), but it didn't make a difference.
I also specifically checked the permissions for the files in some of the sub-albums that are having trouble, and they were OK (777).

This morning, I noticed that if I paste the direct edit link into the browser without the return portion, it works:
http://pix.alaporte.net/pub/main.php?g2_view=core.ItemAdmin&g2_subView=core.ItemEdit&g2_itemId=8455

But this link (the one "Edit" leads to) won't work:
http://pix.alaporte.net/pub/main.php?g2_view=core.ItemAdmin&g2_subView=core.ItemEdit&g2_itemId=8455&g2_return=%2Fpub%2FUSA%2FWashington%2BDC%2FArt%2Band%2BStatues%2F

These are the more recent errors from the error_log (I'm not very technically savvy, so I'm not sure what's relevant):

[02-Apr-2013 00:23:09 America/Chicago] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/alaporte/public_html/gallery2/modules/core/UserRecoverPassword.inc:3266) in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPhpVm.class on line 142
[02-Apr-2013 22:37:40 America/Chicago] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/alaporte/public_html/gallery2/main.php:563) in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPhpVm.class on line 142
[02-Apr-2013 22:37:40 America/Chicago] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/alaporte/public_html/gallery2/main.php:563) in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPhpVm.class on line 142
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:55 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 22:51:57 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[02-Apr-2013 23:01:18 America/Chicago] PHP Warning: opendir(/home/) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: Permission denied in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 406
[02-Apr-2013 23:01:19 America/Chicago] PHP Warning: opendir(/home) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: Permission denied in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 406
[02-Apr-2013 23:01:20 America/Chicago] PHP Warning: opendir(/home) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: Permission denied in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 406
[02-Apr-2013 23:01:20 America/Chicago] PHP Warning: opendir(/home) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: Permission denied in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 406
[02-Apr-2013 23:01:21 America/Chicago] PHP Warning: opendir(/home) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: Permission denied in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 406
[03-Apr-2013 01:33:28 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582
[03-Apr-2013 01:33:30 America/Chicago] PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/alaporte/public_html/gallery2/modules/core/classes/GalleryPlatform.class on line 582

Thanks!

Amaury

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2013-04-03 12:25
Quote:
using my FTP software

This does not work for many as your FTP client won't report errors so some perms remain unchanged. And your logs clearly show filesystem perm errors.

Try my script to execute chmod.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
Ammo

Joined: 2006-03-23
Posts: 51
Posted: Wed, 2013-04-03 12:42

Unfortunately I got this message:

Sorry exec() is disabled

I will contact my host and see if they can do it, and keep you updated.

Thanks!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2013-04-03 12:47

exec is important to many PHP applications. Any that use ImageMagick or Ffmpeg would fail w/out exec.
I'd find a new host.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
Ammo

Joined: 2006-03-23
Posts: 51
Posted: Thu, 2013-04-04 01:11

My host got back to me: it turns out it was a mod security rule provoking the problem (this one: [file "/usr/local/apache/conf/modsec_rules/modsecurity_crs_41_sql_injection_attacks.conf"] [line "201"] [id "981248"]).
It works now, thanks for your help!!

-Ammo