Announcement

#1 2017-09-08 21:18:13

divedj
Member
2017-09-05
19

[resolved] Update from Piwigo 2.8.6 to 2.9.1

Hello/Hi/Greetings,

I an trying to update to Piwigo 2.9.1. Out of previous experiences I try to backup the database using the Dump database function prior the upgrade.

The result is:

Fatal error: Uncaught Error: Call to undefined function mysql_select_db() in /home/photoandcrochet/public_html/admin/include/mysqldump.php:75 Stack trace: #0 /home/photoandcrochet/public_html/admin/include/mysqldump.php(66): MySQLDump->setDatabase('photoandcrochet...') #1 /home/photoandcrochet/public_html/admin/include/updates.class.php(314): MySQLDump->__construct('photoandcrochet...', '/home/photoandc...', false, false) #2 /home/photoandcrochet/public_html/admin/updates_pwg.php(134): updates::dump_database(true) #3 /home/photoandcrochet/public_html/admin/updates.php(43): include('/home/photoandc...') #4 /home/photoandcrochet/public_html/admin.php(301): include('/home/photoandc...') #5 {main} thrown in /home/photoandcrochet/public_html/admin/include/mysqldump.php on line 75

Trying the upgrade without the database backup ends with an internal server error. Database backup been done through phpMyAdmin.

Thanks a lot for any ideas.

Piwigo version:  2.8.6
PHP version:      7.0
MySQL version:  5.7.19
Piwigo URL: http://photoandcrochet.com

Offline

 

#2 2017-09-09 02:58:51

flop25
Piwigo Team
2006-07-06
7037

Re: [resolved] Update from Piwigo 2.8.6 to 2.9.1

well you did the backup from phpmyadmin (the best way) so what's the problem?


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2017-09-09 12:38:01

divedj
Member
2017-09-05
19

Re: [resolved] Update from Piwigo 2.8.6 to 2.9.1

Ok, I re-frase the question since it is not 100% clear.

1. The database backup within the update tab from Piwigo 2.8.6 to 2.9.1 simple doesnt worg it ends with the Fatal Error described above.

2. The update itself stops wit a internal server error.

Simply I can't update????????????????

Offline

 

#4 2017-09-11 19:11:11

divedj
Member
2017-09-05
19

Re: [resolved] Update from Piwigo 2.8.6 to 2.9.1

Never mind the automatic update within Piwigo 2.8.6 even it would be nice if it would work, I went to manual update and since I don't really really want to experiment with my working website, I created a test site under djsphotoart.ddns,net.

What I have done so far:

1. Using phpMyadmin, creating a backup of my working database:
2. Created a database at the test-site and restored the tables from the backup file.
3. I uploaded and unzipped the Piwigo 2.9.1.zip file
4. I removed the directories local, plugins, upload, galleries and template-extention from the new 2.9.1 installation.
5. I copied the in point 4 mentioned directories from the working 2.8.6 installation to the new 2.0 installation.
6. Since the login credentials for the new database are different, I edited the file /local/config/database.inc.php in a text editor to match the login credentials for the new database.
7. I accessed my new piwigo 2.9.1 installation bringing up a page asking if you want to update. I answered with yes, Which brought up a message that my database is up to date and no update is needed.
8. I accessed the admin panel and fond a MySql error message on top. I ignored it for time being and reinstalled the theme I am using and various plugins which where missing.
9. Since the MySql error messages presisted I went to Admin panel and run optimize and repair database with a presisting MySql error message:

Warning: [mysql error 1054] Unknown column 'last_visit' in 'field list'

UPDATE piwigo_user_infos
SET last_visit = NOW(),
lastmodified = lastmodified
WHERE user_id = 1
in include/dblayer/functions_mysqli.inc.php on line 845

Looking at the table fields, I found that on various date/time fields the default value is 0000-00-00 00:00:00. Changing this to default CURRENT_TIMESTAMP removes the MySqul error
Some othe date fields had a default value of 0000-00-00. Changing this to 2000-01-01 removes the MySql error for this table.

Now I am left with the following error on every gallery page;

Warning: [mysql error 1054] Unknown column 'last_visit' in 'field list'

UPDATE piwigo_user_infos
SET last_visit = NOW(),
lastmodified = lastmodified
WHERE user_id = 1
in include/dblayer/functions_mysqli.inc.php on line 845

Looking again in the database using phpMyadmin, the table "piwigo_user_infos" doesn't exist in the database.

Question:

Are there some passages in the source code which can be commented out? If yes, which parts and where?

If not, is it possible to get a complete database structure to recreate the missing table.

Thanks a lot.

Offline

 

#5 2017-09-11 19:45:35

flop25
Piwigo Team
2006-07-06
7037

Re: [resolved] Update from Piwigo 2.8.6 to 2.9.1

Hi again
point 4 is not needed. The Piwigo zip provided is perfectly safe

we have an issue with mysql 5.7 and the 0000-00-00 format (but just like many website) . We are solving one by one the issues coming from it

Then

Warning: [mysql error 1054] Unknown column 'last_visit' in 'field list'

UPDATE piwigo_user_infos
SET last_visit = NOW(),
lastmodified = lastmodified
WHERE user_id = 1
in include/dblayer/functions_mysqli.inc.php on line 845

means that

Looking again in the database using phpMyadmin, the table "piwigo_user_infos" doesn't exist in the database

is wrong or you would have a different error

The " Unknown column 'last_visit' in 'field list' " comes again from the 0000-00-00 format
The solution seems to be to ALTER all Date columns to 1970-01-01 00:00:00 as a default value, then do the update
https://www.kernel-error.de/kernel-erro … ade-fehler


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#6 2017-09-11 20:23:27

divedj
Member
2017-09-05
19

Re: [resolved] Update from Piwigo 2.8.6 to 2.9.1

Thank you for your reply,

   

flop 25 wrote:

Looking again in the database using phpMyadmin, the table "piwigo_user_infos" doesn't exist in the database

    is wrong or you would have a different error

flop 25, you are right, I just fond the table. For some reason on the left side in phpMyadmin I cant scroll down to so far to see the last tables. I had to open the complete database structure in the main window. The time problem is solved. However, there is still the problem with 2 missing columns in piwigo user infos table.

To solve this problem, I found the complete database structure in the install folder  and pretty much in the end under Create table 'piwigo_user_infos' are all columns with values. So I just added to columns to the table with the respective values and all Errors are gone. Piwigo 2.9.1 is running.

Thanks a lot. Sometimes small hints can make a very big difference!!

Offline

 

#7 2017-09-11 23:26:12

flop25
Piwigo Team
2006-07-06
7037

Re: [resolved] Update from Piwigo 2.8.6 to 2.9.1

Sorry about this mess with the date default values and thank you
Have a good day


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

Board footer

Powered by FluxBB

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