newbie that doesn't know what he's broken!

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

Moderators: Developers, Moderators

Post Reply
smokey
Posts: 5
Joined: Thu Oct 31, 2002 7:44 am

newbie that doesn't know what he's broken!

Post by smokey »

:oops:

Fatal error: Call to undefined function: mysql_connect() in /usr/local/www/cacti/include/database.php on line 19

I have no idea how to fix this, total newbie to mysql, and cacti - any pointer towards something that could help me fix, or a direct answer (in plainish english) would be greatfully accepted :-)

I believe I have added the username cactiuser to the mysql database. and the cron job is working every 5 minutes, I just can't log into it to actually configure it - getting the above error. . . to someone that knows what they're doing its probably totally obvious.. but not to me yet :-(

jim
Guest

Post by Guest »

You should check the include/config.php to for the proper $database, $username, $password settings.
smokey
Posts: 5
Joined: Thu Oct 31, 2002 7:44 am

Post by smokey »

Anonymous wrote:You should check the include/config.php to for the proper $database, $username, $password settings.
Howdy,

Yerp, I have checked this.. and it is the same as what I've added to mysql, with the grant function, according to http://www.mysql.com/doc/en/Adding_users.html

Any more suggestions? :-)

jim
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

The error message says that mysql_connect() is undefined. This probably means that php has been compiled without mysql support. If you use RPM based PHP package you need to install php-mysql RPM as well. If you cumpile PHP by yourself then add --with-mysql option to configure script.

- bulek
smokey
Posts: 5
Joined: Thu Oct 31, 2002 7:44 am

Post by smokey »

bulek wrote:The error message says that mysql_connect() is undefined. This probably means that php has been compiled without mysql support. If you use RPM based PHP package you need to install php-mysql RPM as well. If you cumpile PHP by yourself then add --with-mysql option to configure script.

- bulek
Howdy,

I'm using freebsd 4.3 (stable), and installed php4 via the ports collection (/usr/ports/lang/php4) . . in the installation script there, I did select mysql support . . .

Next suggestion? :-)
jim
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

Well... I insist on fact you don't have PHP support for MySQL in place. Can you make a test page with the following contents:

Code: Select all

<?php
echo phpinfo();
?>
Load it into your browser and check if MySQL module is loaded and working properly.

- bulek
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests