Gallery 2 Trying to Upgrade itself automatically -- issues with storage directory permissions
|
dhobeika
Joined: 2005-11-10
Posts: 18 |
Posted: Wed, 2009-05-27 05:38
|
|
Up until about an hour ago, my gallery was working fine. Then I visited my site, and somehow the gallery is trying to upgrade itself. When I go to http://www.chicagomma.net/gallery2 it forwards me directly to an upgrader message. I didn't do anything to try and upgrade, but figured it tried to do it automatically so I went along with the upgrader. However, it gives me errors on the system checks step (the 2nd step): Storage Directory Permissions I changed the versions.dat file's permissions to 777 and re-ran the upgrader but it's still not working. Does anyone know why it tried to upgrade me automatically and why it won't upgrade even when the versions.dat is set to 777? If I don't want to upgrade, how to I disable the upgrade so at least my gallery is browseable to users who are trying to view the site? I don't have the current version info since my gallery is down and I can't access the site admin. Thanks. |
|

Posts: 4338
Upgrader runs if versions.dat contains version info that differs from what's expected. What's in that file?
Posts: 18
There are only 2 lines in the file -- here is what is says:
1.3.0
2.3
What is it supposed to have?
Posts: 4338
That's the correct content, as far as I know.
To be more specific, the upgrader runs if the content of the first line of the file whose name is set by default (in init.inc) as follows:
$gallery->setConfig('data.gallery.version', $dataBase . 'versions.dat');- that's the versions.dat file in the g2data directory -
doesn't match the value set in modules/core/module.inc as
$this->setVersion('xxxxxx');or if that file can't doesn't exist or can't be read.
So I would try inserting some print_r statements around there and see what versions Gallery thinks is installed and should be installed.
Posts: 18
I'm sorry, you lost me on the last message. Can you tell me exactly what I need to do and what file I should edit? I have very limited knowledge on programming.
Posts: 4338
No, sorry - I can only suggest where to look, if you're already fully familiar with php and how to debug software.
Posts: 18
is there any way to cancel the upgrade process so my gallery will function with the current version of the software instead of giving me the upgrade dialog when i visit the site?
Posts: 22890
What does modules/core/module.inc say for this line:
$this->setVersion('xxxxxx');
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 18
It says:
$this->setVersion('1.3.0');
Posts: 16503
What are the permissions on your g2data directory?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 18
The g2data directory is currently 755. However, when I first was trying to troubleshoot the issue, I changed the g2data directory to 777 as well as recursively to all the files in g2data. After I did that, I re-ran the upgrader, and it still didn't work. So I changed it back to 755 since I don't like leaving the folder as 777 if it's not necessary. The versions.dat file is 777 though.
Posts: 16503
Unless Apache or PHP run as your user, which I doubt is the case at bluehost, g2data MUST be 777 or nothing will work, period. You had it set to that at one point for Gallery to create directories under g2data as well as versions.dat
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 4338
Bluehost being the same as Hostmonster (same company) I think the webserver does run under the user-id, in a chroot jail.
Posts: 18
I installed the gallery about 3 months ago through fantastico and never messed with anything until a couple days ago when the upgrader message appeared automatically. I then changed the g2data folder and all the files in it to 777 and the upgrader still didn't work.
In any case, I just went back in and changed the g2data folder and all the files in it to 777 again and went back to run the upgrader and I am still getting the same error message as I initially posted.
My main question now is could someone PLEASE tell me if it's possible to just cancel this automatic upgrade? My site was running just fine until it decided to try and upgrade itself automatically and I have no problems using the older version of the software. I just need it working before Saturday since I am photographing a big sporting event and I need to be able to post the photos to the website.
I went through this message board and found that people have asked this same question multiple times in the past couple years, but it never was addressed. So I know that this is a relevant issue that many people have also struggled with. If someone could address whether it's possible to just cancel the automatic upgrade and how to go about doing this, I would greatly appreciate it.
Thanks again to everyone for their help on this matter!!
Posts: 18
OK another piece of information -- at first I wasn't able to tell what version of gallery I was running since I can't access the admin panel because of the upgrade message.
But I looked back at some old messages I had posted on here about another issue and my version of gallery is 2.3
So why would my gallery be trying to upgrade itself if it was already version 2.3?
Posts: 18
My friend who knows more PHP than I do showed me how to debug and this is what we got. It looks like it's looking for the module.inc file in a /home6 directory when everything else is in the /home4.
file_exists(/home4/danielle/public_html/chicagomma/gallery2/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) Unimplemented: GalleryUrlGenerator getParameter session.lifetime for core plugin file_exists(/home4/danielle/public_html/chicagomma/gallery2/g2data/cache/module/core/0/0/0.inc) getParameter session.inactivityTimeout for core plugin (mysqlt): SET NAMES "utf8" (mysqlt): SELECT g2_Schema.g_info FROM g2_PluginMap, g2_Schema WHERE g2_PluginMap.g_pluginId = g2_Schema.g_pluginId AND g2_Schema.g_type = 'map' AND g2_PluginMap.g_active = 1 (mysqlt): SELECT g_userId, g_remoteIdentifier, g_creationTimestamp, g_modificationTimestamp, g_data FROM g2_SessionMap WHERE g_id='dd4722854975281e803b559450d79c03' controller , view Loading plugin core Class not defined, trying to include it. file_exists(/home6/danielle/public_html/chicagomma/gallery2/modules/core/module.inc) core plugin successfully instantiated file_exists(/home4/danielle/public_html/chicagomma/gallery2/g2data/versions.dat) Redirect to the upgrade wizard, core module version is out of date
I submitted a help ticket to my hosting company about this to see if my account is on the home4 or home6 server. Is there any way to change it so it looks for the module.inc in the /home4 instead of /home6?
Posts: 16503
Check the paths in config.php
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 1
i know this is an old post but google brought me to it... so i'd just like to add..
if your host modifies where you are hosted (eg moves you to a new server) then specific directory paths to where the site was hosted will need to be updated... it's advisable to go to the config as mentioned above, and delete the entire path except for the g2data/ folder.. that way this wont happen next time your host decides to randomly upgrade your site to a new server..