Unable to install Piwik application: Call to undefined function mysql_connect()

Created:

2016-12-12 03:48:11 UTC

Modified:

2017-08-08 13:13:35 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Unable to install Piwik application: Call to undefined function mysql_connect()

Applicable to:

  • Plesk Onyx for Linux

Symptoms

Unable to install Piwik application:

Error: The following error has occurred during the installation of application:
Installation of Piwik at http://example.com/ failed. Non-zero exit status returned by script. Output stream: 'PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /opt/psa/var/apspackages/apscatalogokRJYJ.zipfab076a2-b062-b1/cache/scripts/db-util.php:66
Stack trace:
#0 /opt/psa/var/apspackages/apscatalogokRJYJ.zipfab076a2-b062-b1/cache/scripts/app-util.php(39): mysql_db_connect('localhost:3306', 'piwik_f', 'iLJ8_7okG9', 'piwik_9')
#1 /opt/psa/var/apspackages/apscatalogokRJYJ.zipfab076a2-b062-b1/cache/scripts/app-util.php(13): import_sql_scripts_to_databases(Array, Array, Array, Array, Array, Array, Array, Array)
#2 /opt/psa/var/apspackages/apscatalogokRJYJ.zipfab076a2-b062-b1/cache/scripts/configure(100): configure(Array, Array, Array, Array, Array, Array, Array, Array, Array)
#3 {main}
thrown in /opt/psa/var/apspackages/apscatalogokRJYJ.zipfab076a2-b062-b1/cache/scripts/db-util.php on line 66
'. Error stream: 'PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /opt/psa/var/apspackages/apscatalogokRJYJ.zipfab076a2-b062-b1/cache/scripts/db-util.php:66
Stack trace:
#0 /opt/psa/var/apspackages/apscatalogokRJYJ.zipfab076a2-b062-b1/cache/scripts/app-util.php(39): mysql_db_connect('localhost:3306', 'piwik_f', 'iLJ8_7okG9', 'piwik_9')
#1 /opt/psa/var/apspackages/apscatalogokRJYJ.zipfab076a2-b062-b1/cache/scripts/app-util.php(13): import_sql_scripts_to_databases(Array, Array, Array, Array, Array, Array, Array, Array)
#2 /opt/psa/var/apspackages/apscatalogokRJYJ.zipfab076a2-b062-b1/cache/scripts/configure(100): configure(Array, Array, Array, Array, Array, Array, Array, Array, Array)
#3 {main}
thrown in /opt/psa/var/apspackages/apscatalogokRJYJ.zipfab076a2-b062-b1/cache/scripts/db-util.php on line 66

The version of PHP is set to 7.0.

Cause

The version of Piwik application which is currently available in Plesk does not support PHP 7.0.

Resolution

Switch PHP version of the website to 5.x. at Subscriptions > example.com > Websites & Domains > PHP Settings

Have more questions? Submit a request
Please sign in to leave a comment.