2.0.1 to 2.2.3 Images, modules and admin missing, after upgrade

bugeye

Joined: 2005-07-06
Posts: 63
Posted: Sun, 2007-12-09 11:44

Hi, I've searched and can't find a solution. Thanks for your help in advance..

I was upgrading from 2.0.1. The Gallery wiki suggested dropping the new files on top of the old ones. I've had bad experience with doing that (loosing connection) so using the old config.php, I decided to do the upgrade from a fresh file system located at ....com/gallery2/ renaming the old gallery so it was not accessible.

The upgrade went smoothly until step 4 'Upgrade Plugins'. It stated that a lot of my 'basic' modules such as users, admin and comments were out of date. They weren't on the plugin page upgrade list, but I was hoping that they would be upgraded anyway.

This wasn't so, on the next page it appeared to have had only updated themes, icons, imagemagick, and none of the 'basic' modules. It also gave me an error about not being able to uprgade the NetPBM module which I will list below.

So it appears that none of the modules that are needed to succesfully use the gallery, are present. I can't see images, or access the admin area. Have a look:
http://sourdough.com.au/gallery2/main.php

View error:
http://sourdough.com.au/gallery_error.txt

INSTALLATION DETAILS (Was)
Gallery version = 2.0.1 core 1.0.0.1
PHP version = 4.4.4 cgi
Webserver = Apache/1.3.37 (Unix) mod_auth_passthrough/1.8
mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2
mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Database = mysql 4.1.22-standard

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2007-12-09 11:52
 
bugeye

Joined: 2005-07-06
Posts: 63
Posted: Sun, 2007-12-09 12:02

I think with this error, I should still be able to access the admin area.

With the FAQ, and couldn't complete step one as their is no piece of code like that in my config.php
Step 2 could provide hints:
http://www.sourdough.com.au/gallery2/main.php?g2_view=core.PluginCallback&g2_pluginId=rewrite&g2_pluginType=module&g2_command=deactivate

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2007-12-09 12:41

are you sure there's no maintenance.mode thing in your config.php?
please add it according to the faq entry.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
bugeye

Joined: 2005-07-06
Posts: 63
Posted: Sun, 2007-12-09 21:17

I updated my config.php to the latest format, and turned on maintenance mode.

"Images don't show up and the album / photo links don't work, what can I do?

Possible reasons:

Possible reasons:

* G2's URL rewrite module is active but doesn't work correctly. Fîx:

1. Put G2 into maintenance mode
2. Browse to http://www.example.com/gallery/main.php?g2_view=core.PluginCallback&g2_pluginId=rewrite&g2_pluginType=module&g2_command=deactivate
"

I see a blank page when I browse to this address:
http://www.sourdough.com.au/gallery2/main.php?g2_view=core.PluginCallback&g2_pluginId=rewrite&g2_pluginType=module&g2_command=deactivate

If I try the URL for earlier versions, I get:
http://www.sourdough.com.au/gallery2/main.php?g2_controller=core.AdminModules&g2_moduleId=rewrite&g2_action=deactivate

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2007-12-09 22:17

are you logged in as admin?

btw: we normal visitors can't browse to those URLs anway.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
bugeye

Joined: 2005-07-06
Posts: 63
Posted: Mon, 2007-12-10 00:44

Yes, I am logged in as admin. But that's all I can do. There is no administration page (404) BTW, thanks for your help valiant.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2007-12-10 00:52

please disavle maintenance mode again to see if the request to the plugincallback page as admin helped.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
bugeye

Joined: 2005-07-06
Posts: 63
Posted: Mon, 2007-12-10 05:22

Maintenance mode did make a difference. With it I just got a blank page. Without it I received this:

Quote:
Authentication Failure

Your change cannot be completed due to a loss of session data. Please try again. If it still doesn't work, try logging out and logging back in.

Back to the Gallery
Error Detail -
Error (ERROR_REQUEST_FORGED)

* in modules/core/classes/GalleryController.class at line 239 (gallerycoreapi::error)
* in main.php at line 402 (gallerycontroller::assertisgenuinerequest)
* in main.php at line 94
* in main.php at line 83

System Information
Gallery version 2.2.3
PHP version 4.4.4 cgi
Webserver Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Database mysql 4.1.22-standard
Toolkits ImageMagick, Gd
Operating system Linux gator47.hostgator.com 2.6.17.11-grsechg #9 SMP Fri Dec 8 00:02:22 CST 2006 i686
Browser Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071206 Firefox/2.0.0.11 Flock/1.0.3

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2007-12-10 12:38

in maintenance mode, logged in as admin user, when browsing to main.php?g2_view=core.PluginCallback&g2_pluginId=rewrite&g2_pluginType=module&g2_command=deactivate, it should show you the following as a result:
{"status":"success","states":{"module":{"rewrite":"inactive"}},"deleted":[]}

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
bugeye

Joined: 2005-07-06
Posts: 63
Posted: Mon, 2007-12-10 22:36

I don't think maintenance mode my solution though? I've got more than images missing. I don't have an admin panel, and seems I don't have any other 'basic modules', how do I get these back?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2007-12-10 22:43

> I've got more than images missing. I don't have an admin panel,

that's all because of URL rewrite, short URLs.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
bugeye

Joined: 2005-07-06
Posts: 63
Posted: Mon, 2007-12-10 23:28

Okay, I understand. So I guess we should diagnose why the URL I'm going to either gives a blank page, or an error.

With URL for versions 2.2
http://sourdough.com.au/gallery2/main.php?g2_view=core.PluginCallback&g2_pluginId=rewrite&g2_pluginType=module&g2_command=deactivate
Without maintenance mode
both logged in or out

Quote:
Authentication Failure

Your change cannot be completed due to a loss of session data. Please try again. If it still doesn't work, try logging out and logging back in.

Back to the Gallery
Error Detail -
Error (ERROR_REQUEST_FORGED)

* in modules/core/classes/GalleryController.class at line 239 (gallerycoreapi::error)
* in main.php at line 402 (gallerycontroller::assertisgenuinerequest)
* in main.php at line 94
* in main.php at line 83

System Information
Gallery version 2.2.3
PHP version 4.4.4 cgi
Webserver Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Database mysql 4.1.22-standard
Toolkits ImageMagick, Gd
Operating system Linux gator47.hostgator.com 2.6.17.11-grsechg #9 SMP Fri Dec 8 00:02:22 CST 2006 i686
Browser Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071206 Firefox/2.0.0.11 Flock/1.0.3

With maintenance mode
Blank page, both logged in or out

URL for before 2.2
With maintenance mode, logged in or out
http://sourdough.com.au/gallery2/main.php?g2_controller=core.AdminModules&g2_moduleId=rewrite&g2_action=deactivate

Quote:
Security Violation

The action you attempted is not permitted.

Back to the Gallery
Error Detail -
Error (ERROR_BAD_PARAMETER)

* in modules/core/classes/GalleryController.class at line 158 (gallerycoreapi::error)
* in main.php at line 189 (gallerycontroller::loadcontroller)
* in main.php at line 94
* in main.php at line 83

System Information...

Without maintenance mode
Same as above

I've used URL's for both versions as my installation could apply to both

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-12-11 00:33

that's all as expected. but the case with maintenance is not.

maybe enabling "immediate" debug mode helps to diagnose the problem.
FAQ: How to set/use Gallery in debug mode?

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
bugeye

Joined: 2005-07-06
Posts: 63
Posted: Tue, 2007-12-11 00:53

ok, but which URL should I be using? 2.2 or the earlier one?

 
bugeye

Joined: 2005-07-06
Posts: 63
Posted: Tue, 2007-12-11 00:55

For URL's 2.2 and below, respectively with debug and maintenance on:

Quote:
<b>Fatal error</b>: Cannot redeclare class coremodule in <b>/home/sourd/public_html/gallery2/modules/core_/module.inc</b> on line <b>27</b><br />

Quote:
Debug Output
file_exists(/home/sourd/gallery2/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) file_exists(/home/sourd/public_html/gallery2/modules/rewrite/classes/parsers/modrewrite/ModRewriteUrlGenerator.class) getParameter shortUrls for rewrite plugin file_exists(/home/sourd/gallery2/g2data/cache/module/rewrite/0/0/0.inc) getParameter session.lifetime for core plugin file_exists(/home/sourd/gallery2/g2data/cache/module/core/0/0/0.inc) getParameter session.inactivityTimeout for core plugin (mysql): SET NAMES "utf8" file_exists(/home/sourd/gallery2/g2data/cache/module/_all/0/0/GalleryStorage_describeMap.inc) (mysql): SELECT g_userId, g_remoteIdentifier, g_creationTimestamp, g_modificationTimestamp, g_data FROM g2_SessionMap WHERE g_id='a8248dcfd5c4489cb4b5f43ba84cee78' controller core.AdminModules, view Loading plugin core Class not defined, trying to include it. file_exists(/home/sourd/public_html/gallery2/modules/core/module.inc) core plugin successfully instantiated file_exists(/home/sourd/gallery2/g2data/versions.dat) file(/home/sourd/gallery2/g2data/versions.dat, ) [1197334469] can't guarantee 5 -- extending! file_exists(/home/sourd/gallery2/g2data/cache/entity/0/0/6.inc) Loading plugin core core plugin successfully instantiated Check the version of the core plugin file_exists(/home/sourd/gallery2/g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the core plugin is ok file_exists(/home/sourd/public_html/gallery2/modules/core/AdminModules.inc) Loading plugin rewrite Class not defined, trying to include it. file_exists(/home/sourd/public_html/gallery2/modules/rewrite/module.inc) rewrite plugin successfully instantiated Loading plugin core core plugin successfully instantiated getParameter default.theme for core plugin Loading plugin matrix Class not defined, trying to include it. file_exists(/home/sourd/public_html/gallery2/themes/matrix/theme.inc) matrix plugin successfully instantiated Check the version of the matrix plugin file_exists(/home/sourd/gallery2/g2data/cache/theme/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the matrix 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): SELECT g_userId FROM g2_UserGroupMap WHERE g_userId=6 AND g_groupId=3 LIMIT 1 realpath(/home/sourd/public_html/gallery2/modules/core/classes/../../../) realpath(/home/sourd/public_html/gallery2/) (mysql): SELECT g_mimeType, g_toolkitId, g_priority FROM g2_TkOperatnMimeTypeMap WHERE g_operationName='thumbnail' ORDER BY g_mimeType ASC, g_priority ASC file_exists(/home/sourd/gallery2/g2data/smarty/templates_c/%%2919267181) is_dir(/home/sourd/gallery2/g2data/smarty/templates_c/%%2919267181) file_exists(/home/sourd/gallery2/g2data/smarty/templates_c/%%2919267181) is_writeable(/home/sourd/gallery2/g2data/smarty/templates_c/%%2919267181) file_exists(/home/sourd/gallery2/g2data/smarty/templates_c/%%2919267181/v_12) getParameter modrewrite.galleryLocation for rewrite plugin file_exists(/home/sourd/public_html/gallery2/modules/core/classes/../../../lib/javascript/local/BlockToggle.js) getParameter modrewrite.galleryLocation for rewrite plugin realpath(/home/sourd/public_html/gallery2/modules/core/classes/../../..) Binding text domain: themes_matrix -> /home/sourd/public_html/gallery2/themes/matrix/locale file_exists(/home/sourd/public_html/gallery2/modules/core/../../themes/matrix/local/theme.css) file_exists(/home/sourd/public_html/gallery2/modules/core/classes/../../../themes/matrix/local/theme.css)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-12-11 01:03

> gallery2/modules/core_/module.inc

why is there a core_ folder in there? that shouldn't be there. we expect to have a core folder in modules/, not a core_ folder.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
bugeye

Joined: 2005-07-06
Posts: 63
Posted: Tue, 2007-12-11 01:07

I'm not sure. That's exactly how I downloaded it from the Gallery wiki, just yesterday. What should I do to fix it?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-12-11 01:14

i don't think so :)

maybe your unzip program or so did that. our archives don't contain a core_ folder.

obviously you have both, a core and a core_ folder:
http://sourdough.com.au/gallery2/modules/core_/module.inc
http://sourdough.com.au/gallery2/modules/core/module.inc

please delete the core_ folder.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
bugeye

Joined: 2005-07-06
Posts: 63
Posted: Tue, 2007-12-11 01:46

Yay! Everything appears to be working. Thanks Valiant. Is it safe for me to turn on 'URL Rewrite'? Why does this problem happen in the first place?
(I've turned off debug and maintenance mode.)