Announcement

#1 2019-10-09 08:39:00

dersou
Member
2019-10-09
2

"Call to undefined function mysql_select_db" when upgrading to 2.10.0

Hello,

I just tried to upgrade from 2.9.5 to 2.10.0. When trying to dump the database from the "Piwigo Update" tab (with or without including history data) I got the following error:

Code:

Fatal error: Uncaught Error: Call to undefined function mysql_select_db() in /some/path/htdocs/admin/include/mysqldump.php:75 Stack trace: #0 /some/path/htdocs/admin/include/mysqldump.php(66): MySQLDump->setDatabase('piwigo') #1 /some/path/htdocs/admin/include/updates.class.php(481): MySQLDump->__construct('piwigo', '/some/path...', false, false) #2 /some/path/htdocs/admin/updates_pwg.php(106): updates::dump_database(true) #3 /some/path/htdocs/admin/updates.php(43): include('/some/path...') #4 /some/path/htdocs/admin.php(312): include('/some/path...') #5 {main} thrown in /some/path/htdocs/admin/include/mysqldump.php on line 75

I checked again my

Code:

local/config/database.inc.php

and yes,

Code:

$conf['dblayer'] = 'mysqli';

Apparently some parts of piwigo are not properly handling php 7. Shall I backup my database by other means and upgrade from the "Piwigo Update" tab or is there a risk that I hit some other pre-php-7 constructs and ruin my instance?

Best regards.

Piwigo version: 2.9.5
PHP version: 7.3.0
MySQL version: 5.7.23-23-log

Offline

 

#2 2019-10-09 10:20:53

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: "Call to undefined function mysql_select_db" when upgrading to 2.10.0

Thanks for the report.

I think we're going to drop this feature. Instead of proposing a 1-click to dump your database, Piwigo will simply say "Create a safe backup (dump) of your database before any update".

Offline

 

#3 2019-10-09 10:23:28

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: "Call to undefined function mysql_select_db" when upgrading to 2.10.0

Offline

 

#4 2019-10-09 13:40:44

dersou
Member
2019-10-09
2

Re: "Call to undefined function mysql_select_db" when upgrading to 2.10.0

Problem solved

OK, thanks. I did my backup with phpMyAdmin and updated without further difficulties. And yes, I agree, better get rid of this feature if it cannot be fixed properly: it could be that some users decide to move to another simpler tool when encountering for the first time this kind of intimidating error.

Offline

 

Board footer

Powered by FluxBB

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