Piwigo.org

You are not logged in. (Register / Login)

Announcement

#1 2016-03-01 00:27:55

Sharon
Member
Location: Louisville, KY, USA
Registered: 2016-03-01
Posts: 10

Piwigo and MySQL 5.7.11

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

 

#2 2016-03-01 03:51:07

jnashpiwigo
Member
Registered: 2014-10-21
Posts: 129

Re: Piwigo and MySQL 5.7.11

How about posting the errors, issues, and/or description of what's 'not worked'  Would be helpful in providing you with some guidance.

Offline

 

#3 2016-03-01 06:15:46

Sharon
Member
Location: Louisville, KY, USA
Registered: 2016-03-01
Posts: 10

Re: Piwigo and MySQL 5.7.11

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:

Code:

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

 

#4 2016-03-01 07:05:34

ddtddt
Piwigo Team
Location: Quetigny - France
Registered: 2007-07-27
Posts: 6621

Re: Piwigo and MySQL 5.7.11

Hi :-)

Can you look in your database if table exist ?


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#5 2016-03-01 07:12:41

Sharon
Member
Location: Louisville, KY, USA
Registered: 2016-03-01
Posts: 10

Re: Piwigo and MySQL 5.7.11

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

 

#6 2016-03-01 07:42:49

ddtddt
Piwigo Team
Location: Quetigny - France
Registered: 2007-07-27
Posts: 6621

Re: Piwigo and MySQL 5.7.11

Hi :-)

Can you test rename file local/database.inc.php to olddatabase.inc.php


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#7 2016-03-01 13:42:41

Sharon
Member
Location: Louisville, KY, USA
Registered: 2016-03-01
Posts: 10

Re: Piwigo and MySQL 5.7.11

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

 

#8 2016-03-01 23:03:46

Jonathan Larsen
Guest

Re: Piwigo and MySQL 5.7.11

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

 

#9 2016-03-02 14:33:56

plg
Piwigo Team
Location: Nantes, France, Europe
Registered: 2002-04-05
Posts: 12983
Website

Offline

 

#10 2016-03-03 16:00:56

Sharon
Member
Location: Louisville, KY, USA
Registered: 2016-03-01
Posts: 10

Re: Piwigo and MySQL 5.7.11

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:

Code:

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:

Code:

`date_available` datetime NOT NULL default '0000-00-00 00:00:00',

Elegantly change to this:

Code:

`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

 

#11 2016-03-03 16:23:58

Sharon
Member
Location: Louisville, KY, USA
Registered: 2016-03-01
Posts: 10

Re: Piwigo and MySQL 5.7.11

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:

Code:

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

 

#12 2016-03-08 01:24:49

Sharon
Member
Location: Louisville, KY, USA
Registered: 2016-03-01
Posts: 10

Re: Piwigo and MySQL 5.7.11

Anyone have any time/help they could offer?

Offline

 

#13 2016-03-08 19:22:35

Zentalquabula
Member
Registered: 2014-05-10
Posts: 58

Re: Piwigo and MySQL 5.7.11

Code:

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

Code:

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

 

#14 2016-03-20 23:13:42

Sharon
Member
Location: Louisville, KY, USA
Registered: 2016-03-01
Posts: 10

Re: Piwigo and MySQL 5.7.11

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

 

#15 2016-03-22 00:20:17

Zentalquabula
Member
Registered: 2014-05-10
Posts: 58

Re: Piwigo and MySQL 5.7.11

Then set sql_mode="" in my.cnf

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2017 · Contact