[SOLVED] Failed upgrade to beta
fruitloaf
Joined: 2005-01-28
Posts: 20 |
Posted: Tue, 2005-03-08 20:33 |
I'm trying to upgrade from Gallery 2 Alpha to the Beta. I used the inbuilt windows zip tool NOT winzip and overwrote all the files as specified in the readme. g2data dir is inside the gallery2 dir. On the upgrade to the core module I get the following error: Old core version 0.8.12 Fatal error: Call to a member function isError() on a non-object in C:\WebServ\wwwroot\htdocs\gallery2\modules\core\module.inc on line 513 I can get through the install routine by refreshing but end up with the error below when trying to view the gallery: Error (ERROR_BAD_PARAMETER, ERROR_UNKNOWN) : * in C:\WebServ\wwwroot\htdocs\gallery2\modules\core\classes\helpers\GalleryEntityHelper_simple.class at line 50 (GalleryUser::error) * in C:\WebServ\wwwroot\htdocs\gallery2\modules\core\classes\GalleryCoreApi.class at line 2042 (GalleryUser::loadEntitiesById) * in C:\WebServ\wwwroot\htdocs\gallery2\modules\core\classes\GalleryEntity.class at line 394 (GalleryUser::loadEntitiesById) * in C:\WebServ\wwwroot\htdocs\gallery2\modules\core\classes\helpers\GalleryEntityHelper_simple.class at line 98 (GalleryUser::onLoad) * in C:\WebServ\wwwroot\htdocs\gallery2\modules\core\classes\GalleryCoreApi.class at line 2042 (GalleryEntityHelper_simple::loadEntitiesById) * in C:\WebServ\wwwroot\htdocs\gallery2\init.php at line 167 (GalleryCoreApi::loadEntitiesById) * in C:\WebServ\wwwroot\htdocs\gallery2\main.php at line 132 * in C:\WebServ\wwwroot\htdocs\gallery2\main.php at line 46 * in C:\WebServ\wwwroot\htdocs\gallery2\main.php at line 39
---- |
|
Posts: 8601
i'm pretty sure the first problem is already fixed in the current nightly builds. however, the 2nd error indicates the install may be broken now.. try lib/tools/test/index.php, FlushCache test. if that doesn't help you may need to reinstall or manually repair your g2_PluginParameterMap table (looks like id.anonymousUser parameter for core module is missing?)
Posts: 20
I'll just put my Alpha 1 install back on and try the latest nightly, will let you know how I get on
Posts: 32509
alpha 1?? upgrade is only supported for alpha 4, not for alpha 1 to 3.
Alpha snapshot 2005-01-28-09-35-28 , is this your old version or the one you wanted to upgrade to? if it is the old one, then it's most probably alpha 4 and later, so an upgrade should be possible.
Posts: 20
Sorry that was a typo, its Alpha snapshot 2005-01-28-09-35-28 which is Alpha 4. Sorry for the confusion
Posts: 20
Installation went great with the nightly from the 8th however it failed when trying to view the gallery:
Posts: 32509
how clean was your install?
- g2data empty before install?
- db empty before install?
- no missing files, everything green in install step "system check"?
if not, make sure it is now and reinstall.
Posts: 20
I'm doing an upgrade so my db and and g2data dir are both full.
I tried to go to lib/tools/test/index.php to do a FlushCache test as suggested above and get the error stated below
Posts: 8601
so, you keep reposting that error but nothing has changed since the first reply to this topic:
Posts: 20
Sorry about bugging you with the same error but these have occured after 3 seperate restores of the backup I created. I checked the id.anonymousUser parameter is there and it refers correctly to the guest user. Beyond that my knowledge and PHP/Database abilities run out. Any suggestions?
Posts: 8601
what steps are you following? i suggest:
1) restore backup (data and code->alpha-4)
2) ensure everything is working with alpha-4
3) get current nightly snapshot
4) remove all code (keep config.php and g2data) and extract snapshot
5) access site to invoke upgrader
if you still get an error after following these steps you can do step 1,2 again and then PM me ssh/ftp access to your server if you'd like me to debug.
Posts: 20
No luck with following those steps, will PM you with FTP access if thats ok.
Posts: 8601
i'll take a look once you have restored a functioning alpha-4
Posts: 20
Sorry, I thought you'd want the beta left on. Alpha 4 will be finished copying back to the server in about 10 mins from when this is posted. Thanks again for the help
Posts: 8
Hello,
First of all I would like to thank you for the great job you are doing. I installed your Gallery2 Alpha3 release few months ago and was happy with that since.
Now I decided to upgrade it to Beta1 but I have a little problem with it.
During the upgrade all 5 steps go well, but when I try to browse to my gallery after the upgrade I get following database error:
-------------------------------------------------------
Error (ERROR_STORAGE_FAILURE) :
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 413 (gallerystatus::error)
* in modules/core/classes/GalleryStorage.class at line 113 (mysqldatabasestorage::loadentities)
* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 82 (gallerystorage::loadentities)
* in modules/core/classes/GalleryCoreApi.class at line 2042 (galleryentityhelper_simple::loadentitiesbyid)
* in modules/core/classes/GalleryView.class at line 328 (gallerycoreapi::loadentitiesbyid)
* in modules/core/ShowItem.inc at line 44 (showitemview::_getitem)
* in modules/core/classes/GalleryView.class at line 210 (showitemview::getthemename)
* in main.php at line 286 (showitemview::doloadtemplate)
* in main.php at line 46
* in main.php at line 39
-------------------------------------------------------
Sorry for my english and thanks for help in advance!
Posts: 8601
asdf, please start a new topic for your issue. Also follow the instructions on that error page to get the details of the db error.
Posts: 34
I have a similar problem with the .8 to .9 core upgrade.
I am making a clean, new linux install. The first part of the install goes ok but the upgrade section fails step 2.
g2data is under gallery2 directory.
Permission on the g2data directory is 777 but subdirectories (albums etc.) are all created 755 by the installer.
Any tips?
This is the stack trace:
Error (ERROR_STORAGE_FAILURE)
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1162 (gallerystatus::error)
* in modules/core/classes/GalleryStorage.class at line 241 (mysqldatabasestorage::execute)
* in modules/core/CoreModuleExtras.inc at line 330 (gallerystorage::execute)
* in modules/core/module.inc at line 512 (coremoduleextras::upgrade)
* in modules/core/classes/GalleryModule.class at line 137 (coremodule::upgrade)
* in upgrade/steps/UpgradeCoreModuleStep.class at line 68 (coremodule::installorupgrade)
* in upgrade/index.php at line 155 (upgradecoremodulestep::loadtemplatedata)
Posts: 8601
efedora, please start a new topic for your issue. Be sure to include your environment details. If you see the upgrader right after a new install then something has already gone wrong.
Posts: 8
mindless, thank you for your reply. I did as you sugessted and started folowing new topic:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=27347
Sorry I did not copy-paste more details about the db error, but there are simply NO instructions on the error page to follow.
Posts: 8601
fruitloaf, thanks. Here are the next steps:
1) you should upgrade to php 5.0.3.. you posted that's what you have, but phpinfo reports 5.0.2, which we don't want to support.
2) do you have a phpmyadmin i can access? PM that info if available.
Posts: 8601
ok, php 5.0.3 is in place and i'm able to access phpmyadmin (though it seems partially broken.. can't execute sql).
your g2_Entity table has zeroes for g_linkId in every row instead of NULL. but when it loads from the db it still comes up with NULL... for some reason after the upgrade it does return the zeroes when loading from the db which causes the errors you saw.
I updated your table to NULLs (had to execute sql via php due to phpmyadmin problem mentioned above).. install the new code and perform the upgrade now (either beta-1 or current nightly snapshot) and I think you should be ok.
If it does come up ok also try adding a new item and make sure you can then view that item (maybe the null/zero problem will still exist..)
Posts: 20
Fabulous, its working now just fine. Thanks for all your help, will be donating $20 to your cause, I'm sorry its not more but I'm a poor student
Posts: 20
I think I've found why this whole thing has ocurred in the first place. I've been using MyTool to backup the database in Windows, I noticed that after I backed up the database changes you made and then restored them with MyTool that the null values had changed to 0 again causing the original problem.
What PHP code did you execute to change the columns back? Something along the lines of UPDATE 'g2_entity' SET 'g_linkId' = 'NULL' should be in order but I'm not sure how to get that to execute since phpmyadmin won't work correctly as you noticed
Posts: 20
Sorted. I really need to stop talking to myself.
Now I just need to work out my problems with the zip module... :D
Thanks again for all the help mindless