#1 2023-12-22 07:51:55

GregP
Member
2021-07-24
8

Fatal error in Administration, cannot get in!

Hello:

I've been using Pwigo for years.  This week I upgraded to version 14.

PHP 8.2
MySQL Version: 10.10.6-MariaDB-1:10.10.6+maria~deb11

Today I uploaded 6 files and imported them to the database, they are fine and I can view them.

But when I went to update the checksums, the administration module crashed, and I cannot get into it any more!  So I can't get any environment details!

Here is the message it gives me:
--------------------------------------------
Fatal error: Uncaught mysqli_sql_exception: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay in /webroot/g/r/gregp001/pyros/www/gallery/include/dblayer/functions_mysqli.inc.php:132 Stack trace: #0 /webroot/g/r/gregp001/pyros/www/gallery/include/dblayer/functions_mysqli.inc.php(132): mysqli->query() #1 /webroot/g/r/gregp001/pyros/www/gallery/admin/include/functions.php(3328): pwg_query() #2 /webroot/g/r/gregp001/pyros/www/gallery/admin.php(304): count_orphans() #3 {main} thrown in /webroot/g/r/gregp001/pyros/www/gallery/include/dblayer/functions_mysqli.inc.php on line 132
--------------------------------------------
Piwigo URL: https://www.pyros.com

Any advise appreciated, or help translating the above error message into something I can try!

Thanks,
Greg

Offline

 

#2 2023-12-26 19:41:04

GregP
Member
2021-07-24
8

Re: Fatal error in Administration, cannot get in!

Hey, thanks to the 125 people who read my cry for help!
I figured it out myself by commenting out lines in admin.php until I got it to where 'admin' would run, then was able to get into 'maintenance' and fix it.
Happy Holidays!

Offline

 

#3 2023-12-26 19:47:13

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13864

Re: Fatal error in Administration, cannot get in!

I don't understand why the new count_orphans function would lead to such an error. Can you describe what you did to fix it?

Can you tell us how many photos you have? how many albums? did you have some orphan photos?

Offline

 

#4 2023-12-26 20:10:04

GregP
Member
2021-07-24
8

Re: Fatal error in Administration, cannot get in!

I'm not a programmer, I just flailed around in desperation trying to get it working again.

After I got 'admin.php' to run, I went into 'maintenance' and clicked on a few of the buttons like 'delete orphan tags' and such, then 'repair and optimize database', and it started running again.  Sorry, I didn't keep track, I just finished a project and was panicking because I wasn't able to add the photos to my site for viewing.

I have 3,973 photos in 182 albums and 1.4gigs of storage used.  Where can I find the number of orphans?

Here is my environment if that helps:
    Piwigo 14.0.0 Check for upgrade
    Installed on 19 August 2015, 8 years 4 months 6 days ago
    Operating system: Linux
    PHP: 8.2.6 (Show info) [2023-12-26 12:04:18]
    MySQL: 10.10.6-MariaDB-1:10.10.6+maria~deb11 [2023-12-26 19:04:18]
    Graphics Library: ImageMagick 6.9.12-89
    Cache size 1410.63 Mo   calculated 1 day ago Refresh

Offline

 

#5 2024-02-26 16:59:42

Murdock
Member
2021-11-14
7

Re: Fatal error in Administration, cannot get in!

Hi,

I just upgraded to 14.2.0...Everything went fine with the update. My site is fine...everything (albums and photos) loading ok.... (Well, I thought it was. Just drilled down to a photo...and I got error #2 below.) ...I can't get to the Admin pages.

I am getting error:
Fatal error: Uncaught Error: Call to undefined function count_orphans() in /piwigo/admin.php:304 Stack trace: #0 {main} thrown in /piwigo/admin.php on line 304

Error #2 when going to a photo:
Fatal error: Uncaught Error: Call to undefined function increase_image_visit_counter() in /piwigo/picture.php:433 Stack trace: #0 {main} thrown in piwigo/picture.php on line 433

Did my update miss an include somewhere?

I have everything backed up and I can restore...but I would like to correct and move forward. Plus...I have two more instances on the same server to update. I will hold on those.

Server Stats:
Debian Linux    11.6 (custom)
Apache            Apache/2.4.54
PHP                 7.4.33
MariaDB          10.5.18 (MySQL Compatible)

Offline

 

#6 2024-02-26 17:32:13

erAck
Only trying to help
2015-09-06
2181

Re: Fatal error in Administration, cannot get in!

Both errors make no sense if the installation went successful.


admin.php quite at the top has

include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');

and admin/include/functions.php defines function count_orphans() starting at line 3310, please check.


picture.php has

include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');

and include/functions_picture.inc.php defines function increase_image_visit_counter($image_id) starting at line 126, please check.


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

Offline

 

#7 2024-02-26 17:46:31

Murdock
Member
2021-11-14
7

Re: Fatal error in Administration, cannot get in!

I know! Right?

I just checked both of those files. They show a last update from last year when I did a full-manual-update.

I decided to get ready to do a full manual update again after I got that error at the picture level. Before I saw that error, I was thinking that maybe I had an issue with php or mySQL versions...I have had that in the past.

I will do a folder backup before I do the update. (Currently still coping the files to the server...)

Is there anything I can check on the DB side to see if that update was applied?
(I'll still follow the manual update procedure. I believe it confirms db updates before it applies them.)

Thanks for the help!
Murdock

Offline

 

#8 2024-02-26 19:25:39

Murdock
Member
2021-11-14
7

Re: Fatal error in Administration, cannot get in!

The manual full reinstall did the trick.

All good. Not sure why it told me the upgrade was successful.

Thanks for the help!
Murdock

Offline

 

#9 2024-02-27 11:17:53

erAck
Only trying to help
2015-09-06
2181

Re: Fatal error in Administration, cannot get in!

Murdock wrote:

Is there anything I can check on the DB side to see if that update was applied?

In table piwigo_upgrade the id column should have 170 as latest value.


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

Offline

 

#10 2024-08-14 15:50:59

Bilal
Member
2024-08-14
1

Re: Fatal error in Administration, cannot get in!

Hi folks,

I just got the same error and did the same to recover the easy way, just replace:

// only calculate number of orphans on all pages if the number of images is "not huge"
/*$page['nb_orphans'] = 0;

list($page['nb_photos_total']) = pwg_db_fetch_row(pwg_query('SELECT COUNT(*) FROM '.IMAGES_TABLE));
if ($page['nb_photos_total'] < 100000) // 100k is already a big gallery
{
  $page['nb_orphans'] = count_orphans();
}
*/
$template->assign(
@ array(
    'NB_ORPHANS' => $page['nb_orphans'],
    'U_ORPHANS' => $link_start.'batch_manager&amp;filter=prefilter-no_album',
    )
  );

Bye bye

Offline

 

Board footer

Powered by FluxBB

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