undefined function : mysql_connect()

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
pmtan
Posts: 1
Joined: Sun Jul 03, 2005 9:47 pm

undefined function : mysql_connect()

Post by pmtan »

guys,
after i finished the cacti configuration and open in my web page
this error appear,

Fatal error: Call to undefined function: mysql_connect() in /var/www/html/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 341

i'm using redhat 9, mysql version 4.1 and cacti 0.8.6e
can anyone help me fix this problem?

'thanks
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please run the following command from a shell:
'php -m"

Post the results. You should find a line saying "mysql" btb. No bug, not unstable. :lol: :lol:

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
jeonchl
Posts: 11
Joined: Sat Nov 19, 2005 8:33 am

Fatal error: Call to undefined function: mysql_connect() in

Post by jeonchl »

[root@localhost include]# php -m
[PHP Modules]
ctype
mysql
overload
pcre
posix
session
standard
tokenizer
xml

[Zend Modules]
soneedu
Posts: 12
Joined: Sun Nov 20, 2005 8:05 pm

Post by soneedu »

the problem is so serious but why do you correct it.
it's mine:

[PHP Modules]
bcmath
bz2
calendar
ctype
dba
dbx
exif
filepro
ftp
gettext
iconv
mbstring
mime_magic
ncurses
openssl
overload
pcntl
pcre
posix
session
shmop
snmp
sockets
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlrpc
yp
zip
zlib

[Zend Modules]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

If you're running MySQL 4.1 then you will need to apply the old password trick for user authentication to work with Cacti.
Stop the MySQL service and add the following to Start Parameter field. Start it again once it has been added.

--old-passwords


You will also need to update the cactiuser account with the old password style:

shell> UPDATE mysql.user SET Password = OLD_PASSWORD('cactipw') WHERE Host = 'localhost' AND User = 'cactiuser';
mysql> FLUSH PRIVILEGES;
soneedu
Posts: 12
Joined: Sun Nov 20, 2005 8:05 pm

Post by soneedu »

OS: Debian
mysql-client 4.0.24-10
cacti 0.8.6c-7
mysql-server 4.0.24-10
php4 4.3.10-15
libphp-adodb 4.52-1
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Soneedu,

Please edit your php.ini file and make sure the mysql extension is in use:

extension=php_mysql.so

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
rkramer
Cacti User
Posts: 54
Joined: Fri Jun 03, 2005 12:25 pm

Post by rkramer »

set up a php page that just has php_info() in it, and check for mysql there. The php running via command line isn't neccessarily the same that the web server is running, it is possible to have entirely different versions in the right (wrong) setup.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests