issues moving from gallery 2 to gallery 3 beta

c0c0c0
c0c0c0's picture

Joined: 2005-04-03
Posts: 22
Posted: Sun, 2009-06-07 22:09

Hello,

Need help doing the import.

Here is the error message:

Thanks!

o here's the error:
@todo FORBIDDEN

File: modules/gallery/helpers/access.php, line: 176
And here's how we got there:

* modules/gallery/helpers/access.php [360]:

access_Core::forbidden( )

* modules/g2_import/controllers/admin_g2_import.php [42]:

access_Core::verify_csrf( )

*

Admin_g2_import_Controller->save( )

* modules/gallery/controllers/admin.php [50]:

call_user_func_array( Array
(
[0] => Admin_g2_import_Controller Object
(
[theme:private] =>
[uri] => URI Object
(
)

[input] => Input Object
(
[use_xss_clean:protected] => 1
[magic_quotes_gpc:protected] => 1
[ip_address] =>
)

)

[1] => save
)
)

*

Admin_Controller->__call( g2_import, Array
(
[0] => save
)
)

* system/core/Kohana.php [291]:

ReflectionMethod->invokeArgs( Admin_Controller Object
(
[theme:private] =>
[uri] => URI Object
(
)

[input] => Input Object
(
[use_xss_clean:protected] => 1
[magic_quotes_gpc:protected] => 1
[ip_address] =>
)

)
, Array
(
[0] => g2_import
[1] => Array
(
[0] => save
)

)
)

*

Kohana::instance( )

* system/core/Event.php [209]:

call_user_func_array( Array
(
[0] => Kohana
[1] => instance
)
, Array
(
[0] =>
)
)

* system/core/Bootstrap.php [55]:

Event::run( system.execute )

* index.php [72]:

require( system/core/Bootstrap.php )

My blog
My flog

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2009-06-09 04:07

Can you try again? That error implies that our CSRF token is missing from the admin/g2_import page, and if it were we'd have a lot more people complaining about it in the forums.
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest zip: http://github.com/gallery/gallery3/zipball/master
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
UloPe

Joined: 2009-06-11
Posts: 9
Posted: Thu, 2009-06-11 21:57

Hi.

same problem here.

Filesystem layout:

/var/www/sitename.com/gallery <- gallery2
/var/www/sitename.com/gallery3 <- gallery3

"/var/www/sitename.com" is the docroot of a virtual host.

The error is this:

So here's the error:
@todo FORBIDDEN
File: modules/gallery/helpers/access.php, line: 176

And here's how we got there:
modules/gallery/helpers/access.php [360]:
access_Core::forbidden(  )
modules/g2_import/controllers/admin_g2_import.php [42]:
access_Core::verify_csrf(  )
Admin_g2_import_Controller->save(  )
modules/gallery/controllers/admin.php [50]:
call_user_func_array( Array
(
    [0] => Admin_g2_import_Controller Object
        (
            [theme:private] => 
            [uri] => URI Object
                (
                )

            [input] => Input Object
                (
                    [use_xss_clean:protected] => 1
                    [magic_quotes_gpc:protected] => 
                    [ip_address] => 
                )

        )

    [1] => save
)
 )
Admin_Controller->__call( g2_import, Array
(
    [0] => save
)
 )
system/core/Kohana.php [291]:
ReflectionMethod->invokeArgs( Admin_Controller Object
(
    [theme:private] => 
    [uri] => URI Object
        (
        )

    [input] => Input Object
        (
            [use_xss_clean:protected] => 1
            [magic_quotes_gpc:protected] => 
            [ip_address] => 
        )

)
, Array
(
    [0] => g2_import
    [1] => Array
        (
            [0] => save
        )

)
 )
Kohana::instance(  )
system/core/Event.php [209]:
call_user_func( Array
(
    [0] => Kohana
    [1] => instance
)
 )
system/core/Bootstrap.php [55]:
Event::run( system.execute )
index.php [81]:
require( system/core/Bootstrap.php )
 
UloPe

Joined: 2009-06-11
Posts: 9
Posted: Thu, 2009-06-11 23:12

Actually I discovered that this is only a symptom, not the cause.

The actual cause are these lines in the gallery2/config.php (which is included from gallery3/var/modules/g2_import/<hashvalue>/main.php):

if (!isset($gallery) || !method_exists($gallery, 'setConfig')) {
    exit;
}

It seems the $gallery variable is not getting set.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-06-12 08:23

Most likely what's happening is that we're improperly editing the Bootstrap file that we're copying from your g2 into the gallery3/var/... dir. Can you zip up your gallery3/var/modules/g2_import dir and attach it here? That might give me a clue.

---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest zip: http://github.com/gallery/gallery3/zipball/master
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
UloPe

Joined: 2009-06-11
Posts: 9
Posted: Fri, 2009-06-12 14:07

Here is the file as requested. Hope it helps.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2009-06-13 01:35

@UloPe: thanks! I believe I've fixed this problem.. would you please try again with the latest code?

---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest zip: http://github.com/gallery/gallery3/zipball/master
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
UloPe

Joined: 2009-06-11
Posts: 9
Posted: Sat, 2009-06-13 01:40

I already did (If github.com/gallery/gallery3 is the latest code). Unfortunately it's still not working (white page).

I'll attach a new zip of the g2_import dir.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-06-14 00:17

Can you check to see if you're using eAccelerator, and if so.. disable it? I've added a warning message about eAccelerator in the g2_import page in the latest code.
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest code/upgrading: http://codex.gallery2.org/Gallery3:Upgrading
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
c0c0c0
c0c0c0's picture

Joined: 2005-04-03
Posts: 22
Posted: Sun, 2009-06-14 20:51

I just uploaded the latest beta, shut off eaccelerator and I am still getting the same message:

So here's the error:
@todo FORBIDDEN

File: modules/gallery/helpers/access.php, line: 176
And here's how we got there:

* modules/gallery/helpers/access.php [360]:

access_Core::forbidden( )

* modules/g2_import/controllers/admin_g2_import.php [42]:

access_Core::verify_csrf( )

*

Admin_g2_import_Controller->save( )

* modules/gallery/controllers/admin.php [50]:

call_user_func_array( Array
(
[0] => Admin_g2_import_Controller Object
(
[theme:private] =>
[uri] => URI Object
(
)

[input] => Input Object
(
[use_xss_clean:protected] => 1
[magic_quotes_gpc:protected] => 1
[ip_address] =>
)

)

[1] => save
)
)

*

Admin_Controller->__call( g2_import, Array
(
[0] => save
)
)

* system/core/Kohana.php [291]:

ReflectionMethod->invokeArgs( Admin_Controller Object
(
[theme:private] =>
[uri] => URI Object
(
)

[input] => Input Object
(
[use_xss_clean:protected] => 1
[magic_quotes_gpc:protected] => 1
[ip_address] =>
)

)
, Array
(
[0] => g2_import
[1] => Array
(
[0] => save
)

)
)

*

Kohana::instance( )

* system/core/Event.php [209]:

call_user_func( Array
(
[0] => Kohana
[1] => instance
)
)

* system/core/Bootstrap.php [55]:

Event::run( system.execute )

* index.php [82]:

require( system/core/Bootstrap.php )

This is what is in my log:
http://whogivesacrap.net/gallery3b//var/logs/2009-06-14.log.php
No direct script access.

My blog
My flog

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-06-14 22:47

I'm guessing this is because you're running Gallery 2 embedded in Wordpress, which we don't support properly yet. I've filed this ticket: http://sourceforge.net/apps/trac/gallery/ticket/404

---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest code/upgrading: http://codex.gallery2.org/Gallery3:Upgrading
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
c0c0c0
c0c0c0's picture

Joined: 2005-04-03
Posts: 22
Posted: Sun, 2009-06-14 22:51

If I disable the wordpress extension or comment out the .htaccess redirects this should work around the issue correct?

Thanks!

My blog
My flog

 
UloPe

Joined: 2009-06-11
Posts: 9
Posted: Sun, 2009-06-14 22:57
bharat wrote:
Can you check to see if you're using eAccelerator, and if so.. disable it? I've added a warning message about eAccelerator in the g2_import page in the latest code.

No eAccelerator or similar installed. This is a fresh (i.e. 5 days old install) Ubuntu 9.04 system with just apache 2.2, php 5.2.x and MySql 5.0

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2009-06-16 03:41

Sorry, I have no idea what's going wrong. Choices now are to either wait for the next release and hope that it gets fixed incidentally, try debugging it yourself directly, or share ssh access to your site with me so that I can debug the failure in place.
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest code/upgrading: http://codex.gallery2.org/Gallery3:Upgrading
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
c0c0c0
c0c0c0's picture

Joined: 2005-04-03
Posts: 22
Posted: Tue, 2009-06-16 20:48

I am working on getting you ssh access now. Once I have that going I will pm you with access. Thanks again bharat

My blog
My flog

 
UloPe

Joined: 2009-06-11
Posts: 9
Posted: Thu, 2009-06-18 13:41

Hi,

I've also created a SSH login for you and will send the details by pn.

Thanks.