good evening!
I am attempting to install Piwigo but am unable to complete it due to database errors. I have MySQL 5.7.11 and cannot find any suggestions on how to successfully install Piwigo with this version of MySQL. I tried searching here but haven't found anything specific. Any help?
Piwigo version: 2.7.4
PHP version: 5.5.30
MySQL version: 5.7.11
Piwigo URL: no successful install yet
Offline
How about posting the errors, issues, and/or description of what's 'not worked' Would be helpful in providing you with some guidance.
Offline
Upon performing an install, I get a blank white screen after entering database information. If I refresh the page, I get the message, "Piwigo is already installed."
When I try to load the installed Piwigo URL, I get this:
Warning: [mysql error 1146] Table 'piwigo.piwigo_sessions' doesn't exist SELECT data FROM piwigo_sessions WHERE id = '7F00i3vn3593opd7thokfg3d7h1pv2' ; in /piwigo/include/dblayer/functions_mysqli.inc.php on line 830 Warning: [mysql error 1146] Table 'piwigo.piwigo_user_infos' doesn't exist 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 /piwigo/include/dblayer/functions_mysqli.inc.php on line 830 Fatal error: Call to a member function fetch_assoc() on a non-object in /piwigo/include/dblayer/functions_mysqli.inc.php on line 211 Warning: [mysql error 1146] Table 'piwigo.piwigo_sessions' doesn't exist REPLACE INTO piwigo_sessions (id,data,expiration) VALUES('7F00i3vn3593opd7thokfg3d7h1pv2','',now()) ; in /piwigo/include/dblayer/functions_mysqli.inc.php on line 830
This happens with both a net install and a manual install. My research tells me there's something about the way tables are being created that does not work with MySQL 5.7.11. Please advise.
Last edited by Sharon (2016-03-06 13:17:33)
Offline
Hi :-)
Can you look in your database if table exist ?
Online
It doesn't exist. During the installation, I get a white screen instead of a confirmation that installation completed. Something about the way the tables are being asked to be created doesn't work with MySQL 5.7.11.
Offline
Hi :-)
Can you test rename file local/database.inc.php to olddatabase.inc.php
Online
I didn't see that file in the /local directory, but it was in local/config directory. I renamed the file to olddatabase.inc.php and when I went back to the Piwigo URL, it asked me to set it up again. I entered the database and admin user information, and I again got the white screen and the same error messages.
The tables it mentions in the errors (see above) do not exist in the database. Here is all I have:
piwigo_caddie
piwigo_categories
piwigo_config
piwigo_favorites
piwigo_groups
piwigo_group_access
piwigo_history_summary
piwigo_image_category
piwigo_image_tag
piwigo_languages
piwigo_plugins
piwigo_search
piwigo_sites
piwigo_tags
piwigo_themes
piwigo_users
piwigo_user_access
piwigo_user_cache
piwigo_user_cache_categories
piwigo_user_feed
piwigo_user_group
piwigo_user_mail_notification
For some reason, I don't think MySQL 5.7.11 can create the tables as they are described in the install, but I don't know why. Please help.
Offline
I have this same exact issue... Any help would be great. I feel like I have tried just about everything. I tried adding those missing tables manually, but then got to a column error. My first time, so I am looking forward to trying this out... if I can just get past this darn table issue.
Thanks for any help,
~ Jonathan
Thank you for sharing that other forum submission! So far, my install seems to be working well!
For Jonathan in particular, here's what I did before installing:
First off, you'll need to perform a download and manual install instead of the net install. I downloaded the most recent release and extracted it.
Find the 'piwigo_structure-mysql.sql' file located in the 'install' directory. Open it and make the following changes:
Find/Replace: default '0000-00-00 00:00:00' default '00:00:00' default '0000-00-00 00:00:00'
Run each line separately and include a space before the word 'default'. This will ensure that lines like this:
`date_available` datetime NOT NULL default '0000-00-00 00:00:00',
Elegantly change to this:
`date_available` datetime NOT NULL,
I then went to my URL for the Piwigo install, and all went well this time!
If anyone would rather request the edited SQL file from me, I'll gladly supply it to anyone who asks. In the meantime, I'm going to continue testing and will report back if I notice any other problems.
Offline
OK, uploading of images worked well. "date available" and "date creation" fields were populated in the table when they were added. However, I cannot view any albums other than what shows on the front page. Here is the error I'm getting:
Warning: [mysql error 3065] Expression #1 of ORDER BY clause is not in SELECT list, references column 'piwigo.piwigo_images.date_available' which is not in SELECT list; this is incompatible with DISTINCT SELECT DISTINCT(image_id) FROM piwigo_image_category INNER JOIN piwigo_images ON id = image_id WHERE category_id = 1 ORDER BY date_available DESC, file ASC, id ASC ; in /piwigo/include/dblayer/functions_mysqli.inc.php on line 830 Fatal error: Call to a member function fetch_assoc() on a non-object in /piwigo/include/dblayer/functions_mysqli.inc.php on line 891
I'm not sure exactly how to edit the query to change the part that's being called incompatible.
Offline
Anyone have any time/help they could offer?
Offline
SELECT DISTINCT(image_id) FROM piwigo_image_category INNER JOIN piwigo_images ON id = image_id WHERE category_id = 1 ORDER BY date_available DESC, file ASC, id ASC
must be rewritten as
SELECT DISTINCT(image_id) FROM (SELECT * FROM piwigo_image_category INNER JOIN piwigo_images ON id = image_id WHERE category_id = 1 ) AS t ORDER BY date_available DESC, file ASC, id ASC
That is the only change necssary for compliance, although there are many instances.
Offline
I'm not able to get that to work properly, either. I've found three instances in two files, section.init.inc.php and batch_manager.php.
Offline
Then set sql_mode="" in my.cnf
Offline