Cannot import g2.3.2 into g3.1.3 [error: Non-static method GalleryDataCache::containsKey() should not be called statically, assuming $this from incompatible contex]

199 views
Skip to first unread message

Gerhard

unread,
Aug 1, 2020, 7:49:06 PM8/1/20
to Gallery 3 Users
Hello,

thank you for updating and supporting gallery3 for php 5.6 up to php 7.x!

I got an old gallery2 installation, that I successfully upgraded to version 2.3.2, but I got some strange issues with php5.6 from sury.org for debian 10.4 buster.

~# apt policy php5.6-fpm
php5.6-fpm:
  Installiert:           5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
  Installationskandidat: 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
  Versionstabelle:
 *** 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4 500
        500 https://packages.sury.org/php buster/main amd64 Packages
        100 /var/lib/dpkg/status


I get an internal server error 500 only for phpinfo(); but on php 7.x phpinfo(); is okay. Also bizarre, that phpinfo(); in the beginning worked on php 5.6. Maybe I installed a module, that issues the segfault of the fastcgi process? I can't figure it out.
But! Gallery2 itself works smooth on the :81 php5.6 port (php5.6-fpm listens on :81)!
https://debianforum.de/forum/viewtopic.php?f=8&t=178175&sid=bb9eb1160b382a78e155680958c135c2

My gallery installations look like this (no symlinks used so far):

~docs# pwd
/home/gerhard/www/docs

~docs# tree -d -L 1  g2data gallery{2..3}

g2data
├── albums
├── backups
├── cache
├── download
├── locale
├── locks
├── plugins_data
├── smarty
└── tmp

gallery2
├── css
├── gallery2
├── html
├── images
├── install
├── js
├── lib
├── locale
├── modules
├── scripts
├── themes
└── upgrade

gallery3
├── application
├── bin
├── installer
├── lib
├── modules
├── system
├── themes
├── var
└── vendor

30 directories


Now the gallery3 issue: I'm not able to import the gallery2 installation. On the gallery2_import module I get first the Message
--
Gallery 2 import

Import your Gallery 2 users, photos, movies, comments and tags into your new Gallery 3 installation.

Configure Gallery 2 Import
  • Filesystem path to your Gallery 2 embed.php file
    /home/gerhard/www/docs/gallery2/embed.php
    Your Gallery 2 install isn't working properly. Please verify it!
--

Dang... Something went wrong! We tried really hard, but it's broken.
Hey wait, you're an admin! We can tell you stuff.

There's an error message below and you can find more details in gallery3/var/logs (look for the file with the most recent date on it). Stuck? Stop by the Gallery 3 Forums and ask for help. You can also look at our list of open tickets to see if the problem you're seeing has been reported. If you post a request, here's some useful information to include:

remove Platform information
  • Host name: pv10.gaussling.selfhost.eu
  • Operating system: Linux 4.19.0-9-amd64
  • Apache: Unknown
  • PHP: 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4
  • MySQL: 10.4.13-MariaDB-1:10.4.13+maria~buster
  • Server load: 0.32 0.35 0.59
  • Graphics toolkit: gd
remove Gallery stats
  • Version: 3.1.3 (Revival)
  • Albums: 0
  • Photos: 0
Kohana_Exception [ kohana/core.errors.403 ]: @todo FORBIDDEN

Further reading (zipped html galery3 error page)
g3 dang ... something went wrong.7z :
https://drive.google.com/file/d/1uytNXDLnOdAB33K4TH-CdSwoQtIygMXU
/view?usp=sharing

I'm cannot tell, if I don't get how to use the import plugin, or if it got something to do with the crazy phpinfo(); issue, but main.php and the whole gallery2 site works very well.

I access them from different domains, but from the same server, though!

gallery2: g2.ggserve.eu:81
gallery3: g3.ggserve.eu:81

:81 -> php 5.6
:80 -> php 7.3

lighttpd: lighttpd/1.4.53 (ssl)

I (thought? I) followed this guide: http://codex.galleryproject.org/Gallery3:Modules:g2_import

Thank you in advance!

Gerhard

Gerhard

unread,
Aug 1, 2020, 7:53:16 PM8/1/20
to Gallery 3 Users
Ooops. I forgot this error message from the 2020-08-01.log 2.php

(The installation is only reachable in my LAN. Debian buster works in a virtualbox on Windows10)

http://php.net/manual/function.get-cfg-var.php for help.
2020-08-01 09:07:06 +00:00 --- error: date.timezone setting not detected in /etc/php/5.6/fpm/php.ini falling back to UTC.  Consult http://php.net/manual/function.get-cfg-var.php for help.
2020-08-01 09:07:10 +00:00 --- error: Non-static method GalleryDataCache::containsKey() should not be called statically, assuming $this from incompatible context
#0 /home/gerhard/www/docs/g3.ggserve.de/gallery3/var/modules/g2_import/7a165a242b17408fb732f755915b9d79/Gallery.class(923): gallery_error_Core::error_handler(8192, 'Non-static meth...', '/home/gerhard/w...', 923, Array)
#1 /home/gerhard/www/docs/g3.ggserve.de/gallery3/var/modules/g2_import/7a165a242b17408fb732f755915b9d79/main.php(39): G2_Gallery->isEmbedded()
#2 /home/gerhard/www/docs/g3.ggserve.de/gallery3/var/modules/g2_import/7a165a242b17408fb732f755915b9d79/embed.php(34): require('/home/gerhard/w...')
#3 /home/gerhard/www/docs/g3.ggserve.de/gallery3/modules/g2_import/helpers/g2_import.php(166): require('/home/gerhard/w...')
#4 /home/gerhard/www/docs/g3.ggserve.de/gallery3/modules/g2_import/helpers/g2_import.php(55): g2_import_Core::init_embed('/home/gerhard/w...')
#5 /home/gerhard/www/docs/g3.ggserve.de/gallery3/modules/g2_import/controllers/admin_g2_import.php(86): g2_import_Core::is_valid_embed_path('/home/gerhard/w...')
#6 [internal function]: Admin_g2_import_Controller->save()
#7 /home/gerhard/www/docs/g3.ggserve.de/gallery3/modules/gallery/controllers/admin.php(62): call_user_func_array(Array, Array)
#8 [internal function]: Admin_Controller->__call('g2_import', Array)
#9 /home/gerhard/www/docs/g3.ggserve.de/gallery3/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#10 [internal function]: Kohana_Core::instance(NULL)
#11 /home/gerhard/www/docs/g3.ggserve.de/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#12 /home/gerhard/www/docs/g3.ggserve.de/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#13 /home/gerhard/www/docs/g3.ggserve.de/gallery3/index.php(123): require('/home/gerhard/w...')
#14 {main}

Gerhard

unread,
Aug 1, 2020, 8:14:27 PM8/1/20
to Gallery 3 Users
Again: ./gallery3/var/logs/2020-07-28.log.php

2020-07-28 23:53:20 +00:00 --- error: File not found: login
2020-07-28 23:53:58 +00:00 --- error: date.timezone setting not detected in /etc/php/7.3/fpm/php.ini falling back to UTC.  Consult http://php.net/manual/function.get-cfg-var.php for help.
2020-07-28 23:54:07 +00:00 --- error: Kohana_Exception [ 403 ]: @todo FORBIDDEN
/home/gerhard/www/docs/gallery3/modules/gallery/helpers/access.php [ 202 ]
#0 /home/gerhard/www/docs/gallery3/modules/gallery/helpers/access.php(425): access_Core::forbidden()
#1 /home/gerhard/www/docs/gallery3/modules/g2_import/controllers/admin_g2_import.php(76): access_Core::verify_csrf()
#2 /home/gerhard/www/docs/gallery3/modules/gallery/controllers/admin.php(62): Admin_g2_import_Controller->save()
#3 [internal function]: Admin_Controller->__call('Admin_g2_import...', Array)
#4 /home/gerhard/www/docs/gallery3/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#5 /home/gerhard/www/docs/gallery3/system/core/Event.php(208): Kohana_Core::instance(NULL)
#6 /home/gerhard/www/docs/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#7 /home/gerhard/www/docs/gallery3/index.php(123): require('/home/gerhard/w...')
#8 {main}

2020-07-28 23:54:07 +00:00 --- error: Missing messages entry kohana/core.errors.403 for message kohana/core
2020-07-28 23:59:19 +00:00 --- error: date.timezone setting not detected in /etc/php/7.3/fpm/php.ini falling back to UTC.  Consult http://php.net/manual/function.get-cfg-var.php for help.
2020-07-28 23:59:33 +00:00 --- error: date.timezone setting not detected in /etc/php/7.3/fpm/php.ini falling back to UTC.  Consult http://php.net/manual/function.get-cfg-var.php for help.
2020-07-28 23:59:38 +00:00 --- error: date.timezone setting not detected in /etc/php/7.3/fpm/php.ini falling back to UTC.  Consult http://php.net/manual/function.get-cfg-var.php for help.



./gallery3/var/logs/2020-08-01.log.php

2020-08-01 23:35:01 +00:00 --- error: date.timezone setting not detected in /etc/php/5.6/fpm/php.ini falling back to UTC.  Consult http://php.net/manual/function.get-cfg-var.php for help.
2020-08-01 23:36:01 +00:00 --- error: date.timezone setting not detected in /etc/php/5.6/fpm/php.ini falling back to UTC.  Consult http://php.net/manual/function.get-cfg-var.php for help.
2020-08-01 23:36:33 +00:00 --- error: date.timezone setting not detected in /etc/php/5.6/fpm/php.ini falling back to UTC.  Consult http://php.net/manual/function.get-cfg-var.php for help.
2020-08-01 23:36:33 +00:00 --- error: Non-static method GalleryDataCache::containsKey() should not be called statically, assuming $this from incompatible context
#0 /home/gerhard/www/docs/gallery3/var/modules/g2_import/7a165a242b17408fb732f755915b9d79/Gallery.class(923): gallery_error_Core::error_handler(8192, 'Non-static meth...', '/home/gerhard/w...', 923, Array)
#1 /home/gerhard/www/docs/gallery3/var/modules/g2_import/7a165a242b17408fb732f755915b9d79/main.php(39): G2_Gallery->isEmbedded()
#2 /home/gerhard/www/docs/gallery3/var/modules/g2_import/7a165a242b17408fb732f755915b9d79/embed.php(34): require('/home/gerhard/w...')
#3 /home/gerhard/www/docs/gallery3/modules/g2_import/helpers/g2_import.php(166): require('/home/gerhard/w...')
#4 /home/gerhard/www/docs/gallery3/modules/g2_import/helpers/g2_import.php(55): g2_import_Core::init_embed('/home/gerhard/w...')
#5 /home/gerhard/www/docs/gallery3/modules/g2_import/controllers/admin_g2_import.php(86): g2_import_Core::is_valid_embed_path('/home/gerhard/w...')

#6 [internal function]: Admin_g2_import_Controller->save()
#7 /home/gerhard/www/docs/gallery3/modules/gallery/controllers/admin.php(62): call_user_func_array(Array, Array)

#8 [internal function]: Admin_Controller->__call('g2_import', Array)
#9 /home/gerhard/www/docs/gallery3/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)

#10 [internal function]: Kohana_Core::instance(NULL)
#11 /home/gerhard/www/docs/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#12 /home/gerhard/www/docs/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#13 /home/gerhard/www/docs/gallery3/index.php(123): require('/home/gerhard/w...')
#14 {main}

2020-08-01 23:36:36 +00:00 --- error: Kohana_Exception [ 403 ]: @todo FORBIDDEN
/home/gerhard/www/docs/gallery3/modules/gallery/helpers/access.php [ 202 ]

#0 /home/gerhard/www/docs/gallery3/modules/gallery/helpers/access.php(425): access_Core::forbidden()
#1 /home/gerhard/www/docs/gallery3/modules/g2_import/controllers/admin_g2_import.php(76): access_Core::verify_csrf()
#2 [internal function]: Admin_g2_import_Controller->save()
#3 /home/gerhard/www/docs/gallery3/modules/gallery/controllers/admin.php(62): call_user_func_array(Array, Array)
#4 [internal function]: Admin_Controller->__call('g2_import', Array)
#5 /home/gerhard/www/docs/gallery3/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#6 [internal function]: Kohana_Core::instance(NULL)
#7 /home/gerhard/www/docs/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#8 /home/gerhard/www/docs/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#9 /home/gerhard/www/docs/gallery3/index.php(123): require('/home/gerhard/w...')
#10 {main}

2020-08-01 23:36:36 +00:00 --- error: Missing messages entry kohana/core.errors.403 for message kohana/core



Thank you in advance!

Gerhard


Gerhard

unread,
Aug 2, 2020, 5:38:18 AM8/2/20
to Gallery 3 Users
Maybe the culprit for error: Kohana_Exception [ 403 ]: @todo FORBIDDEN /home/gerhard/www/docs/gallery3/modules/gallery/helpers/access.php [ 202 ]
is, that I am accessing gallery2 and gallery3 from two different

>I access them from different domains, but from the same server, though!
>
>gallery2: g2.ggserve.eu:81
docroot: /home/gerhard/www/docs/gallery2 

>gallery3: g3.ggserve.eu:81
docroot: /home/gerhard/www/docs/gallery3
>
>:81 -> php 5.6
>:80 -> php 7.3
>
>lighttpd: lighttpd/1.4.53 (ssl)


Maybe it should look like this?

gallery2: g3.ggserve.eu:81/gallery2
docroot: /home/gerhard/www/docs/gallery3/gallery2

gallery3: g3.ggserve.eu:81
docroot: /home/gerhard/www/docs/gallery3


> I (thought? I) followed this guide: http://codex.galleryproject.org/Gallery3:Modules:g2_import

TIA Gerhard

Brad Dutton

unread,
Aug 3, 2020, 12:19:57 PM8/3/20
to Gallery 3 Users
Just to confirm, both the v2 and v3 installations work before any imports? You can upload an image into v3?

It was recently reported that updating to one of the PHP7 compatible Gallery2 versions (e.g. https://github.com/pbobbenb/gallery2) resulted in a successful update to v3. Maybe give that a shot to see if the import works any better.

Gerhard

unread,
Aug 4, 2020, 1:23:02 PM8/4/20
to Gallery 3 Users
currently I messed up my gallery2 installation. Maybe because  moved it to ./gallery3/gallery2. I'm trying to solve it by restoring from backup. I'm not able to login as admin anymore. Also resetting the password by the suport page and login.txt doesn't work.

https://github.com/pbobbenb/gallery2  didn't work for me, because adodb isn't supported(?)

The phpinfo(); and gd info from the support site seems to be solved by the workaround to remove php-http (PECL-http). I hope neither gallery2 nor gallery3 are depening on pecl http.

phpinfo(); results in 500 Internal Server Error with lighttpd and php5.6-fpm 5.6.40-29
https://github.com/oerdnj/deb.sury.org/issues/1442 

Gerhard

unread,
Aug 4, 2020, 4:54:04 PM8/4/20
to Gallery 3 Users
I managed to get gallery2 back, but the issue with Kohana_Exception [ kohana/core.errors.403 ]: @todo FORBIDDEN persists.
I think I may do it the wrong way.

I invoke gallery2 from g2.ggserve.eu:81 (php5.6) [./docs/gallery2] , and gallery3 from g3.ggserve.eu:81 (php5.6) [./docs/gallery3].
I can not find an error in gallery2 and I'm able to upload images (as admin).

I removed php-http, so that there is no sigsegv 11 in phpinfo(); anymore.
On error reporting there are lots of deprecated messages, though.

Gerhard

unread,
Aug 5, 2020, 6:30:03 AM8/5/20
to Gallery 3 Users
It may have to do with lighttpd and therefor rewrite doesn't work in gallery2? I'm going to configure apache2 now for this task ...

Gerhard

unread,
Aug 6, 2020, 8:45:24 AM8/6/20
to Gallery 3 Users
I got on mainenance

"
- Integrity Check

Thu 06 Aug 2020 14:43:45 CEST

Success

run now

Check data integrity and report any inconsistencies.

Last Run Details:

Checked 2284 entities
Orphaned data in table AccessMap with no row in AccessSubscriberMap table; ids: 1457, 1511, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1614, 1623, 3075, 3076, 3077, 3088

Gerhard

unread,
Aug 6, 2020, 8:47:54 AM8/6/20
to Gallery 3 Users

System information

Thu 06 Aug 2020 14:46:38 CEST

Success

run now

Get system details; useful for copy/paste into G2 support forum.

Last Run Details:

Gallery URL = http://g2.ggserve.eu:81/main.php
Gallery version = 2.3.2 core 1.3.0.2
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.6.40-29+0~20200514.35+debian10~1.gbpcc49a4 fpm-fcgi
Webserver = Apache/2.4.38 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1g mod_python/3.3.1 Python/2.7.16
Database = mysqlt 5.5.5-10.4.13-MariaDB-1:10.4.13+maria~buster, lock.system=database
Toolkits = Exif, Getid3, LinkItemToolkit, Thumbnail, ArchiveUpload, Dcraw, Ffmpeg, ImageMagick, NetPBM, SquareThumb
Acceleration = partial/900, partial/900
Operating system = Linux pv10.gaussling.selfhost.eu 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64
Default theme = simplified
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0
Rows in GalleryAccessMap table = 143
Rows in GalleryAccessSubscriberMap table = 390
Rows in GalleryUser table = 5
Rows in GalleryItem table = 387
Rows in GalleryAlbumItem table = 15
Rows in GalleryCacheMap table = 9

Gerhard

unread,
Aug 6, 2020, 10:11:50 AM8/6/20
to Gallery 3 Users
the /home/gerhard/www/docs/gallery2/embed.php results in a blank page with errorreporting on, I get:

Deprecated
: Non-static method GalleryDataCache::containsKey() should not be called statically, assuming $this from incompatible context in /home/gerhard/www/docs/gallery2/modules/core/classes/Gallery.class on line 922

Deprecated: Non-static method GalleryDataCache::_getCache() should not be called statically, assuming $this from incompatible context in /home/gerhard/www/docs/gallery2/modules/core/classes/GalleryDataCache.class on line 203

Deprecated: Non-static method GalleryDataCache::get() should not be called statically, assuming $this from incompatible context in /home/gerhard/www/docs/gallery2/modules/core/classes/Gallery.class on line 922

Deprecated: Non-static method GalleryDataCache::_getCache() should not be called statically, assuming $this from incompatible context in /home/gerhard/www/docs/gallery2/modules/core/classes/GalleryDataCache.class on line 186

Deprecated: Non-static method GalleryCoreApi::requireOnce() should not be called statically, assuming $this from incompatible context in /home/gerhard/www/docs/gallery2/modules/core/classes/Gallery.class on line 979

Gerhard

unread,
Aug 6, 2020, 1:17:34 PM8/6/20
to Gallery 3 Users
I unfortunately omit this notice on the g2import module page.

"If you get a blank screen when you enter the path to embed.php, upgrade your installation of Gallery2 to 2.3.x first."
http://codex.galleryproject.org/Gallery3:Modules:g2_import

I even don't know what it should show. Should the import or embedding application/tool appear?

Maybe one can now solve the issu, by debugging the embed.php issue?

I also set the memory linmit from 128M to 256M
`memory_limit = 256M`

I cannot find a .htaccess file in the folder, I hope the php.ini setting suffices.

`Q: How come the WPG2 Output page just returns blank?
  • Most common cause of this problem is you do not have enough php memory allocated. Gallery2 requires at least 16MB (*and maybe more) to run. You can increase the memory allocation by adding the following line to your .htaccess in your wordpress directory:
phpvalue memorylimit 32M
  • On some server configurations, 32M is not sufficient. If you continue to get blank pages, keep raising the limit until it works. Some configurations have required memory limits as high as 48M and even 64M.`
http://codex.galleryproject.org/Integration:WPG2_FAQ#Q:_How_come_the_WPG2_Output_page_just_returns_blank.3F

`URL Rewrite Embedded

When making any changes to the URL Rewrite configuration (including the rules) you need to access the URL Rewrite admin interface through the embedding application.

Configuring Apache mod_rewrite [...]`
http://codex.galleryproject.org/Gallery2:Modules:rewrite#URL_Rewrite_Embedded

Gerhard

unread,
Aug 9, 2020, 5:55:16 AM8/9/20
to Gallery 3 Users
Okay, I tried several possible and unpossible solutions to this, without any success.
I tried the as php7.0 compatible forks of gallery2.3.2 of fedora core 25 and the by Brad mentioned fork on github by pbobbenb. For the fedora core one I installed fedora core 25 in a virtual box with all modules and packages of fedora core. I got issues on SElinux, which was enabled by default and I'm not familiar with it. But I managed to transfer it to my windows folder to try it out on my debian buster virtualbox with php7.0.

I eventually find an installation with a working non blank embed.php, so that I can find out, what causes the issue in the first place. I don't know what's the culprit so far due to the non-intuitive alert " Your Gallery 2 install isn't working properly. Please verify it! " on importing g2 by embed.php in the g2_migration plugin.

Now I'm away for two weeks of holiday. Maybe I will try to solve this later. I'm not sure, though.
Maybe I'll release the fedora core files as a zip file on git hub similar to pbobbenb ...

Thanks to Brad Dutton and -- J.R. to help me to join the list, after I forgot to leave a comment on applying to join!

Gerhard Gaußling

unread,
Aug 12, 2020, 12:45:48 PM8/12/20
to gallery...@googlegroups.com
Hi JR,

It Starts, that I'm mit sure, if I understand the migration procedure right.

V3 is able to import Images. V2 I have to test next or the week after.

I also noticed too late, that embed.php turns out with a blank page.

I even don' t know, what the output should look like instead.

Unfortunately I didn't achieve pbobbnb's or fedora's Gallery 2.3.2 installed, neither with 5.6.40, mir with PHP 7.0.

Should (must) g2 and g3p use the Dame (vhost) domain? Or does it suffice, to usw the same host, or isn't even this nessecary? I mentioned somewhere in this thread how I did try the g2import module process.

Maybe someone can shed some light in These questions I had in this thread.

Mit freundlichen Grüßen

Gerhard Gaußling

Vor dem Sauerwassertor 6
56077 Koblenz
0261 78227

--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to a topic in the Google Groups "Gallery 3 Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gallery-3-users/Y7w1iEVjXSI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gallery-3-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gallery-3-users/fbcc573b-3380-4891-a2dc-3e13fca6fb36o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages