Revival woes with php8

644 views
Skip to first unread message

tlahuizcalpantecutli

unread,
Dec 29, 2021, 8:58:00 PM12/29/21
to Gallery 3 Users

Team, I can already hear your “you shoot yourself in the foot” comments, but … I upgraded my server’s version from Fedora 34 to 35, which brings with it php 8.0.14… and part of gallery3 broke.  Any guidance will be appreciated re: (a) is this upgrade the reason for my woes, (b) if so, any chance of seeing an updated ‘revival’ version to embrace php8 in the future, (c) any recommendation, other than going back to php 7, if that is the cause?

Thanks in advance for your comments, and apologies as this is probably known and obvious, but I am out of my depth.

Symptoms: adding a new photo to a folder gives a ‘server responded with 500 code’ error; the photo is copied to its right place, however, but the thumbs and the resizes are not created.  Attempts to create them via admin do not work (task stalls).  Everything else seems to work fine.

Environment: Gallery3 ‘revival’ 3.1.5, linux 5.15.7-200 (Fedora 35), MariaDB 10.5.13, graphics Imagemagick (I tried with GD and GraphicsMagick too: same symptoms), Apache, and, as said, php 8.0.14.  Under Fedora 34 with php7, similar environment, all worked well as it had for many years in successive Fedora versions.

J.R.

unread,
Dec 31, 2021, 2:14:50 AM12/31/21
to gallery...@googlegroups.com
Thanks for bringing this to our attention with such detail. Brad Dutton only released Gallery 3.1.5 with PHP 8 support about 6 weeks ago and hardly anyone is running PHP 8 yet, so we will probably see more issues crop up. I don't know why Brad skipped version 3.1.4 and went straight to 3.1.5 but I wouldn't be surprised if PHP 8 had something to do with it. Personally, I think The Powers That Be are pushing PHP 8 out to soon, since PHP  7.4 was the latest & greatest version until just a year ago. And PHP also took a sudden version jump from 7.4 straight to 8.0 (and then updated to 8.1 just a few weeks after that). A lot of servers and hosting companies are still wrestling with getting everyone and everything running under PHP 7.4 (and the reports I'm seeing indicate that PHP 8 breaks a whole lot of stuff that worked under 7.4)

I'll be updating my sites to Gallery 3.1.5 when I can find some time, but I'm going to stick with a sever running PHP 7.4 for now, until some very compelling reasons come along to convince me to dive into PHP 8.0

-- J.R.
--
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 the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, 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/c6952d76-31c8-4114-a8f3-32ea5d3f559bn%40googlegroups.com.

Brad Dutton

unread,
Dec 31, 2021, 2:54:46 PM12/31/21
to Gallery 3 Users
Hi,

Gallery 3.1.5 should be working with PHP 8.0. I just updated the docker container to use PHP 8. I'm running this container for my personal gallery and there doesn't seem to be any problems. I haven't tried 8.1 yet nor run any code compatibility analysis tools for that version. Can you check the log files in var/logs and see if anything is being logged in there? That could help determine the issue.

Thanks,
Brad

Gerardo L. Cahn

unread,
Dec 31, 2021, 4:32:33 PM12/31/21
to gallery...@googlegroups.com

Brad & J.R., thanks for your messages.

 

I forgot to report about logs in my previous message, sorry.  I did add the ‘local.php’ file under var/ as per the gallery3 website instructions; please see below the contents of that file and of the logs themselves.  The logs of Apache, MariaDB and php-fpm have no entry that suggests a problem.


If you (Brad) think that g3 should work under php8 I'll keep digging ... is there an easy way I could get my hands around the docker you mention, with php8 that works fine?

 

Thanks again and Happy Holidays to y’all!

 

  ~ cat /usr/share/gallery3/var/local.php

<? defined("SYSPATH") or die("No direct script access");

error_reporting(E_ALL);

ini_set('display_errors', true);

date_default_timezone_get();

 


  ~ cat /usr/share/gallery3/var/logs/2021-12-30.log.php

<?php defined('SYSPATH') or die('No direct script access.'); ?>

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/30ZGaVsNMtw/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/99c27344-b96e-49cb-a0ec-8344c18f5456n%40googlegroups.com.
-- 
// Gerardo L. Cahn <ger...@niuk.org>
//  linux, mac ... and, well, yes,
//        ((windows too)).

Brad Dutton

unread,
Dec 31, 2021, 4:50:59 PM12/31/21
to Gallery 3 Users
If you are interested in running gallery from a docker container you'll need to read on how to install docker and get that working. Once that's installed you can get gallery working using these directions:

Aside from the docker route, if you are running PHP FPM with Apache then the default PHP settings in the .htaccess file won't be used. You'll need to make sure these are set in your PHP FPM settings:
Any errors are probably being logged to the PHP FPM error log file, so check there for issues.

Gerardo L. Cahn

unread,
Jan 8, 2022, 11:49:30 PM1/8/22
to gallery...@googlegroups.com

I finally made time to dig a bit deeper into my problem (g3 broken after upgrading my server).  I now got an actual (interactive) error message (see attachment), and the same info is recorded in the /var/logs/ folder... thanks in advance for any guidance you could provide!

Gerardo

log contents:

2022-01-08 23:35:40 -05:00 --- error: Kohana_Exception [ 403 ]: @todo FORBIDDEN
/usr/share/gallery3/modules/gallery/helpers/access.php [ 202 ]
#0 /usr/share/gallery3/modules/gallery/helpers/access.php(425): access_Core::forbidden()
#1 /usr/share/gallery3/modules/gallery/controllers/admin_maintenance.php(66): access_Core::verify_csrf()
#2 /usr/share/gallery3/modules/gallery/controllers/admin.php(62): Admin_Maintenance_Controller->start()
#3 [internal function]: Admin_Controller->__call()
#4 /usr/share/gallery3/system/core/Kohana.php(302): ReflectionMethod->invokeArgs()
#5 /usr/share/gallery3/system/core/Event.php(208): Kohana_Core::instance()
#6 /usr/share/gallery3/application/Bootstrap.php(67): Event_Core::run()
#7 /usr/share/gallery3/index.php(124): require('/usr/share/gall...')
#8 {main}
2022-01-08 23:35:40 -05:00 --- error: Missing messages entry kohana/core.errors.403 for message kohana/core

Gallery 2022-01-08 23-36-36.png

Brad Dutton

unread,
Jan 13, 2022, 5:05:23 PM1/13/22
to Gallery 3 Users
It seems like your logged in session is being lost. Is your site running on SSL? Perhaps the URLs are switching between SSL and no SSL?

Gerardo L. Cahn

unread,
Jan 24, 2022, 7:34:39 PM1/24/22
to gallery...@googlegroups.com

After learning from Brad and JR that my problems were not caused by php8 as i had assumed, I reinstalled 3.1.5 and started adding themes and modules in steps until it failed.  This is what I found:

--In my current environment, activating module "image_optimizer" causes the failure I reported: thumbs not created, its tasks stalled.  i don't know what changed in Fedora 35 to cause this loss-of-session/ssl thing that Brad mentions.

--Additionally, module "arrow_nav" causes theme "greydragon" to crash; not sure if other themes would also fail.

I disabled both and am up and running again.  This extends the life of my gallery for the foreseeable future, so I am satisfied.  I am sorry I cannot offer a more complete solution but I report this as is in case somebody else has a similar problem.

Incidentally, while I was thinking that gallery3 was dead for me I installed "piwigo", making it use the gallery3 albums in-place, and spent some time playing with it.  It works fine, but i prefer G3, so I am happy having sorted this bump, even if at a small loss of functionality.

Which takes me to the real reason for this email: to extend my thanks to JR, Brad and everybody else involved in supporting and adding value to this system and this group.  I would not have found this walk-around without your input; I would have just installed the next best solution, and be worse off for it.  Thank you, guys.  Never mind user attitude: stand tall.  You are making the internet better.

J.R.

unread,
Jan 25, 2022, 6:08:37 PM1/25/22
to gallery...@googlegroups.com
Geraldo,

Thanks so much for letting us know which two modules you found to be causing bad behavior with gallery ver 3.1.5 running under PHP 8. This kind of report really helps with the current process of tweaking Gallery (and its add-on modules) run under the very-new PHP 8.  Brad and others did a lot of work to check out the included modules under version 3.1.3 and PHP 7+ and to correct any the problems they found. But PHP 8 is a whole new ballgame. The internet is full of people who have jumped into PHP 8 and been having lots of problems with software and scripts of all kinds.

It might be a good idea for most gallery users to stick with version 3.1.3 and a server running PHP 7... preferably 7.4 -- or if you want to upgrade you site to 3.1.5 or just install it fresh for future work, do it on a PHP 7.4 server for now.

I personally believe that PHP 8 is "not ready for Prime Time" and was released prematurely under industry pressure because of all the hacking attacks which have become epidemic.

Based on what I've read up to this point,  I, myself, would suggest everyone forget about running PHP 8 for at least another year. Most server companies will not insist on you running PHP 8 right now, but will have the option to let you set your account to running something like PHP 7.4 -- that's a good bet for now, unless you are running apps that do financial transactions or store user's personal data. And even though there has been a very ol Shopping Cart module around for a long time, using something like that inside Gallery never seemed like a very good idea to me, not even 10 years ago on gallery 3.0.9 back in the good old days of the comparatively "safe internet".

-- J.R.

David Jackie Armstrong

unread,
Jan 12, 2023, 1:46:34 PM1/12/23
to Gallery 3 Users
Having waited for a year I tried switching my gallery 3.1.5 installation from PHP 7.4 to 8.0 and 8.1, resulting in extensive crash reports too long to post here - the start of the 8.0 crash report is shown below. This installation was migrated from gallery 2, uses greydragon for styling, and has been customised to give a similar appearance to the original gallery 2 installation. The customisations made are described via winmerge reports in https://github.com/dajavous/thejigasaurus.com

Any advice on how to proceed would be appreciated. I am considering starting with a fresh 3.1.5 installation and migrating the existing content without the additional modules installed, prior to switching to PHP 8.0.

David Armstrong.

-------------------------------------------------

is_album()) { exif::extract($item);} } static function item_deleted($item) { db::build()->delete("exif_records")->where("item_id", "=", $item->id)­
>execute(); } static function photo_ menu($menu, $theme) { $item= $theme->item(); $menu->append( Menu: :factory("link") ->id("exifdata-link")­
>label(t("Photo Details")) ->url(url::site("exif/show/$item->id")) ->css_id("g-exifdata-link") ->css_class("g-dialog-link"));} } ?> get("add_menu"); if
(!empty($submenu)) { $item= $submenu->get("add_photos_item"); if (!empty($item)) { $item->css_class("ui-icon-plus"); } $item= $submenu­
>get("add_album_item"); if (!empty($item)) { $item->css_class("ui-icon-note");} } $submenu = $menu->get("options_menu"); if (!empty($submenu))
{ $item= $submenu->get("edit_item"); if (!empty($item)) { $item->css_class("ui-icon-pencil"); } $item= $submenu->get("edit_permissions"); if
(!empty($item)) { $item->css_class("ui-icon-key");}} } static function read_session_cmdparam($cmd, $cookie, $default) { try { $_cmd =
$_GET[$cmd];} catch (Exception $e) {};if (isset($_cmd)): $_var= strtolower($_cmd); $_from_cmd = TRUE; if ($_var= "default"): $_var=
$default; endif; else: $_from_cmd = FALSE; if ($cookie): try { $_var=$_ COOKIE[$cookie]; } catch (Exception $e) { }; endif; endif; if
(!isset(S_var)): $_var= $default; endif; return $_var; } static function add _path($path) { $config = Kohana_Config: :instance(); Skohana_modules =
$config->get("core.modules"); array_ unshift( Skohana_modules, THEMEPATH . $path); $config->set("core.modules", $kohana _modules);
Kohana: :include _paths( true); } static function add _path_ ex($setting, $cmd, $cookie, $path, $default) { $value = module: :get_ var("th _grey dragon",
$setting, $default); $value= self::read_session_cmdparam($cmd, $cookie, $value); self::add_path("greydragon/css/". $path."/". $value);} static
function gallery_ready() { self::add_path_ex("frame_pack", "framepack", "gd_framepack", "framepacks", "greydragon");
self: :add _path_ ex("color _pack", "colorpack", "gd_colorpack", "colorpacks", "greydragon"); self: :add _path("custom"); } } ?>get("add_menu"); if
(!empty($submenu)) { $item= $submenu->get("add_photos_item"); if (!empty($item)) { $item->css_class("ui-icon-plus"); } $item= $submenu­
>get("add_album _item"); if (!empty($item)) { Sitem->css_class("ui-icon-note"); } } $submenu = $menu->get("options _ menu"); if (!empty($submenu))
{$item= $submenu->get("edit_item"); if (!empty($item)) { $item->css_class("ui-icon-pencil");} $item= $submenu->get("edit_permissions"); if
(!empty($item)) { $item->css_class("ui-icon-key");} } } static function read_session_cmdparam($cmd, $cookie, $default) { try { $_cmd =
$_ GET[$cmd];} catch (Exception $e) {};if (isset($_cmd)): $_var= strtolower($_cmd); $_from_cmd = TRUE; if($_ var== "default"):$_ var=
$default; endif; else: $_from_cmd = FALSE; if($cookie): try { $_var= $_COOKIE[$cookie];} catch (Exception $e) { }; endif; endif; if
(!isset(S_var)): $_var= $default; endif; return $_var; } static function add _path($path) { $config = Kohana_Config: :instance(); $kohana _ modules =
$config->get("core.modules"); array_ unshift( Skohana_modules, THEMEPATH . $path); $config->set("core.modules", $kohana _modules);
Kohana: :include _paths(true ); } static function add _path_ ex($setting, $cmd, $cookie, $path, $default) { $value = module: :get_ var("th _greydragon",

...................................................................................

Brad Dutton

unread,
Jan 12, 2023, 1:53:54 PM1/12/23
to Gallery 3 Users
Is there any way you can post more details, I don't see the actual error in there. There hasn't been an updated release that fully supports 8.1 yet, I'll see if I can get that pushed out this weekend.

David Jackie Armstrong

unread,
Jan 12, 2023, 5:15:42 PM1/12/23
to Gallery 3 Users
Thank you for your quick response.

Here is the log file from /var/logs, with the full path made anonymous.

Regards,

David Armstrong.

-------------------------------------------



<?php defined('SYSPATH') or die('No direct script access.'); ?>

2023-01-12 18:06:55 +00:00 --- error: File not found: lib%2Fimages%2Ffavicon.ico
2023-01-12 18:07:02 +00:00 --- error: File not found: pages%2Fshow%2Flib%2Fimages%2Ffavicon.ico
2023-01-12 18:13:33 +00:00 --- error: File not found: arrow%2Fufo%2Flib%2Fimages%2Ffavicon.ico
2023-01-12 18:25:26 +00:00 --- error: date.timezone setting not detected in /opt/alt/php80/etc/php.ini falling back to UTC.  Consult http://php.net/manual/function.get-cfg-var.php for help.
2023-01-12 18:25:26 +00:00 --- error: Error [ 0 ]: Class "Theme_View" not found
/home/root/public_html/gallery315/modules/gallery/controllers/albums.php [ 63 ]
#0 /home/root/public_html/gallery315/modules/gallery/controllers/albums.php(22): Albums_Controller->show()
#1 [internal function]: Albums_Controller->index()
#2 /home/root/public_html/gallery315/system/core/Kohana.php(302): ReflectionMethod->invokeArgs()
#3 /home/root/public_html/gallery315/system/core/Event.php(208): Kohana_Core::instance()
#4 /home/root/public_html/gallery315/application/Bootstrap.php(67): Event_Core::run()
#5 /home/root/public_html/gallery315/index.php(124): require('/home/root/...')
#6 {main}
2023-01-12 18:25:27 +00:00 --- error: File not found: %27%20.%20%24this-%3Eurl%28
2023-01-12 18:25:32 +00:00 --- error: Error [ 0 ]: Class "Theme_View" not found
/home/root/public_html/gallery315/modules/pages/controllers/pages.php [ 41 ]
#0 [internal function]: Pages_Controller->show()
#1 /home/root/public_html/gallery315/system/core/Kohana.php(302): ReflectionMethod->invokeArgs()
#2 /home/root/public_html/gallery315/system/core/Event.php(208): Kohana_Core::instance()
#3 /home/root/public_html/gallery315/application/Bootstrap.php(67): Event_Core::run()
#4 /home/root/public_html/gallery315/index.php(124): require('/home/root/...')
#5 {main}
2023-01-12 18:25:33 +00:00 --- error: File not found: pages%2Fshow%2F%27%20.%20%24this-%3Eurl%28
2023-01-12 18:27:27 +00:00 --- error: Error [ 0 ]: Class "Theme_View" not found
/home/root/public_html/gallery315/modules/gallery/controllers/albums.php [ 63 ]
#0 /home/root/public_html/gallery315/modules/gallery/controllers/albums.php(22): Albums_Controller->show()
#1 [internal function]: Albums_Controller->index()
#2 /home/root/public_html/gallery315/system/core/Kohana.php(302): ReflectionMethod->invokeArgs()
#3 /home/root/public_html/gallery315/system/core/Event.php(208): Kohana_Core::instance()
#4 /home/root/public_html/gallery315/application/Bootstrap.php(67): Event_Core::run()
#5 /home/root/public_html/gallery315/index.php(124): require('/home/root/...')
#6 {main}
2023-01-12 18:27:28 +00:00 --- error: File not found: %27%20.%20%24this-%3Eurl%28
2023-01-12 18:30:42 +00:00 --- error: File not found: login
2023-01-12 18:30:43 +00:00 --- error: File not found: %27%20.%20%24this-%3Eurl%28
2023-01-12 18:31:57 +00:00 --- error: File not found: login
2023-01-12 21:53:37 +00:00 --- error: File not found: lib%2Fimages%2Ffavicon.ico

David Jackie Armstrong

unread,
Jan 12, 2023, 5:26:32 PM1/12/23
to Gallery 3 Users
I also changed the theme from greydragon to wide wind, which resulted in more useful error messages to the logged in admin.

Regards,

David Armstrong.

------------------------------------

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: s17.infinitysrv.com
Operating system: Linux 3.10.0-962.3.2.lve1.5.64.el7.x86_64
Apache: Unknown
PHP: 8.0.26
MySQL: 10.3.37-MariaDB-cll-lve
Server load: 3.31 3.84 4.15
Graphics toolkit: imagemagick
remove Gallery stats
Version: 3.0+ (branch master, build 434)
Albums: 2532
Photos: 9490
TypeError [ 0 ]:
count(): Argument #1 ($value) must be of type Countable|array, null given
MODPATH/database_info/views/admin_block_db.html.php[ 16 ]

11<ul>
12  <li>
13    <?= t("Database size: %dbsize MB", array("dbsize" => number_format($database_size, 2))) ?>
14  </li>
15  <li>
16    <?= t("Number of tables: %dbtables", array("dbtables" => count($tables))) ?>
17  </li>
18</ul>
SYSPATH/libraries/View.php[ 318 ] » include()

SYSPATH/libraries/View.php[ 260 ] » View_Core->load_view()

MODPATH/gallery/libraries/MY_View.php[ 75 ] » View_Core->render()

SYSPATH/libraries/View.php[ 226 ] » View->render()

DOCROOT/themes/admin_wind/views/block.html.php[ 16 ] » View_Core->__toString()

SYSPATH/libraries/View.php[ 318 ] » include( arguments )

SYSPATH/libraries/View.php[ 260 ] » View_Core->load_view()

MODPATH/gallery/libraries/MY_View.php[ 75 ] » View_Core->render()

SYSPATH/libraries/View.php[ 226 ] » View->render()

MODPATH/gallery/libraries/Block.php[ 28 ] » View_Core->__toString()

MODPATH/gallery/helpers/block_manager.php[ 109 ] » Block_Core->__toString()

MODPATH/gallery/controllers/admin_dashboard.php[ 27 ] » block_manager_Core::get_html()

MODPATH/gallery/controllers/admin.php[ 62 ] » Admin_Dashboard_Controller->index()

{PHP internal call} » Admin_Controller->__call()

SYSPATH/core/Kohana.php[ 302 ] » ReflectionMethod->invokeArgs()

SYSPATH/core/Event.php[ 208 ] » Kohana_Core::instance()

APPPATH/Bootstrap.php[ 67 ] » Event_Core::run()

DOCROOT/index.php[ 124 ] » require( arguments )

Environment
Included files(146)
DOCROOT/index.php
APPPATH/Bootstrap.php
SYSPATH/core/Benchmark.php
SYSPATH/core/Event.php
SYSPATH/core/Kohana.php
SYSPATH/core/Kohana_Exception.php
MODPATH/gallery/libraries/MY_Kohana_Exception.php
SYSPATH/core/Kohana_Config.php
SYSPATH/libraries/drivers/Config.php
SYSPATH/libraries/drivers/Config/Array.php
APPPATH/config/config.php
SYSPATH/libraries/I18n.php
SYSPATH/libraries/Kohana_PHP_Exception.php
SYSPATH/config/locale.php
MODPATH/gallery/config/locale.php
MODPATH/gallery/helpers/module.php
SYSPATH/libraries/Cache.php
SYSPATH/config/cache.php
MODPATH/gallery/config/cache.php
MODPATH/gallery/libraries/drivers/Cache/Database.php
SYSPATH/libraries/drivers/Cache.php
SYSPATH/libraries/Kohana_Log.php
SYSPATH/config/log.php
SYSPATH/libraries/drivers/Log/File.php
SYSPATH/libraries/drivers/Log.php
MODPATH/gallery/config/log_file.php
SYSPATH/helpers/db.php
SYSPATH/libraries/Database_Builder.php
MODPATH/kohana23_compat/libraries/MY_Database_Builder.php
SYSPATH/libraries/Database.php
MODPATH/gallery/libraries/MY_Database.php
SYSPATH/config/database.php
MODPATH/gallery/config/database.php
DOCROOT/var/database.php
SYSPATH/libraries/Database_Mysqli.php
SYSPATH/libraries/Database_Mysql.php
MODPATH/gallery/libraries/MY_Database_Mysql.php
MODPATH/gallery/helpers/gallery.php
SYSPATH/libraries/Database_Mysqli_Result.php
SYSPATH/libraries/Database_Result.php
MODPATH/gallery/hooks/init_gallery.php
MODPATH/gallery/helpers/gallery_error.php
SYSPATH/libraries/Input.php
MODPATH/gallery/libraries/MY_Input.php
SYSPATH/helpers/text.php
MODPATH/gallery/libraries/Gallery_I18n.php
SYSPATH/libraries/ORM.php
MODPATH/gallery/libraries/MY_ORM.php
SYSPATH/libraries/ORM_Iterator.php
MODPATH/gallery/models/module.php
SYSPATH/helpers/inflector.php
SYSPATH/config/inflector.php
SYSPATH/config/sql_types.php
MODPATH/gallery/helpers/model_cache.php
SYSPATH/helpers/request.php
SYSPATH/config/user_agents.php
MODPATH/gallery/config/user_agents.php
MODPATH/gallery/helpers/gallery_event.php
MODPATH/gallery/helpers/identity.php
MODPATH/gallery/libraries/IdentityProvider.php
MODPATH/user/config/identity.php
MODPATH/user/libraries/drivers/IdentityProvider/Gallery.php
MODPATH/gallery/libraries/drivers/IdentityProvider.php
SYSPATH/libraries/Session.php
SYSPATH/config/session.php
MODPATH/gallery/config/session.php
SYSPATH/libraries/drivers/Session/Database.php
SYSPATH/libraries/drivers/Session.php
SYSPATH/config/cookie.php
MODPATH/gallery/config/cookie.php
SYSPATH/helpers/cookie.php
MODPATH/user/models/user.php
MODPATH/gallery/helpers/theme.php
MODPATH/gallery/helpers/locales.php
MODPATH/user/helpers/user_event.php
MODPATH/organize/helpers/organize_event.php
MODPATH/search/helpers/search_event.php
MODPATH/tag/helpers/tag_event.php
MODPATH/displaytags/helpers/displaytags_event.php
MODPATH/tag_albums/helpers/tag_albums_event.php
MODPATH/watermark/helpers/watermark_event.php
MODPATH/exif/helpers/exif_event.php
MODPATH/all_tags/helpers/all_tags_event.php
MODPATH/pages/helpers/pages_event.php
MODPATH/custom_menus/helpers/custom_menus_event.php
MODPATH/short_search_fix/helpers/short_search_fix_event.php
MODPATH/code_block/helpers/code_block_event.php
MODPATH/moduleorder/helpers/moduleorder_event.php
MODPATH/album_cover_browser/helpers/album_cover_browser_event.php
MODPATH/developer/helpers/developer_event.php
MODPATH/no_home_link/helpers/no_home_link_event.php
SYSPATH/libraries/Router.php
SYSPATH/config/routes.php
MODPATH/gallery/config/routes.php
SYSPATH/helpers/url.php
MODPATH/gallery/helpers/MY_url.php
MODPATH/gallery/controllers/admin.php
SYSPATH/libraries/Controller.php
MODPATH/gallery/helpers/auth.php
MODPATH/gallery/controllers/admin_dashboard.php
MODPATH/gallery/libraries/Admin_View.php
MODPATH/gallery/libraries/Gallery_View.php
SYSPATH/libraries/View.php
MODPATH/gallery/libraries/MY_View.php
MODPATH/gallery/helpers/access.php
MODPATH/gallery/libraries/SafeString.php
MODPATH/gallery/helpers/block_manager.php
MODPATH/gallery/helpers/gallery_block.php
MODPATH/gallery/libraries/Block.php
DOCROOT/themes/admin_wind/views/block.html.php
MODPATH/gallery/views/admin_block_welcome.html.php
SYSPATH/helpers/html.php
MODPATH/gallery/helpers/MY_html.php
MODPATH/gallery/helpers/upgrade_checker.php
MODPATH/gallery/views/upgrade_checker_block.html.php
MODPATH/gallery/models/item.php
MODPATH/gallery/libraries/ORM_MPTT.php
MODPATH/gallery/helpers/random.php
MODPATH/gallery/views/admin_block_photo_stream.html.php
MODPATH/gallery/helpers/photo.php
MODPATH/gallery/models/log.php
MODPATH/gallery/views/admin_block_log_entries.html.php
MODPATH/gallery/helpers/log.php
MODPATH/user/helpers/user.php
MODPATH/gallery/helpers/user_profile.php
MODPATH/info/helpers/info_block.php
MODPATH/rss/helpers/rss_block.php
MODPATH/tag/helpers/tag_block.php
MODPATH/displaytags/helpers/displaytags_block.php
MODPATH/tag_albums/helpers/tag_albums_block.php
MODPATH/image_block/helpers/image_block_block.php
MODPATH/albumtree/helpers/albumtree_block.php
MODPATH/pages/helpers/pages_block.php
MODPATH/code_block/helpers/code_block_block.php
MODPATH/about_this_album/helpers/about_this_album_block.php
MODPATH/about_this_photo/helpers/about_this_photo_block.php
MODPATH/database_info/helpers/database_info_block.php
MODPATH/gallery/views/admin_block_stats.html.php
MODPATH/gallery/views/admin_block_platform.html.php
SYSPATH/helpers/feed.php
SYSPATH/helpers/valid.php
MODPATH/gallery/helpers/MY_valid.php
MODPATH/gallery/views/admin_block_news.html.php
MODPATH/database_info/views/admin_block_db.html.php
MODPATH/gallery/views/kohana/error.php
MODPATH/gallery/views/error_admin.html.php
Loaded extensions(65)
Core
date
libxml
openssl
pcre
sqlite3
zlib
bz2
calendar
ctype
curl
hash
filter
ftp
gettext
gmp
SPL
iconv
json
pcntl
readline
Reflection
session
standard
shmop
SimpleXML
mbstring
tokenizer
xml
litespeed
i360
bcmath
dba
dom
enchant
fileinfo
gd
imagick
imap
intl
ldap
exif
mysqlnd
mysqli
odbc
PDO
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
pspell
snmp
soap
sockets
sysvmsg
sysvsem
sysvshm
tidy
xmlreader
xmlwriter
xsl
zip
$_SESSION

                    session_id                      
string(19) "removed for display"

                    total_hits                      
integer 11

                    _kf_flash_                      
array(0)

                    user_agent                      
string(123) "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 FirePHP/0.5"

                    ip_address                      
string(11) "92.11.73.83"

                    last_activity                      
integer 1673561927

                    user                      
string(62) "User_Model object for "admin313" - details omitted for display"

                    group_ids_timeout                      
integer 1673648242

                    continue_url                      
string(58) "https://www.rootndgames.com/gallery315/index.php/admin"

                    csrf                      
string(19) "removed for display"

                    group_ids                      
array(3) (
    0 => string(1) "1"
    1 => string(1) "2"
    2 => string(1) "3"
)

                    active_auth_timestamp                      
integer 1673561842

                    admin_area_activity_timestamp                      
integer 1673561927
$_COOKIE

                    f5f04186ea2bf1c47e8bea23624b6e66                      
string(19) "removed for display"

                    ccm_cookies_accepted                      
string(3) "yes"

                    4de248ad06baa3c13ffc81ce47ffed45                      
string(19) "removed for display"

                    g3sid                      
string(19) "removed for display"
$_SERVER

                    PATH                      
string(28) "/usr/local/bin:/usr/bin:/bin"

                    TEMP                      
string(4) "/tmp"

                    TMP                      
string(4) "/tmp"

                    TMPDIR                      
string(4) "/tmp"

                    PWD                      
string(1) "/"

                    HTTP_ACCEPT                      
string(135) "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b …"

                    HTTP_ACCEPT_ENCODING                      
string(4) "gzip"

                    HTTP_ACCEPT_LANGUAGE                      
string(14) "en-GB,en;q=0.9"

                    CONTENT_LENGTH                      
string(1) "0"

                    HTTP_COOKIE                      
string(19) "removed for display"

                    HTTP_HOST                      
string(23) "www.rootndgames.com"

                    HTTP_REFERER                      
string(53) "https://www.rootndgames.com/gallery315/index.php/"

                    HTTP_USER_AGENT                      
string(123) "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 FirePHP/0.5"

                    HTTP_X_FORWARDED_FOR                      
string(11) "92.11.73.83"

                    HTTP_SEC_CH_UA                      
string(64) ""Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108""

                    HTTP_SEC_CH_UA_MOBILE                      
string(2) "?0"

                    HTTP_SEC_CH_UA_PLATFORM                      
string(9) ""Windows""

                    HTTP_UPGRADE_INSECURE_REQUESTS                      
string(1) "1"

                    HTTP_SEC_FETCH_SITE                      
string(11) "same-origin"

                    HTTP_SEC_FETCH_MODE                      
string(8) "navigate"

                    HTTP_SEC_FETCH_USER                      
string(2) "?1"

                    HTTP_SEC_FETCH_DEST                      
string(8) "document"

                    HTTP_X_REQUEST_ID                      
string(16) "1673561923262827"

                    HTTP_X_WF_PROTOCOL_1                      
string(74) "http://registry.pinf.org/cadorn.org/wildfire/@meta/protocol/announce/0.1.0"

                    HTTP_X_WF_1_INDEX                      
string(1) "1"

                    HTTP_X_WF_1_1                      
string(880) "875||{"authkey":"mykey","receivers":["http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1","http://meta.fireph …"

                    HTTP_X_CACHEWALL_REMOTE_IP                      
string(11) "92.11.73.83"

                    HTTP_X_CACHEWALL_OBJECT_TYPE                      
string(7) "dynamic"

                    HTTP_X_CACHEWALL_SERVER                      
string(19) "s17.infinitysrv.com"

                    HTTP_X_CACHEWALL_PROTO                      
string(5) "https"

                    HTTP_X_FORWARDED_PROTO                      
string(5) "https"

                    HTTP_X_CACHEWALL_IDENTITY                      
string(17) "90438852185104724"

                    HTTP_SURROGATE_CAPABILITY                      
string(11) "key=ESI/1.0"

                    HTTP_X_VARNISH                      
string(9) "305104725"

                    HTTPS                      
string(2) "on"

                    SERVER_PORT                      
string(3) "443"

                    UNIQUE_ID                      
string(27) "Y8CHR1-xz1b4dpLD9lApVQAAABQ"

                    SCRIPT_URL                      
string(27) "/gallery315/index.php/admin"

                    SCRIPT_URI                      
string(58) "https://www.rootndgames.com/gallery315/index.php/admin"

                    SERVER_SIGNATURE                      
string(0) ""

                    SERVER_SOFTWARE                      
string(6) "Apache"

                    SERVER_NAME                      
string(23) "www.rootndgames.com"

                    SERVER_ADDR                      
string(12) "198.91.94.98"

                    REMOTE_ADDR                      
string(11) "92.11.73.83"

                    DOCUMENT_ROOT                      
string(26) "/home/root/public_html"

                    REQUEST_SCHEME                      
string(5) "https"

                    CONTEXT_PREFIX                      
string(0) ""

                    CONTEXT_DOCUMENT_ROOT                      
string(26) "/home/root/public_html"

                    SERVER_ADMIN                      
string(29) "webm...@null.com"

                    SCRIPT_FILENAME                      
string(47) "/home/root/public_html/gallery315/index.php"

                    REMOTE_PORT                      
string(5) "34210"

                    SERVER_PROTOCOL                      
string(8) "HTTP/1.1"

                    REQUEST_METHOD                      
string(3) "GET"

                    QUERY_STRING                      
string(0) ""

                    REQUEST_URI                      
string(27) "/gallery315/index.php/admin"

                    SCRIPT_NAME                      
string(21) "/gallery315/index.php"

                    PATH_INFO                      
string(6) "/admin"

                    PATH_TRANSLATED                      
string(32) "/home/root/public_html/admin"

                    PHP_SELF                      
string(21) "/gallery315/index.php"

                    REQUEST_TIME_FLOAT                      
float 1673561927.8147

                    REQUEST_TIME                      
integer 1673561927

Brad Dutton

unread,
Jan 12, 2023, 5:34:58 PM1/12/23
to Gallery 3 Users
For this theme error your customizations appear to have some syntax errors:

error: File not found: %27%20.%20%24this-%3Eurl%28
That looks like $this->url( is being interpreted as a filename somewhere.

David Jackie Armstrong

unread,
Jan 12, 2023, 5:42:29 PM1/12/23
to Gallery 3 Users
Thanks. I'll look into this later.

Regards,

David Armstrong.

Brad Dutton

unread,
Jan 12, 2023, 5:46:46 PM1/12/23
to Gallery 3 Users
The database_info module you are using doesn't appear to be compatible with PHP 8 when there are no tables in the database. Update the  modules/database_info/views/admin_block_db.html.php file with the content from here:
https://github.com/bwdutton/gallery3-contrib/blob/master/3.0/modules/database_info/views/admin_block_db.html.php
and the error should be gone. Note that it will say 0 tables.

David Jackie Armstrong

unread,
Jan 13, 2023, 5:26:28 AM1/13/23
to Gallery 3 Users
Thanks again. This now allows me to access the admin dashboard using PHP 8 and Wide Wind. When I try to change the theme from the admin pages I get different errors depending on the theme selected. The Gallery Wind errors below are also reported using Wide Wind when returning to the front end.

Gallery Wind:

TypeError [ 0 ]:count(): Argument #1 ($value) must be of type Countable|array, null given
  1. MODPATH/gallery/helpers/gallery_theme.php[ 41 ]

    36 } else if ($tag = $theme->tag()) { 37 $buf .= rss::feed_link("tag/tag/{$tag->id}"); 38 } 39 } 40 41 if (count(locales::installed())) { 42 // Needed by the languages block 43 $buf .= $theme->script("jquery.cookie.js"); 44 } 45 46 if ($session->get("l10n_mode", false)) {
  2. MODPATH/gallery/libraries/Theme_View.php[ 236 ] » gallery_theme_Core::head()

  3. DOCROOT/themes/wind/views/page.html.php[ 56 ] » Theme_View_Core->__call()

  1. MODPATH/gallery/controllers/albums.php[ 77 ] » View_Core->__toString()

  2. MODPATH/gallery/controllers/albums.php[ 22 ] » Albums_Controller->show()

  3. {PHP internal call} » Albums_Controller->index()

  1. SYSPATH/core/Kohana.php[ 302 ] » ReflectionMethod->invokeArgs()

  2. SYSPATH/core/Event.php[ 208 ] » Kohana_Core::instance()

  3. APPPATH/Bootstrap.php[ 67 ] » Event_Core::run()

  4. DOCROOT/index.php[ 124 ] » require( arguments )


    Greydragon:

    Error [ 0 ]:Class "Theme_View" not found
    1. MODPATH/gallery/controllers/albums.php[ 63 ]

      58 url::redirect($album->abs_url()); 59 } else if ($page > $max_pages) { 60 url::redirect($album->abs_url("page=$max_pages")); 61 } 62 63 $template = new Theme_View("page.html", "collection", "album"); 64 $template->set_global( 65 array("page" => $page, 66 "page_title" => null, 67 "max_pages" => $max_pages, 68 "page_size" => $page_size,
    2. MODPATH/gallery/controllers/albums.php[ 22 ] » Albums_Controller->show()

    3. {PHP internal call} » Albums_Controller->index()

    1. SYSPATH/core/Kohana.php[ 302 ] » ReflectionMethod->invokeArgs()

    2. SYSPATH/core/Event.php[ 208 ] » Kohana_Core::instance()

    3. APPPATH/Bootstrap.php[ 67 ] » Event_Core::run()

    4. DOCROOT/index.php[ 124 ] » require( arguments )

      Regards,

      David Armstrong.

      David Jackie Armstrong

      unread,
      Jan 14, 2023, 1:51:21 PM1/14/23
      to Gallery 3 Users
      I now have a fresh installation for Gallery 3.1.5 successfully setup with PHP 8 using Wide Wind as the template, and have imported some tables (so far) from the original database and the contents of the var folder (except database.php). This is now displaying the albums and metadata correctly (with a few thumbnails yet to be updated) at www.dajavous.com/gallery315. The original custom installation is at www.oldtoysandgames.com/gallery315 and the Gallery 2 version currently at www.thejigsaurus.com. None of the customisations made in the custom installation has been implemented on the fresh installation yet, and some of the metadata will need reformatting to display properly with the Wide Wind template.

      I would like some general advice on making some of the older modules not included as part of the core 3.1.5 installation to be compatible with PHP 8 if that is feasible. 

      I would like to be able to use albumtree, tag albums, and greydragon if possible.

      Regards,

      David Armstrong.

      Message has been deleted

      David Jackie Armstrong

      unread,
      Jan 24, 2023, 10:10:29 AM1/24/23
      to Gallery 3 Users
      My website is now successfully running on PHP 8 at https://www.dajavous.com/gallery315

      I downloaded albumtree from Brad Dutton's fork of Gallery 3 at https://github.com/bwdutton/gallery3-contrib/tree/master/3.0/modules/albumtree which fixed the errors. I modified the Wide Wind template so that hyperlinks now work in the description text, so I no longer need greydragon. The tag album link available in the sidebar is broken in the version I am using, but the tag album page can be created by selecting * for Display items that contain any of the following tags in the edit album form.

      Regards,

      David Armstrong.

      J.R.

      unread,
      Jan 24, 2023, 11:47:07 AM1/24/23
      to gallery...@googlegroups.com
      David,

      Your site is looking very good. I note that at the very bottom of the home page it is still displaying the horribly obsolete message:

      "Powered by Gallery 3.0+ (branch master, build 434)"

      In my Gallery I removed the powered-by line long ago but don't recall just how I did it... It would be great if we could finally get rid of this and any other lingering hard-coded references to the ancient versions/builds.

      -- J.R.
      --
      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 the Google Groups "Gallery 3 Users" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.

      David Jackie Armstrong

      unread,
      Jan 24, 2023, 1:35:42 PM1/24/23
      to Gallery 3 Users
      I've replaced the credits message with:

      <a href="https://galleryrevival.com/">Powered by Gallery the Revival</a>

      in the Credits setting under Admin/Settings/Advanced

      Regards,

      David Armstrong.

      J.R.

      unread,
      Jan 25, 2023, 6:44:39 PM1/25/23
      to gallery...@googlegroups.com
      David,

      Remind me of where you go to change that credits message?

      -- J.R.

      J.R.

      unread,
      Jan 25, 2023, 6:45:52 PM1/25/23
      to gallery...@googlegroups.com
      David,

      oops... you already did say where. Thanks. I sometime read email way too fast...

      -- J.R.
      Message has been deleted

      David and Jackie Armstrong

      unread,
      Apr 13, 2023, 8:35:28 PM4/13/23
      to gallery...@googlegroups.com
      Jon,

      I've documented changes that I made to Gallery 3.1.5 here:


      This includes changing Wide Wind to show HTML in the item descriptions, summary (the thumbnail main text shown on hover) and title. The changes were in two phases, one to migrate from Gallery 2, and the next to get Gallery 3.1.5 running with the appearance I wanted with PHP 8.1 - there are two sets of WinMerge zip files that can be downloaded, expanded and navigated via any browser.

      The live website with the changes made is here:


      Other people have greydragon working under 3.1.5, but I decided earlier on to opt for one of the core themes that is already included in version 3.1.5 of Gallery.

      Regards,

      David Armstrong.

      On Tue, 11 Apr 2023 at 02:13, Jon Schewe <jpsc...@mtu.net> wrote:
      I'm looking to try and upgrade from php 7.x to php 8.x. I've seen similar issues as those here with greydragon not loading. I've switched to wide wind and my gallery renders however I have 2 issues and wondering if others have a solution:
      1) with greydragon I can put HTML links in my album descriptions and the links become live. However wide wind doesn't render the links. Does someone have another theme that renders the links?
      2) When using wide wind and gallery wind as one mouses over albums and images a box appears and it overlaps the box below it. Anyone have a fix for this, or is this expected behavior?

      Thank you

      Jon Schewe

      unread,
      Apr 23, 2023, 9:56:32 PM4/23/23
      to gallery...@googlegroups.com
      David,

      Thank you for the pointer, that was quite helpful. I was able to grab the changes that I wanted and test them locally. I'll be able to upgrade my production version now.

      Have you thought about making your changes be a separate theme that others can install?

      Jon

      David Taylor

      unread,
      Jan 5, 2024, 12:00:11 PMJan 5
      to Gallery 3 Users
      I've reviewed the github for jigasaurus website but can't make out the changes. Is there an easy way to implement url links in descriptions?

      David and Jackie Armstrong

      unread,
      Jan 5, 2024, 12:54:32 PMJan 5
      to gallery...@googlegroups.com
      David,

      The changes were made in two stages, as documented in these two Winmerge files:

      Migrating thejigasaurus.com from Gallery 2 to Gallery v3.15, while keeping the same look and feel as much as possible:

      Gallery v315 Install to Live 22 03 2022.zip

      Migrating thejigasaurus.com from PHP7 to PHP 8:

      thejigasaurus7 to thejigasaurus8 30 05 2023.zip

      If you download each of these zip files and expand them, open the index file in the expanded folder to browse the changes made (for example Gallery v315 Install to Live 22 03 2022.html). I did not use github to manage these two projects, but just to document the changes made, including the changes to sql tables and module order etc.

      I'm not sure what you mean by implementing url links in descriptions?

      Regards,

      David Armstrong.


      David Taylor

      unread,
      Jan 5, 2024, 2:55:39 PMJan 5
      to Gallery 3 Users
      I just want to add the ability to put url clickable links in my descriptions. As of now they just show raw html.

      David Taylor

      unread,
      Jan 5, 2024, 3:02:53 PMJan 5
      to Gallery 3 Users
      On second thought, maybe I just need to install the module to activate the TinyMCE editor. Do these old modules even work?

      Jon Schewe

      unread,
      Jan 6, 2024, 8:57:32 AMJan 6
      to gallery...@googlegroups.com
      I've made this change to my gallery install. I'm using widewind as the theme and it looks like the changes need to be made to the theme.
      My change is to gallery/themes/widewind/views/album.html.php
      I replaced the calls to html::purify with nl2br for the description (around line 2) and the child title (around line 26).

      David and Jackie Armstrong

      unread,
      Jan 6, 2024, 6:00:07 PMJan 6
      to gallery...@googlegroups.com
      David,

      I used the same approach with the same theme for the same php file. Here is the complete listing , which includes additional changes to pagination you may not require. Just use the lines with nl2br (purify removes the html in the description, tiltle etc):

      <?php defined("SYSPATH") or die("No direct script access.") ?>
      <?php // @todo Set hover on AlbumGrid list items for guest users ?>
      
      <div id="g-info">
        <?= $theme->album_top() ?>
        
        <?= $theme->paginator() ?>
        
          <h1><?= nl2br($item->title) ?></h1>
          <div class="g-description"><?= nl2br($item->description) ?></div>
      </div>
      
      <ul id="g-album-grid" class="ui-helper-clearfix">
      <?php if (count($children)): ?>
        <?php foreach ($children as $i => $child): ?>
        <?php if($child->tag_album != "tag") { ?>
          <?php if ($child->is_album()): ?>
            <?php $item_class = "g-album"; ?>
          <?php elseif ($child->is_movie()): ?>
            <?php $item_class = "g-movie"; ?>
          <?php else: ?>
            <?php $item_class = "g-photo"; ?>
          <?php endif ?>
        <li id="g-item-id-<?= $child->id ?>" class="g-item <?= $item_class ?>">
          <?= $theme->thumb_top($child) ?>
          <a href="<?= $child->url() ?>">
            <?php if ($child->has_thumb()): ?>
            <?= $child->thumb_img(array("class" => "g-thumbnail")) ?>
            <?php endif ?>
          </a>
          <?= $theme->thumb_bottom($child) ?>
          <?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
          <h2><span class="<?= $item_class ?>"></span>
            <a href="<?= $child->url() ?>"><?= nl2br($child->title) ?></a></h2>
          <ul class="g-metadata">
            <?= $theme->thumb_info($child) ?>
          </ul>
        </li>
        <?php } ?>
        <?php endforeach ?>
      <?php else: ?>
        <?php if ($user->admin || access::can("add", $item)): ?>
        <?php $addurl = url::site("uploader/index/$item->id") ?>
        <li><?= t("There aren't