Problem with Win32 install
Moderators: Developers, Moderators
Problem with Win32 install
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
Fatal error: Call to undefined function mysql_connect() in C:\apache2\Apache2\htdocs\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 323
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Run "c:\php\php.exe -m" and post the results.
TheWitness
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?
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?
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]
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]
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
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.
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.
MySQL solution
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.
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.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
Same issue
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
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
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
downgrading..
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
Who is online
Users browsing this forum: No registered users and 1 guest