Hello/Hi/Greetings,
My piwigo gallery was working fine for 2 months and now i see this error. Please tell me how to restore the gallery and what causes this error
Warning: [mysql error 1017] Can't find file: './piwigo/piwigo_user_cache.MYI' (errno: 2 "No such file or directory") SELECT ui.*, uc.*, t.name AS theme_name FROM piwigo_user_infos AS ui LEFT JOIN piwigo_user_cache AS uc ON ui.user_id = uc.user_id LEFT JOIN piwigo_themes AS t ON t.id = ui.theme WHERE ui.user_id = 2 ; in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php on line 864 Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php:228 Stack trace: #0 /var/www/html/piwigo/include/functions_user.inc.php(379): pwg_db_fetch_assoc() #1 /var/www/html/piwigo/include/functions_user.inc.php(293): getuserdata() #2 /var/www/html/piwigo/include/user.inc.php(60): build_user() #3 /var/www/html/piwigo/include/common.inc.php(154): include('/var/www/html/p...') #4 /var/www/html/piwigo/index.php(11): include_once('/var/www/html/p...') #5 {main} thrown in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php on line 228
Piwigo -latest
Ubuntu server 20.04
PHP-FPM 7.4
NginX -latest
MariaDB -latest
Offline
Looks like a broken database connection or the database lacking tables, piwigo_user_cache should be a database table, but if mysql is looking for a file piwigo_user_cache.MYI instead ...
Offline
Thx for the answer!
I fixed up the gallery via "mysql> source" but I would like to understand what causes this error. Maybe I should stop using mariadb, or ...
Offline
Anrey_S wrote:
Thx for the answer!
I fixed up the gallery via "mysql> source" but I would like to understand what causes this error. Maybe I should stop using mariadb, or ...
Hy Dude can you explain more detail what you do for fix that?. from two weeks ago i have same problem. thanks
Offline
The actual mariadb/mysql database file is missing for that table. It's a database issue.
For me, "mysqlcheck database_name" showed:
gallery.activity OK
gallery.caddie OK
gallery.categories OK
gallery.comments OK
gallery.config OK
gallery.favorites OK
gallery.group_access OK
gallery.groups OK
gallery.history OK
gallery.history_summary OK
gallery.image_category OK
gallery.image_format OK
gallery.image_tag OK
gallery.images OK
gallery.languages OK
gallery.lounge OK
gallery.old_permalinks OK
gallery.plugins OK
gallery.rate OK
gallery.search OK
gallery.sessions OK
gallery.sites OK
gallery.tags OK
gallery.themes OK
gallery.upgrade OK
gallery.user_access OK
gallery.user_auth_keys OK
gallery.user_cache
Error : Can't find file: './gallery/user_cache.MYI' (errno: 2 "No such file or directory")
status : Operation failed
gallery.user_cache_categories
Error : Can't find file: './gallery/user_cache_categories.MYI' (errno: 2 "No such file or directory")
status : Operation failed
gallery.user_feed OK
gallery.user_group OK
gallery.user_infos OK
gallery.user_mail_notification OK
gallery.users OK
So I just deleted the two cache tables that were giving errors and then recreated them using the SQL code in the /install/piwigo_structure-mysql.sql file. That fixed it.
There are commands to try to repair the tables but if they are gone you have to either restore them from backup or recreate those tables.
Offline