Announcement

#1 2020-11-26 12:34:14

tazattitude
Member
2015-07-13
54

Error when going to page 2

Hi Everyone

I'm having a strange problem I haven't seen before on Piwigo

On my categories, when I click to go to page "2" (or any number), I get a timeout error

Fatal error: Maximum execution time of 30 seconds exceeded in
.... /public_html/acp/gallery4/include/functions_url.inc.php on line 440

See here
https://........./gallery4/index/category/examples-of-motorcycle-paint-jobs

I know it worked fine earlier, any ideas on what this could be

Piwigo 11.0.0beta5
Operating system: Linux
PHP: 7.4.6 (Show info) [2020-11-26 11:32:43]
MySQL: 5.6.48-log [2020-11-26 06:32:43]
Graphics Library: External ImageMagick 7.0.9-8

Thank you
Scott

Last edited by tazattitude (2020-11-26 14:42:02)

Offline

 

#2 2020-11-26 13:16:30

erAck
Only trying to help
2015-09-06
2035

Re: Error when going to page 2

> worked fine earlier

When? Before you updated to Piwigo 11.0.0beta5? Or before you updated to PHP 7.4.6?

include/functions_url.inc.php line 440 is

      if (preg_match('/^(\d+)(?:-(.+))?$/', $tokens[$next_token], $matches))

so apparently PHP times out on the regex but that line exists for 13 years.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2020-11-26 14:04:18

tazattitude
Member
2015-07-13
54

Re: Error when going to page 2

I actually have 2 websites running beta 11 and I checked both and neither work. I've been working on 'tags' and the next page seems to work when on the tags. So it's just when you visit each category and you try clicking on the next page or any page numbers

Anyways, I uploaded 2-10-2 include/functions_url.inc.php on both and now both galleries work fine.

I compared and the beta 11 and 2-10-2 are not the same on line 440

Beta 11 line 440
  and strpos($tokens[$next_token], 'start-')!==0

2-10-2
if (preg_match('/^(\d+)(?:-(.+))?$/', $tokens[$next_token], $matches))

So 'something' has changed


Don't know if this gives any info, this was on the debug template
Fatal error: Uncaught Error: Using $this when not in object context in gallery/include/smarty/libs/sysplugins/smarty_internal_debug.php:200 Stack trace: #0 gallery/include/template.class.php(571): Smarty_Internal_Debug::display_debug(Object(Smarty)) #1 gallery/include/page_tail.php(94): Template->p() #2 gallery/index.php(358): include('/usr/home/saj71...') #3 {main} thrown in gallery/include/smarty/libs/sysplugins/smarty_internal_debug.php on line 200

Hope this helps.

Offline

 

#4 2020-11-26 16:32:35

erAck
Only trying to help
2015-09-06
2035

Re: Error when going to page 2

tazattitude wrote:

Anyways, I uploaded 2-10-2 include/functions_url.inc.php on both and now both galleries work fine.

I wouldn't do that, it lacks functionality now necessary for 11.0.0beta5 or may interfere otherwise; use either a complete package of 2.10.2 or 11.0.0beta5, but not a mix.

I compared and the beta 11 and 2-10-2 are not the same on line 440

Beta 11 line 440
  and strpos($tokens[$next_token], 'start-')!==0

2-10-2
if (preg_match('/^(\d+)(?:-(.+))?$/', $tokens[$next_token], $matches))

So 'something' has changed

Of course you can't compare the line content of a specific line between two different versions. What I meant is the content of line 440 that 11.0.0beta5 is stuck in is present in all versions for 13 years, in 2.10.2 it's just on line 426 but the functionality is the same. Whatever makes it fail now..


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact