Problem with Win32 install

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

Moderators: Developers, Moderators

clydew4
Posts: 9
Joined: Wed Apr 17, 2002 10:49 am
Location: Richmond, VA

Problem with Win32 install

Post by clydew4 »

I have setup cacti according to the directions on a WinXP machine. When I try to access cacti I get the following error.

Fatal error: Call to undefined function mysql_connect() in C:\apache2\Apache2\htdocs\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 323
Wimmo
Posts: 7
Joined: Wed Sep 01, 2004 3:30 am
Location: Germany

Post by Wimmo »

clydew4,

first search the board, there you will find some tips, second, it looks like a problem with php. change php to php-win in the php path.

I had the same problem.

Regards Wimmo
Guest

php

Post by Guest »

If you are using php 5 then check that you have the variables all set. Was one missing that caused this error - cant find the message but was a month maybe two ago. Its listed in the current Manual.
Guest

Post by Guest »

clydew4

Have you resolved this yet? I have the same error trying to get Cacti working on Win2k.

I've checked all the variables and config entries. All look ok to me.

Any other help appreciated
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please insure the following:

1) Environment variable PHPRC is set to c:\php
2) Extension php_mysql.dll is NOT commented out in php.ini
3) There is no php.ini in C:\WINDOWS ? C:\WINNT

Should solve your problem.

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?
Guest

Post by Guest »

Sorry, tried that. Didn't make any difference. Same error.

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

Post by TheWitness »

Run "c:\php\php.exe -m" and post the results.

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?
Guest

Post by Guest »

Thanks for the help.

Output of php.exe -m is as follows; I can't imaging the net-snmp warnings would cause the problem. All the folders exist anyway.

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.

[PHP Modules]
bcmath
calendar
com_dotnet
ctype
dom
ftp
iconv
libxml
mysql
odbc
pcre
session
SimpleXML
snmp
sockets
SPL
SQLite
standard
tokenizer
wddx
xml
zlib

[Zend Modules]
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You need to either reinstall net-snmp without the agent or fix it's configuration via the modification of the snmp.conf file. That is what is causing the problem with the net-snmp. This is also likely causing your Cacti problem, but we can't be certain until you remove the other error message.

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?
Guest

Post by Guest »

Getting the same error as the above ppl.

Managed to solve the snmp error which appears with php -m, just comment off lines 2 n 3 in the snmp.conf

As for the mysql error everyone above's facing, think its due to using mysql newer than 4.1.1 ? Which has a new method for password hashing...

Can anyone help on this?

A simple google on the above mysql error points to this url http://dev.mysql.com/doc/mysql/en/Old_client.html

Think i resolved it by updating the cacti user id/pass on the mysqld with the OLD_PASSWORD() function.

Then i managed to setup the path for all the programs needed eg php etc.

But i'm now stuck with the initial login whereby you're suppose to login with user id admin/admin...

Tried setting the admin password to clear admin, OLD_PASSWORD('admin') or the default hash from cacti.sql, but none would work...

Any ideas?

btw mysql is 4.1.7, cacti is 0.8.6b, php is 5.0.2.

TIA.
Mad Clicker

MySQL solution

Post by Mad Clicker »

I went down the same rabbit hole. I think the trick to fixing mySQL is to do the following:

c:\mysql\bin\mysql --user=root --password mysql

update user set Password = OLD_PASSWORD('cactiuser') where User='cactiuser';

There are other ways to reset the cactiuser to the older format, but this worked for me.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok all. I had the same issue. There is a file called snmp.conf in the c:\net-snmp folder sub-tree that you need to remove the two lines intended for the agent. If you have not installed the agent, simply remove the two lines and the error messages will go away.

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?
JohnG
Posts: 4
Joined: Sun Oct 31, 2004 12:46 pm

Same issue

Post by JohnG »

Hi I'm getting the same issue here, I have checked php.ini for issues an php_mysql.dll is not commented out, fixed the snmp.conf file so php -m doesn't report any errors and I also tried the suggested pword fix for mySQL but I still get:

Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 323 .....When I browse to the web site

I'm running W2K svr SP4 with Apache2, PHP5 and mySQL 4.1.7 is there anything else I can try??

Thanks 4 ur help, Cheers J
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Alright,

Now I know what your problem is. Only thing is I don't know quite how to fix it yet. In MySql 4.1.x, the MySql guys changed the way that authentication works which breaks the php_mysql module. What you need to do is enable legacy authentication in MySQL.

Search through their knowledge base for an answer. There is a setting in MySQL Administrator for it, but for some reason it did not work for me. I ended up reverting back to 4.0.20d. There is another user tapufd@hotmail.com who seems to have it working in MySQL 4.1.7 though. I will send this post to him for comment.

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?
JohnG
Posts: 4
Joined: Sun Oct 31, 2004 12:46 pm

downgrading..

Post by JohnG »

Hi Witness, thanx 4 the quick reply, going to try 4.0.22 having tried starting mysqld-nt with the --old-passwords option (no joy) I couldn't find anything in mysqladmin, I will be interested to here if tapufd@hotmail.com has it working... cheers J
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest