error message when using cacti for the first time

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

error message when using cacti for the first time

Post by scavenger67 »

Hi all, i got the following error message when trying to open the web page http://localhost/cacti :

Fatal error: Call to undefined function mysql_connect() in C:\Apache2\htdocs\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 338

i check all the settings, everything is correct. any idea ?

Thanks
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Two possible problems....
  1. Php does not have mysql support turned on or installed
  2. Invalid username, password, and/or server combination in the include/config.php file.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

Post by scavenger67 »

i've checked that mysql was installed by executing php -m. mysql is present.

i've try also to conenct to mysql using mysql --user=cactiuser@localhost --password : conenction is working with the password i've put. file config.php is also good ( i leave the default one )
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Change you database server from localhost to the either the network cards IP address, your hosts name, or the loopbacks IP address. Mysql is probably attempting to use a Unix socket, because the database server is set to localhost. And you aren't running unix. :)
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

Post by scavenger67 »

i changed the hostname in config.php and now i have this error message :

Warning: mysql_connect() [function.mysql-connect]: Host 'xxxx' is not allowed to connect to this MySQL server in C:\Apache2\htdocs\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339
scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

Post by scavenger67 »

ok. found the problem. hostname is not working. but loopback ip adresse is fine !
thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest