Hello,
i read an interesting article about the smart albums plugin and wanted to try, so i installed and activated it, and i created 1 smart album.
now when i try to go to the admin pages i get this, error, so i can not get in,
i need some help to get back in admin pages, so i can disable this plugin, and get everything back to working normally.
Warning: [mysql error 1104] 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
SELECT
COUNT(DISTINCT(image_id))
FROM piwigo_image_category
; in /customers/d/f/f/peterjansen.one/httpd.www/photos/include/dblayer/functions_mysqli.inc.php on line 847
Fatal error: Uncaught Error: Call to a member function fetch_row() on bool in /customers/d/f/f/peterjansen.one/httpd.www/photos/include/dblayer/functions_mysqli.inc.php:216 Stack trace: #0 /customers/d/f/f/peterjansen.one/httpd.www/photos/admin/include/functions.php(3332): pwg_db_fetch_row(false) #1 /customers/d/f/f/peterjansen.one/httpd.www/photos/admin.php(304): count_orphans() #2 {main} thrown in /customers/d/f/f/peterjansen.one/httpd.www/photos/include/dblayer/functions_mysqli.inc.php on line 216
i am using the latest piwigo, is it 14.5 ?
i can no longer see environment details, sorry !
Piwigo URL: http://peterjansen.one/photos
thanks for any help....
Offline
Either edit your Piwigo's local/config/config.inc.php and add
$conf['show_php_errors_on_frontend'] = false;
that may already help to get pages functional again.
Or from command line or file manager remove the plugins/SmartAlbums directory and content to kill it hard.
Offline
thanks for the quick response,
option 1,
i tried, and after i added the line :
$conf['show_php_errors_on_frontend'] = false;
i now get a white page when i go to admin, so indeed, it no longer shows the error, but it does not work either :)
so i tried option 2:
i removed the whole smartalbum folder from the plugins, but i still get the same error.
when i read the error again, it says what to do :
i guess i need to add this option SET SQL_BIG_SELECTS=1 , in one of the files, but in which one ??,
i tried in functions_mysqli.inc.php, but then the whole page stopped working, so i removed it again
/include/dblayer/functions_mysqli.inc.php on line 847
please advise ??
Offline
i found out, that if i comment out this portion of admin.php, it works again :
// 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&filter=prefilter-no_album',
// )
// );
environment details, i am able to view now as well:
Piwigo 14.5.0 Check for upgrade
Installed on 28 October 2020, 3 years 9 months 2 weeks 3 days ago
Operating system: Linux
PHP: 8.0.30 (Show info) [2024-08-15 16:07:49]
MySQL: 10.6.17-MariaDB-1:10.6.17+maria~ubu2204 [2024-08-15 16:07:49]
Graphics Library: ImageMagick 6.9.11-60
Cache size 0 Mo calculated 11 months ago Refresh
i only have about 5000 photos, so that should be no issue ?
so i guess i have orphaned photos ?
how to find out ?
Offline