Fatal error: Call to undefined function mysql_connect() in

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

Moderators: Developers, Moderators

Post Reply
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Fatal error: Call to undefined function mysql_connect() in

Post by cc »

hi

since yesterday I try to install cacti-0.8.6b on freeBSD 5.3, but it doesn't work.

I get on the browser following error:

Code: Select all

Fatal error: Call to undefined function mysql_connect() in
 /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 323
I did all these steps correctly:

Code: Select all

1: Create the MySQL database
# mysqladmin --user=root create cacti
2: Create a mysql user/password for cacti
# echo "CREATE DATABASE cacti;
GRANT ALL ON cacti.* TO cactiuser at localhost IDENTIFIED BY 'cactiuser';
FLUSH PRIVILEGES;" | mysql &&
3: Import the default cacti database
# mysql cacti < /usr/local/share/cacti/cacti.sql
4: Edit your config.php
Specify the MySQL user, password and database for
your cacti configuration.
5: Add a line to your /etc/crontab file similar to:
*/5 * * * * cacti /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/null 2>&1
6: Point your web browser to the cacti dir and login with admin/admin
and of course I changed config.php

from the comman line I can connect to mysql using cactiuser and password without any problems:

Code: Select all

bsd# mysql -u cactiuser -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.1.9

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

could be a problem of mysql-client-4.1.9 ?
I have mysql 4.1 installed.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You need to search the forum for MySQL specific installation instructions relative to MySQL 4.1.x. There are quite a few examples. We will be updating the documentation in the next release. Until then, this forum will be your best friend.

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?
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Post by cc »

thanks,

but I cannot find.
can someone post a link, please ?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by 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?
mike776
Posts: 8
Joined: Sat May 29, 2004 10:35 am

change your host name

Post by mike776 »

cc all you have to do is go to your apache config file httpd.conf and change your host name to the real host name you using now. As you see from the error you getting

Code: Select all

 this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword);
one of those tree aruments is not right.
8)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests