Piwigo update -> Database dump -> include history -> Fatal #609

Closed
opened 2026-10-05 00:07:05 +02:00 by adam · 5 comments
Owner
<br />
<b>Fatal error</b>:  Uncaught Error: Call to undefined function mysql_select_db() in /raid/www/piwigo-old/admin/include/mysqldump.php:75
Stack trace:
#0 /raid/www/piwigo-old/admin/include/mysqldump.php(66): MySQLDump-&gt;setDatabase('pog')
#1 /raid/www/piwigo-old/admin/include/updates.class.php(314): MySQLDump-&gt;__construct('pog', '/raid/www/piwig...', false, false)
#2 /raid/www/piwigo-old/admin/updates_pwg.php(134): updates::dump_database(true)
#3 /raid/www/piwigo-old/admin/updates.php(43): include('/raid/www/piwig...')
#4 /raid/www/piwigo-old/admin.php(301): include('/raid/www/piwig...')
#5 {main}
  thrown in <b>/raid/www/piwigo-old/admin/include/mysqldump.php</b> on line <b>75</b><br />

Ubuntu server:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.15-0ubuntu0.16.04.4, Copyright (c) 1999-2017, by Zend Technologies

```html <br /> <b>Fatal error</b>: Uncaught Error: Call to undefined function mysql_select_db() in /raid/www/piwigo-old/admin/include/mysqldump.php:75 Stack trace: #0 /raid/www/piwigo-old/admin/include/mysqldump.php(66): MySQLDump-&gt;setDatabase('pog') #1 /raid/www/piwigo-old/admin/include/updates.class.php(314): MySQLDump-&gt;__construct('pog', '/raid/www/piwig...', false, false) #2 /raid/www/piwigo-old/admin/updates_pwg.php(134): updates::dump_database(true) #3 /raid/www/piwigo-old/admin/updates.php(43): include('/raid/www/piwig...') #4 /raid/www/piwigo-old/admin.php(301): include('/raid/www/piwig...') #5 {main} thrown in <b>/raid/www/piwigo-old/admin/include/mysqldump.php</b> on line <b>75</b><br /> ``` Ubuntu server: Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.15-0ubuntu0.16.04.4, Copyright (c) 1999-2017, by Zend Technologies <!-- github-sync-id:225760457 -->
adam closed this issue 2026-10-05 00:07:05 +02:00
Author
Owner

I get the same message.

Piwigo version
Piwigo 2.8.6
Check for upgrade
Subscribe klaus_edwin@hotmail.com to Piwigo Announcements Newsletter

Environment
Operating system: Linux ubuntu 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 x86_64
PHP: 7.0.18-0ubuntu0.16.04.1 (Show info) [2017-06-25 19:44:58]
MySQL: 5.7.18-0ubuntu0.16.04.1-log [2017-06-25 19:44:58]
Graphics Library: GD 2.1.1

I get the same message. Piwigo version Piwigo 2.8.6 Check for upgrade Subscribe klaus_edwin@hotmail.com to Piwigo Announcements Newsletter Environment Operating system: Linux ubuntu 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 x86_64 PHP: 7.0.18-0ubuntu0.16.04.1 (Show info) [2017-06-25 19:44:58] MySQL: 5.7.18-0ubuntu0.16.04.1-log [2017-06-25 19:44:58] Graphics Library: GD 2.1.1 <!-- github-comment-id:310917112 -->
Author
Owner

It seams that mysql_select_db() and other (mysql) methods has been deprecated and are removed from PHP 7.

Upgrading from 2.8.6 to 2.9.1 posed no problems.

It seams that mysql_select_db() and other (mysql) methods has been deprecated and are removed from PHP 7. Upgrading from 2.8.6 to 2.9.1 posed no problems. <!-- github-comment-id:319174261 -->
Author
Owner

Got the same issue. But why doesn't it have a switch to choose between MySQLi and MySQL?

Got the same issue. But why doesn't it have a switch to choose between MySQLi and MySQL? <!-- github-comment-id:345682506 -->
Author
Owner

Somes users get the same issue while updating from Piwigo 2.9 to 2.10 (of course, we force mysql instead of mysqli despite what local/config/database.inc.php says...)

I propose we simply remove this feature and simply say to the use "dump your database before any update".

Somes users get the same issue while updating from Piwigo 2.9 to 2.10 (of course, we force `mysql` instead of `mysqli` despite what `local/config/database.inc.php` says...) I propose we simply remove this feature and simply say to the use "dump your database before any update". <!-- github-comment-id:539894408 -->
Author
Owner

I encountered the same error. Here are my details:

Piwigo 2.9.5
Operating system: Linux
PHP: 7.3.17 (Show info) [2020-05-10 16:00:31]
MySQL: 5.6.47 [2020-05-10 16:00:31]
I encountered the same error. Here are my details: Piwigo 2.9.5 Operating system: Linux PHP: 7.3.17 (Show info) [2020-05-10 16:00:31] MySQL: 5.6.47 [2020-05-10 16:00:31] <!-- github-comment-id:626404843 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#609