Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Issue with seek function in Database_Mysqli_Result.php

107 views
Skip to first unread message

Stian Lund

unread,
Mar 24, 2024, 8:27:36 AM3/24/24
to Gallery 3 Users
Hi all,
I've tried to use the latest Github repo build for my Gallery3 install after a recent change on my hosting provider. Everything seemed to work fine - *except* that the Next/Previous links on images broke (just linked to the index.php).

I posted about this the last time I tried it, that time I reverted to the release version:

This time I wanted to keep the repo build as there are some nice changes like support for WebP etc. So I was able to narrow the problem down to a change in system/libraries/Database_Mysqli_Result.php:


I'm not that good with PHP (even after all these years...) but it seems the seek function is *expected* to return true or false elsewhere. This change causes it to return void and again causes it to fail creating the Next/Prev links on the image pages.

This change was not made to the seek() in Database_Mysql_Result.php, so I don't know why this was specifically changed for Mysqli?

Would anyone (Brad?) have any info on this specific change or why it might be needed?

I'm using Nginx and I know it's not really "supported" without any custom config on the server, but this seems to be related to DB queries and not webserver stuff from what I can tell.

Some info on the system in case it matters:
PHP Version 8.1.27
nginx/1.22.1
Debian 6.1.69-1 (2023-12-30) x86_64
FPM/FastCGI
mysqli/mysqlnd 8.1.27

Regards,
Stian

David and Jackie Armstrong

unread,
Mar 29, 2024, 12:19:35 AM3/29/24
to gallery...@googlegroups.com
Stian,

Have you tried using the libraries from Brad Dutton's master for gallery3? 

In the master line 145 shows:

public function current()

compared to the commit files that you pointed to in your post:

public function current(): mixed 

There may be other changes in the master but I have not compared them fully.

Regards,

David Armstrong.

 

--
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/5f6abd93-6c6a-4f73-9fe2-e8716e1fd824n%40googlegroups.com.

Stian Lund

unread,
Mar 29, 2024, 4:48:42 AM3/29/24
to Gallery 3 Users

Hi David :)
That's a very good point, I did a doubletake for a bit - but the Github version was updated two years ago with:
And the mixed part was removed again.

I believe the mixed part is some weird PHP way to specify the return value of a function, far as I know it shouldn't impact whether the DB call fails or not.

Thanks for checking though :)

In my older post when I last tried to use the bwdutton repo I fumbled around in the dark, found crashing with the "latestupdates" module and disabled it but decided to revert to my older 3.1.5 release from 2021.
But there's been lots of changes after that, some breakage too I guess, but the support for WebP images is a nice one I want to keep so I'd rather spend some time figuring out what breaks. 

That's when I found this, but really strange no-one else noticed this so I'm guessing not a lot of people use the repo updates, instead sticking with the well-tested 3.1.5 release.

thanks,
Stian
Message has been deleted

Adrian London

unread,
Apr 30, 2024, 11:45:21 AM4/30/24
to Gallery 3 Users
I don't trust random repo updates :)

Someone could try something, push it, and then revert after more thorough testing.  Also, this "mixed" thing seems to be interpreted differently depending on which version of PHP one is using.

However, I didn't even upgrade to the 3.1.5 version directly.  I've made way too many edits to my existing code over the years to have them lost by reverting to stock.  So I switched my PHP version to PHP 8, ran the gallery, and then each time it fell over (which it did, often!) I would get the name of the file that caused the issue from the logs, check the 3.1.5 version for changes, and manually put them into my existing (3.0.9?) code.

My gallery is working perfectly (I've made a few posts here about other PHP 8.3.4 changes I've had to make) but it took time.

-- Adrian

J.R.

unread,
Apr 30, 2024, 12:03:34 PM4/30/24
to gallery...@googlegroups.com
Adrian,

I truly admire your persistence.

-- 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.

Adrian London

unread,
May 5, 2024, 5:06:07 AM5/5/24
to gallery...@googlegroups.com
haha - obsessiveness more than persistence.

I’ve now finished my task, which was go go through almost 20 years of personal photos.  I’ve been deleting the bad ones and geotagging the rest.  I don’t always remember exactly where the photo was taken, but at least they all have the correct country and city allocated to them.

My parents now have an iPad icon that takes them directly to my site and the iMobile theme, which has been slightly customised to show the photo title and date at the top of each pic as the slideshow runs.

I can search all my photos by city and country, or title text, or date.

And … I’m now done!  I guess I’ll be back in a couple of years’ time when PHP 8 is obsoleted and we’re all upgrading to PHP 9 or 10 😁 

— Adrian

J.R.

unread,
May 5, 2024, 12:37:16 PM5/5/24
to gallery...@googlegroups.com
Adrian,

Nice to actually complete a project. I still have around 482 of them in the works myself. But I hope you keep an eye on the list messages. I think the end of life for php 8 is less than 3 years away. The idea that we have to re-tool our programs/computers every few years is great job security for people working in the industry but it really makes life unnecessarily troublesome for the rest of us. Remember "backward compatibility?" That idea seems to have fallen by the way side in the last decade or so.

-- 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.

Adrian London

unread,
May 5, 2024, 4:33:18 PM5/5/24
to gallery...@googlegroups.com
I’ll still be keeping an eye on this forum, in case someone comes up with a new function/idea that I want to try. I’ll also keep an eye out in case I can help in any way.

I think it’s pretty cool that this software is still going, and there’s no competition apart from Piwigo, which is also starting to look a bit abandoned and (imo) isn’t as good.

A quick google tells me that Gallery3 started development in 2008 and entered “hibernation” almost exactly 10 years ago.

I’m trusting it with all my photos. (Well, not exactly, as I have them all backed up in many places, but it’s the only place they’re all on display.)

— Adrian.


Info.RockEdge

unread,
May 7, 2024, 8:10:59 PM5/7/24
to gallery...@googlegroups.com

I also keep an eye on the Gallery 3 developments. I have used it on 2 live sites since 2009 - 2010. I feel it's still the best offering in it's class.

Gerardo L. Cahn

unread,
May 8, 2024, 9:53:18 AM5/8/24
to gallery...@googlegroups.com

I agree.  I have tried piwigo in four different occasions in the last three years, and it is not yet there.  I stay with G3 even if I have to hang on with nails and teeth.

--
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/62c52afb-7a6f-46c9-8b3a-15da07d6c614%40gmail.com.
-- 
// Gerardo L. Cahn <ger...@niuk.org>
//  linux, mac ... and, well, yes,
//        ((windows too)).
Reply all
Reply to author
Forward
0 new messages