Once again.... the adodb-mysql.inc.php problem

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

Moderators: Developers, Moderators

Post Reply
Herman
Posts: 21
Joined: Tue Aug 23, 2005 6:24 am

Once again.... the adodb-mysql.inc.php problem

Post by Herman »

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

Although I have found this topic already many times on the forum and reviewed the correction steps, I cannot get this resolved. All info on used software versions on Windows XP and config-files is in attached info.txt.

Please Help, as this has cost me already a few days to try getting it all to work.. :cry:

Thanks
Attachments
info.txt
(999 Bytes) Downloaded 151 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) Are you able to manually connect to your mysql database via the mysql cli?
2) Did you add the cacti username/password to your config.ph for cacti?
Herman
Posts: 21
Joined: Tue Aug 23, 2005 6:24 am

Post by Herman »

The entries I made in the \cacti\include\config.php:

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "sbews00671";
$database_username = "cacti";
$database_password = "cacti";

As for the hostname, I tried localhost, I tried the IP-address...

Connecting to Mysql via CLI is no problem:

C:\mysql\bin>mysql --user cacti --password=cacti cacti
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 40 to server version: 4.1.14-nt

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

mysql>

When I run the poller as a scheduled job, I get:

C:/net-snmp/etc/snmp/snmp.conf: line 2: Warning: Unknown token: persistentDir.
C:/net-snmp/etc/snmp/snmp.conf: line 3: Warning: Unknown token: tempFilePattern.
There are no items in your poller cache or polling is disabled. Make sure you have at least one data source created. If you do, go to 'Utilities', and select 'Clear Poller Cache'.[/b]
Last edited by Herman on Thu Sep 08, 2005 2:40 am, edited 1 time in total.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I thought PHP 5.x had support for the new MySQL passwords, but give the old client trick a shot.
Herman
Posts: 21
Joined: Tue Aug 23, 2005 6:24 am

Post by Herman »

I tried first with the actual hostname, but that seems to be a problem. When I used 'localhost', it worked.


mysql> set password for
-> 'cacti'@'sbews00671' = OLD_PASSWORD('cacti');
ERROR 1133 (42000): Can't find any matching row in the user table
mysql> set password for
-> 'cacti'@'localhost' = OLD_PASSWORD('cacti');
Query OK, 0 rows affected (0.02 sec)

mysql> flush privileges;µ
Query OK, 0 rows affected (0.01 sec)

the problem still remains however.
Herman
Posts: 21
Joined: Tue Aug 23, 2005 6:24 am

Post by Herman »

As there are obviously so many issues with PHP5, I replaced it for PHP4 and this time the installation completed succesfully.

Now I need to get the poller going ...

Thanks for your comments

H.
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I use php 5.0.4 in production and have for several months with no issues.

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests