My Gallery2 and WPG2 have been working smoothly for a year and half on my website hosted with Servage.net ...
...all until tonight. Servage.net performed a server upgrade and for a while, I couldn't access the database associated to my Gallery. Once it came back, I had to disable the function printing out the latest albums on the WP-powered site frontend, as otherwise the site wasn't loading anything at all.
Then I logged in and tried to validate G2 input through WPG2. However, wp-admin/admin.php?page=wpg2/wpg2functions.inc isn't loading at all.
If I try to access G2 without using WPG2, IE gives me an error 500 and Firefox gives me this:
Error
Error (ERROR_PERMISSION_DENIED) :
* in main.php at line 346 (GalleryCoreApi::error)
* in main.php at line 94
* in main.php at line 83
I tried to go to gallery/lib/support/index.php and delete all the caches apart from the last one, but the results page won't load. Was this relevant to my problem, in any way?
What should I do to get my WPG2 work again? I miss it.
If this matters, my PHP version is 5.2.X-servage6.
Posts: 45
Error
Error (ERROR_PERMISSION_DENIED)
* in main.php at line 346 (GalleryCoreApi::error)
* in main.php at line 94
* in main.php at line 83
Debug Output
file_exists(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc)
file_exists(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/modules/rewrite/classes/parsers/modrewrite/ModRewriteUrlGenerator.class)
getParameter shortUrls for rewrite plugin
file_exists(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/cache/module/rewrite/0/0/0.inc)
getParameter language.useBrowserPref for core plugin
file_exists(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/cache/module/core/0/0/0.inc)
getParameter default.language for core plugin
controller , view
Loading plugin core
Class not defined, trying to include it.
file_exists(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/modules/core/module.inc)
core plugin successfully instantiated
file_exists(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/versions.dat)
file(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/versions.dat, )
getParameter id.anonymousUser for core plugin
[1225959782] can't guarantee 5 -- extending!
file_exists(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/cache/entity/0/0/5.inc)
Loading plugin core
core plugin successfully instantiated
Check the version of the core plugin
file_exists(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc)
The version of the core plugin is ok
file_exists(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/modules/core/ShowItem.inc)
Loading plugin albumselect
Class not defined, trying to include it.
file_exists(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/modules/albumselect/module.inc)
albumselect plugin successfully instantiated
Loading plugin comment
Class not defined, trying to include it.
file_exists(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/modules/comment/module.inc)
comment plugin successfully instantiated
Loading plugin imageblock
Class not defined, trying to include it.
file_exists(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/modules/imageblock/module.inc)
imageblock plugin successfully instantiated
Loading plugin rating
Class not defined, trying to include it.
file_exists(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/modules/rating/module.inc)
rating plugin successfully instantiated
Loading plugin rewrite
Class not defined, trying to include it.
file_exists(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/modules/rewrite/module.inc)
rewrite plugin successfully instantiated
Loading plugin core
core plugin successfully instantiated
getParameter default.theme for core plugin
Loading plugin wordpressembedded
Class not defined, trying to include it.
file_exists(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/themes/wordpressembedded/theme.inc)
wordpressembedded plugin successfully instantiated
Check the version of the wordpressembedded plugin
file_exists(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/cache/theme/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc)
The version of the wordpressembedded plugin is ok
Loading plugin core
core plugin successfully instantiated
Check the version of the core plugin
The version of the core plugin is ok
getParameter id.adminGroup for core plugin
(mysql): SET NAMES "utf8"
file_exists(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/cache/module/_all/0/0/GalleryStorage_describeMap.inc)
(mysql): SELECT g_userId FROM g2_UserGroupMap WHERE g_userId=5 AND
g_groupId=3 LIMIT 1
realpath(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/modules/core/classes/../../../)
realpath(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/)
file_exists(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/smarty/templates_c/%%3591683896)
is_dir(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/smarty/templates_c/%%3591683896)
file_exists(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/smarty/templates_c/%%3591683896)
is_writeable(/home34b/sub001/sc27969-FHUU/www/gallery/g2data/smarty/templates_c/%%3591683896)
realpath(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/modules/core/classes/../../../)
realpath(/mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/)
Posts: 16504
Does the standalone gallery work? Have you double checked permissions on g2data? Have you double checked that your host didn't change anything with your database?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 45
No, it does not work. If I put it in debug mode, it displays all of the above, if I put it in normal mode, IE gives me an error 500 and Firefox gives me the error bolded in the first post of this thread.
Yes, I did, nothing changed.
I just tried to export/backup the database and it stopped at certain point, so I think it might be an error at their end after all. However, they won't admit it, they keep on telling me to move the database to a different cluster or to view the gallery from a different browser...which is really lame, as it doesn't work for anyone, not just the admin (me).
Posts: 45
And now I got something new in WPG2:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes) in /mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/modules/core/classes/GalleryPlatform.class on line 1122
Posts: 45
If I increase php memory limit, I get this:
Error
Error (ERROR_PLATFORM_FAILURE)
* in modules/core/classes/GalleryTemplate.class at line 251 (GalleryCoreApi::error)
* in modules/core/classes/GalleryTemplate.class at line 180 (GalleryTemplate::_initCompiledTemplateDir)
* in main.php at line 479 (GalleryTemplate::fetch)
* in main.php at line 94
* in modules/core/classes/GalleryEmbed.class at line 179
* in /mounted-storage/home34b/sub001/sc27969-FHUU/www/wp-content/plugins/wpg2/wpg2template.inc at line 76 (GalleryEmbed::handleRequest)
* in ??? at line 0
* in /mounted-storage/home34b/sub001/sc27969-FHUU/www/wp-includes/plugin.php at line 311
* in /mounted-storage/home34b/sub001/sc27969-FHUU/www/wp-includes/template-loader.php at line 7
* in /mounted-storage/home34b/sub001/sc27969-FHUU/www/wp-blog-header.php at line 16
* in /mounted-storage/home34b/sub001/sc27969-FHUU/www/index.php at line 17
...and the most of other plugins stop functioning and return errors related to G2's sidebar grid module.
Posts: 16504
FAQ: PHP memory_limit - Why do I get the error Allowed memory size of Xxx bytes exhausted?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live hereFAQ: PHP memory_limit - Why do I get the error Allowed memory size of Xxx bytes exhausted?
Posts: 3
Do you have a resent backup of the database?
Try to install gallery again. (or for test in a other dir.)
Something is wrong, but it not the server.
It's working fine (the speed could be better.)
Make a ticket with servage mayby you get the right answer.
Mayby our database is somehowe corrupted.
Posts: 45
Re: PHP Memory Limit.
It won't change anything except disabling other WP plugins; because the database has four tables "in use" and "already optimised" and they're still not resetting the database server.
Re: Backup.
If I tried to back it up, it would break when I reach one of the four mentioned tables.
And...it works? How come? O_O I can't see it from the embeeded interface on the site and I get the infamous error (this time with CSS) when I try to see the standalone gallery.
Servage have not done anything yet. Instead, ALL the files on my server suddenly appeared to be CHMODed to 777 and I don't know how to mass CHMOD them back. Is there a way to do it? I FTP with Total Commander, if there's a program that could mass CHMOD, it would be good.
This is like hell. And all they did was upgrading the database.
Posts: 45
Security Violation
The action you attempted is not permitted.
Back to the Gallery
Error Detail -
Error (ERROR_PERMISSION_DENIED)
in main.php at line 346 (GalleryCoreApi::error)
in main.php at line 94
in main.php at line 83
...I just tried to open it. How come it's not permitted?
Posts: 45
Also, this opens in a separate window:
Smarty Debug Console
included templates & config files (load time in seconds)
themes/wordpressembedded/templates/error.tpl (0.57216) (total)
modules/core/templates/ErrorPage.tpl (0.07951)
assigned template variables
{$ErrorPage} Array (12)
isAdmin => true
stackTrace => "Error (ERROR_PERMISSION_DENIED)<ul><..."
code => Array (1)
securityViolation => true
phpversion => "5.2.X-servage6"
php_uname => "Linux node1 2.100.2-1-amd64-grsec-nod..."
php_sapi_name => "apache2handler"
webserver => "Apache"
browser => "Mozilla/4.0 (compatible; MSIE 7.0; Wi..."
dbType => "mysql"
dbVersion => "5.0.51a"
toolkits => "NetPBM, Gd"
version => "2.2.1"
{$SCRIPT_NAME} "/gallery/main.php"
{$_debug_config_keys} Array (2)
0 => "files"
1 => "vars"
{$_debug_config_vals} Array (2)
0 => Array (0)
1 => Array (0)
{$_debug_keys} Array (5)
0 => "ErrorPage"
1 => "SCRIPT_NAME"
2 => "head"
3 => "l10Domain"
4 => "theme"
{$_debug_tpls} Array (2)
0 => Array (3)
type => "template"
filename => "themes/wordpressembedded/templates/er..."
depth => 0
1 => Array (4)
type => "template"
filename => "modules/core/templates/ErrorPage.tpl"
depth => 1
exec_time => 0.0795068740845
{$_debug_vals} Array (5)
0 => Array (12)
isAdmin => true
stackTrace => "Error (ERROR_PERMISSION_DENIED)<ul><..."
code => Array (1)
securityViolation => true
phpversion => "5.2.X-servage6"
php_uname => "Linux node1 2.100.2-1-amd64-grsec-nod..."
php_sapi_name => "apache2handler"
webserver => "Apache"
browser => "Mozilla/4.0 (compatible; MSIE 7.0; Wi..."
dbType => "mysql"
dbVersion => "5.0.51a"
toolkits => "NetPBM, Gd"
version => "2.2.1"
1 => "/gallery/main.php"
2 => Array (3)
tpl => Array (0)
style => Array (0)
javascript => Array (1)
0 => "lib/javascript/BlockToggle.js"
3 => "themes_wordpressembedded"
4 => Array (1)
errorTemplate => "modules/core/templates/ErrorPage.tpl"
{$debug_output} "<!DOCTYPE html PUBLIC "-//W3C//DTD XH..."
{$head} Array (3)
tpl => Array (0)
style => Array (0)
javascript => Array (1)
0 => "lib/javascript/BlockToggle.js"
{$l10Domain} "themes_wordpressembedded"
{$theme} Array (1)
errorTemplate => "modules/core/templates/ErrorPage.tpl"
assigned config file variables (outer template scope)
{#files#} Array (0)
{#vars#} Array (0)
Posts: 45
These are the four "stuck" tables.
johnf_gallery.g2_ImageBlockCacheMap optimize status Table is already up to date
johnf_gallery.g2_ImageBlockDisabledMap optimize status Table is already up to date
johnf_gallery.g2_SequenceId optimize status Table is already up to date
johnf_gallery.g2_SequenceLock optimize status Table is already up to date
Posts: 45
This is what I get if I increase the memory limit:
Notice: Undefined index: wpg2_sidebargridblocksimageframe in /mounted-storage/home34b/sub001/sc27969-FHUU/www/wp-content/plugins/wpg2/wpg2functions.inc on line 556
Notice: Undefined variable: cssappendoutput in /mounted-storage/home34b/sub001/sc27969-FHUU/www/wp-content/plugins/wpg2/wpg2functions.inc on line 559
Posts: 45
(deleted)
Posts: 16504
If all your files have "suddenly appeared to be CHMODed to 777" and gallery is in debug mode without you editing config.php. I'd start changing my passwords and talking to my host. If you are not making those changes someone is.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 45
So, it all comes down to this:
I don't know how, but it seems that my file permissions were messed up on server upgrade and I have somehow managed to set the correct file permissions from the control panel-like utility and change all the folders and files of g2data to be owned by me, as previously they were owned by the server; and I got the gallery to work.
However, there still are issues, mostly related to error-reporting (even though everything works):
1) Unless I manually increase php memory limit, I can't get G2 to work at all. This was not an issue before the server upgrade.
2) When I enable WPG2 without the Imageblock G2 module, I cannot render the embeeded gallery page through WordPress, as I obviously cannot validate the plugin.
3) However, when Imageblock is active, I get errors all around the site (look at http://www.invisible-movement.net to see what I'm talking about) even though all the things supposedly influenced by those errors are working normally.
4) I constantly get Smarty popups.
The only editable thing in all this was the sidebar grid block module which I have in my site's footer.php file. I noticed that it claimed that recentAlbum was undefined and that it was assuming it's 'recentAlbum', with quotes, so I tried to work around that.
It looked like this:
<?php print g2_sidebargridblock(recentAlbum, 4, 80); ?>
I changed it to this:
<?php print g2_sidebargridblock('recentAlbum', 4, 80); ?>
And now it reports one error less. Does this mean that I would have to manually go through all scripts on my site and add quotes? That makes no sense. I assume there still is something going on on my host's behalf; but I know what actually to tell them. To disable error reporting except for fatal errors (I tried to do so myself and it did not function)? Something else?
Thanks for listening to my issues and helping me out, by the way.
Posts: 45
It turned out they were doing it as they also installed another gallery themselves in a totally random directory of a subdomain. And yes, it was quite a hassle to get it all back to normal.
I got the gallery into debug mode, but I don't remember that I changed any settings for smarty, which is constantly opening popups.
Posts: 16504
This happens at hosts who don't either plan or know what they are doing
Another undocumented change that your host probably didn't related to their customers. Heck they probably didn't even realize they made the change.
Don't know about the WP integration errors as I've never done it, however I think it's related to your Smarty popup issue.
Open up config.php in your gallery directory, and take it out of debug mode. This explains how to put Gallery into debug mode, do the opposite to take it out:
FAQ: How to set/use Gallery in debug mode?
Oh, I see it doesn't say what it was, change that line to
$gallery->setDebug(false);
Exactly like that, there is no typo there.Once you get it taken out of debug mode, then let's see if you are still getting errors.
I would take a look at your site, but it's just plain not coming up for me. Server down? Slow server? Slow connection? I don't know.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 45
The site opens in Firefox but not in IE at the moment. I assume the server is currently running slow. Normally, it has about 2000 uniques and 12000-ish page views per day, so this is probably (surprisingly, yet another) server issue.
I just double-checked if I did what you said and yes, that's what I did. Even with debug mode set to false, the smarty pop up keeps on showing up and I'm getting this on all gallery frontend pages apart from the single image page:
Notice: Undefined index: child in /mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/g2data/smarty/templates_c/%%3591683896/%%E7^E75^E7536FAA%%album.tpl.php on line 32
Notice: Undefined index: child in /mounted-storage/home34b/sub001/sc27969-FHUU/www/gallery/g2data/smarty/templates_c/%%3591683896/%%E7^E75^E7536FAA%%album.tpl.php on line 32
And I'm getting a bunch of such errors on the site frontend as well, but some of them aren't related to G2. However, when G2/WordPress integration is disabled, there aren't any errors.
Posts: 45
I still have this weird feeling that the system wants all PHP variables to start and end with a ', which is fairly odd.
Posts: 16504
Clear your template and database cache, along with your browser cache.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 45
Did the first two already, twice...doing the third one for both Firefox and IE.
EDIT: No change. No change when I remove smarty files manually either (I cleaned contents of the g2data/smarty/templates_c/ subfolder manually).
- The smarty popup is still there and debugging even though everything actually works.
- The error right above "album actions" dropdown is still there, mentioning a failure in smarty cache of album.tpl.php.
- The errors on the whole site are still there when gallery integration is enabled.
Posts: 45
What would be the correct permission for smarty's cache files?
Posts: 16504
That all depends on how your server is configured. If PHP is running as the webserver, then most likely 644 for files and 755 for directories, but that all depends on who owns the files and who the server and/or PHP runs as. For example, on my server PHP runs as myself so my files are set to 600 and directories set to 700. If you're not sure then set them to 777 and you or the webserver (along with anyone else on the server, again depending on how the server is setup) can delete them.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 16504
If you're setting it to 'false' instead of false, it's not going to work. It must be false
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 45
I set it to false. And it still acts weird.
For whatever reason, everything quote-less seems to be reporting an error and the support hasn't gotten back to me for 12 hours. Again.
Posts: 16504
Can you post a link to phpinfo under your actual Gallery directory? This link explains how:
FAQ: What information is required when I ask for help in the forums?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 45
http://www.invisible-movement.net/gallery/info.php
As you can see, the errors are ON.
They have just told me this:
So, I do hope that the admin will just fix that little thing. And if Smarty debug console is not gone after that, I guess I'll eat this keyboard.
Posts: 45
They have managed to fix it. Finally!
Thank you for all the help, I mentioned you in my site update to thank you. And I think I learned some new things through this.
Posts: 16504
Great! What was the problem?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 45
Well, two things: messed-up permissions after server upgrade (which caused ERROR_PERMISSION_DENIED) and badly set stuff in php.ini. And there are still some errors as all the email I receive through forms has ">" in the form field instead of a name, but that's a different story and unrelated to this. Either way, this has been a complicated week. But once again, thank you so much for having patience with me.