Problems connecting to MySQL: Undefined func mysql_pconnect

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Horus
Posts: 3
Joined: Sat Apr 30, 2016 3:07 pm

Problems connecting to MySQL: Undefined func mysql_pconnect

Post by Horus »

Hello,

this is listed in the FAQ, but the answer that mysql is not loaded is not true for me. I get this error:

Code: Select all

[Sat Apr 30 22:14:07.787050 2016] [:error] [pid 23758] [client ::1:51192] PHP Fatal error:  Uncaught Error: Call to undefined function mysql_pconnect() in /usr/share/webapps/cacti/lib/adodb/drivers/adodb-mysql.inc.php:355\
Stack trace:
#0 /usr/share/webapps/cacti/lib/adodb/adodb.inc.php(470): ADODB_mysql->_pconnect('localhost', 'cactiuser', '100783', 'cacti')
#1 /usr/share/webapps/cacti/lib/adodb/adodb.inc.php(3624): ADOConnection->PConnect('localhost', 'cactiuser', '100783', 'cacti')
#2 /usr/share/webapps/cacti/lib/database.php(51): ADONewConnection('mysql')
#3 /usr/share/webapps/cacti/include/global.php(212): db_connect_real('localhost', 'cactiuser', '1234567', 'cacti', 'mysql', '3306', false)\n#4 /usr/share/webapps/cacti/include/auth.php(25): include('/usr/share/weba...')
#5 /usr/share/webapps/cacti/index.php(25): include('/usr/share/weba...')
#6 {main}
  thrown in /usr/share/webapps/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 355
cacti 0.8.8g / php 7.0.6 / apache 2.4.20 / Arch Linux

Code: Select all

# php -m | grep sql
mysqli
mysqlnd
phpinfo() also shows mysql loaded, phpMyAdmin works flawless.

I already tried loading pdo_mysql.so, but no change.

There is a bug report https://bugs.debian.org/cgi-bin/bugrepo ... bug=815987 which may be related.

What is wrong here with my setup or cacti?

Thanks!
Horus
Posts: 3
Joined: Sat Apr 30, 2016 3:07 pm

Re: Problems connecting to MySQL: Undefined func mysql_pconn

Post by Horus »

Solved, got to change in config.php

Code: Select all

$database_type = "mysql";
to

Code: Select all

$database_type = "mysqli";
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests