mysql_pconnect and adodb-mysql.inc.php on line 355
Moderators: Developers, Moderators
mysql_pconnect and adodb-mysql.inc.php on line 355
I installed cacti with php 5 and mysql 5 with dll extensions.
For this moment, I get nothing except the following error :
Fatal error: Call to undefined function mysql_pconnect() in \lib\adodb\drivers\adodb-mysql.inc.php on line 355
I checked extensions with php -m and mysql, mysqli, snmp, sockets are loaded.
And with other post, I did the trick with old_password.
Thanks in advance for your help
For this moment, I get nothing except the following error :
Fatal error: Call to undefined function mysql_pconnect() in \lib\adodb\drivers\adodb-mysql.inc.php on line 355
I checked extensions with php -m and mysql, mysqli, snmp, sockets are loaded.
And with other post, I did the trick with old_password.
Thanks in advance for your help
1) You did the old password trick and you're still getting the error?
2) You sure you enabled old-passwords when mysql wasnt running?
3) Did you update the password AFTER you enabled old-passwords?
4) Restarted the computer?
2) You sure you enabled old-passwords when mysql wasnt running?
3) Did you update the password AFTER you enabled old-passwords?
4) Restarted the computer?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Okay ... rebooted a few times and no go ... tryied logging on to mysql from the shell just to make sure the user and password were correct and they were. I don't see any 'rejections' in the MySQL logs -- maybe I'm looking in the wrong place though or don't have the proper debug level(s) defined. Filemon doesn't show any denys either. Here are the specs:
Operating System: Win2k3 Server SP1 Patched
Webserver: IIS6.0 Patched
Cacti: latest (h) Patched
Cactid: latest
MySQL: latest v5
PHP: latest v5
RRDTool: latest
Net-SNMP: latest
Cygwin: lastest
Basically, everything was downloaded either last night or this morning.
I even tried using the root user in config.php (after giving it an OLD_PASSWORD too) and no go. What am I missing? I've gone over the guide probably a dozen times and I'm completely stumped.
Thanks in advance.
Operating System: Win2k3 Server SP1 Patched
Webserver: IIS6.0 Patched
Cacti: latest (h) Patched
Cactid: latest
MySQL: latest v5
PHP: latest v5
RRDTool: latest
Net-SNMP: latest
Cygwin: lastest
Basically, everything was downloaded either last night or this morning.
I even tried using the root user in config.php (after giving it an OLD_PASSWORD too) and no go. What am I missing? I've gone over the guide probably a dozen times and I'm completely stumped.
Thanks in advance.
So you did the following?
1. Stop the MySQL service, edit your c:\mysql\my.ini file, and add the following:
#Use old password encryption method (needed for 4.0 and older clients).
old-passwords
2. Start the MySQL service.
3. You will also need to update the cactiuser account with the old password style:
shell> UPDATE mysql.user SET Password = OLD_PASSWORD('cactipw') WHERE Host = 'localhost' AND User = 'cactiuser';
mysql> FLUSH PRIVILEGES;
1. Stop the MySQL service, edit your c:\mysql\my.ini file, and add the following:
#Use old password encryption method (needed for 4.0 and older clients).
old-passwords
2. Start the MySQL service.
3. You will also need to update the cactiuser account with the old password style:
shell> UPDATE mysql.user SET Password = OLD_PASSWORD('cactipw') WHERE Host = 'localhost' AND User = 'cactiuser';
mysql> FLUSH PRIVILEGES;
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Correct; all done ... and if I load up mysqladministrator, it shows that 'Old passwords' mode is checked on.BSOD2600 wrote:So you did the following?
1. Stop the MySQL service, edit your c:\mysql\my.ini file, and add the following:
#Use old password encryption method (needed for 4.0 and older clients).
old-passwords
2. Start the MySQL service.
3. You will also need to update the cactiuser account with the old password style:
shell> UPDATE mysql.user SET Password = OLD_PASSWORD('cactipw') WHERE Host = 'localhost' AND User = 'cactiuser';
mysql> FLUSH PRIVILEGES;
I also did it for 'root' just in case. I also did the following command to make sure I did it correctly.
SELECT Host, User, Password FROM mysql.user
-> WHERE LENGTH(Password) > 16;
Results were 0 matches ... sooo ...
Is there a way to test solely the authentication? It seems to me that the code being referenced is just trying to connect to MySQL and it is failing for some reason. While this is normally due to 'Old Passwords', it could very well be due to something else.
It looks like the user information being used is that found in ./include/config.php, is that correct?
If I use that user information to logon via mysql --user=cactiuser --password cacti, I am able to logon to do SELECT's, etc without issue.
Could there be something else preventing communication from IIS via the Script/PHP to MySQL? Is there some test script that can be used solely for checking the authentication methods/etc?
Filemon indicates no 'denied' messages.
Can PHP be run in interactive mode? If so, what commands would I use to test this connection state to MySQL? If someone has a PHP script that we can load on IIS as well to test that component, that would be wonderful.
Of course, if we're all stumped, I'm willing to give someone remote access to the box for the purpose of helping me diagnose the issues.
Thoughts? Thanks in advance!
-jdg
It looks like the user information being used is that found in ./include/config.php, is that correct?
If I use that user information to logon via mysql --user=cactiuser --password cacti, I am able to logon to do SELECT's, etc without issue.
Could there be something else preventing communication from IIS via the Script/PHP to MySQL? Is there some test script that can be used solely for checking the authentication methods/etc?
Filemon indicates no 'denied' messages.
Can PHP be run in interactive mode? If so, what commands would I use to test this connection state to MySQL? If someone has a PHP script that we can load on IIS as well to test that component, that would be wonderful.
Of course, if we're all stumped, I'm willing to give someone remote access to the box for the purpose of helping me diagnose the issues.
Thoughts? Thanks in advance!
-jdg
Okay ... I got irritated and performed the following steps:
Add/Remove Programs: Uninstall MySQL v5.0.18
Delete c:\mysql
Download MySQL v4.1.18
Install MySQL v4.1.18 following BSOD2600's guide.
Configure MySQL v4.1.18 also as per BSOD2600's guide.
Old-Passwords Activated and cactiuser password reset.
Ran the following:
SELECT Host, User, Password FROM mysql.user WHERE Length(Password) > 16;
Query Returned 1 Row, for user 'root'.
--> BSOD2600 : Maybe you could add the above to the FAQ to verify that step? I pulled that right from http://dev.mysql.com/doc/refman/5.0/en/old-client.html
Attempted to connect to Cacti:
http://localhost:8082/cacti
Same Error (Blah Blah Line 355)
I am currently in the process of a reboot to see if that resets anything odd, though the MySQL Services were restarted after the old-password configuration and the Path was verified as containing c:\mysql\bin.
More to come ...
Add/Remove Programs: Uninstall MySQL v5.0.18
Delete c:\mysql
Download MySQL v4.1.18
Install MySQL v4.1.18 following BSOD2600's guide.
Configure MySQL v4.1.18 also as per BSOD2600's guide.
Old-Passwords Activated and cactiuser password reset.
Ran the following:
SELECT Host, User, Password FROM mysql.user WHERE Length(Password) > 16;
Query Returned 1 Row, for user 'root'.
--> BSOD2600 : Maybe you could add the above to the FAQ to verify that step? I pulled that right from http://dev.mysql.com/doc/refman/5.0/en/old-client.html
Attempted to connect to Cacti:
http://localhost:8082/cacti
Same Error (Blah Blah Line 355)
I am currently in the process of a reboot to see if that resets anything odd, though the MySQL Services were restarted after the old-password configuration and the Path was verified as containing c:\mysql\bin.
More to come ...
And ... the envelope please ...
It doesn't look like it's an OLD_Password problem either ... something tells me that the script simply isn't talking to the MySQL instance ... the questions are: Why? How to we verify? and how to we fix?
Here's my config.php
Sooo ... it wasn't a MySQL v5.x problem ...Fatal error: Call to undefined function mysql_pconnect() in c:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 355
It doesn't look like it's an OLD_Password problem either ... something tells me that the script simply isn't talking to the MySQL instance ... the questions are: Why? How to we verify? and how to we fix?
Here's my config.php
And if you telnet to :3306, you get a response, so I know the server is listening and accepting local connection attempts./* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactipw";
$database_port = "3306";
/* ----- you probably do not need to change anything below this line ----- */
Okay! I think I solved some problems and created more! Yeehaw! Progress is progress though, right?
Okay, a few things:
(1) I had so many things scribbled on the copy of BSOD2600's installer notes that I decided to print another copy. When I went through the new copy, I found something I missed:
---> BSOD2600 : Perhaps you can newline it or something?
(2) I was getting IIS Worker Thread closures on Windows 2003 Server. I couldn't nail them down, but I was getting all sorts of access and invalid fork errors in the PHP scripts. Finally, during one reboot, I got a PopUp from something called DTE (I think). It allowed me to reconfigure to protect against all things except what I exclude. I close the IIS Worker Process. After I rebooted again, no more Stop Errors and the fork/script errors disappeared.
(3) I was getting no graphs, but data was collecting properly and the files in /rra and /log were updating. It finally clicked:
Now, the new problems I'm having are related to certain devices. Layer3 Switches specifically (Extreme, Nortel, etc). When I add them using the generic SNMP probe, most return 0 interfaces (probably because they have 1000+). Is this a limitation of Cacti? Also, on the smaller switches, they'll show the ports described correctly but when I add graphs for them I get all sorts of | query_this | and |query_that | in their names.
Also, the Legend/Summary under the RRD Graphs is blank. I just show little dots like '-' right before you'd expect text saying This Color is This and This Color is That.
Also, is there a way to do WithPeak[] like in MRTG?
Pfew ...
Hope this helps some folks.
Okay, a few things:
(1) I had so many things scribbled on the copy of BSOD2600's installer notes that I decided to print another copy. When I went through the new copy, I found something I missed:
For some reason, it got chopped off the original printout.Under the PHP Configuration:
Add System Environment Variabel for PHPRC=c:\php
---> BSOD2600 : Perhaps you can newline it or something?
(2) I was getting IIS Worker Thread closures on Windows 2003 Server. I couldn't nail them down, but I was getting all sorts of access and invalid fork errors in the PHP scripts. Finally, during one reboot, I got a PopUp from something called DTE (I think). It allowed me to reconfigure to protect against all things except what I exclude. I close the IIS Worker Process. After I rebooted again, no more Stop Errors and the fork/script errors disappeared.
(3) I was getting no graphs, but data was collecting properly and the files in /rra and /log were updating. It finally clicked:
---> BSOD2600 : Perhaps this can be tweaked as well?The documentation says to give the IIS_WPG user access to cacti/log and cacti/rrd. I created a cacti/rrd directory during that step and gave it access. It seems there is no need for cacti/rrd ... everything is under cacti/rra.
Now, the new problems I'm having are related to certain devices. Layer3 Switches specifically (Extreme, Nortel, etc). When I add them using the generic SNMP probe, most return 0 interfaces (probably because they have 1000+). Is this a limitation of Cacti? Also, on the smaller switches, they'll show the ports described correctly but when I add graphs for them I get all sorts of | query_this | and |query_that | in their names.
Also, the Legend/Summary under the RRD Graphs is blank. I just show little dots like '-' right before you'd expect text saying This Color is This and This Color is That.
Also, is there a way to do WithPeak[] like in MRTG?
Pfew ...
Hope this helps some folks.
Glad you got it working.
As for the guide, I've updated the changes you've suggested. The /cacti/rrd is simply a typo. without looking at my cacti installation, I forget if its /rra or /rrd. RRDTool creates .rrd files in the /rra directory... nice and straight forward
As for the problems you're having, its likely related to PHP timing out when fetching all the interfaces. You're on Cacti 0.8.6h right? If you set the devices to use SNMP v2, cacti will use bulkget/walks which should speed up the process. You also should increase your php timeout in your php.ini file.
Your lack of graph text is likely because you didn't specify a font file in your rrdtool font path in cacti. If some graphs have text while others do not, then you are experianing a common rrdtool bug.
Withpeak sounds like it increases the history of the data stored? Might want to look at this guide: http://forums.cacti.net/viewtopic.php?t=11425
As for the guide, I've updated the changes you've suggested. The /cacti/rrd is simply a typo. without looking at my cacti installation, I forget if its /rra or /rrd. RRDTool creates .rrd files in the /rra directory... nice and straight forward
As for the problems you're having, its likely related to PHP timing out when fetching all the interfaces. You're on Cacti 0.8.6h right? If you set the devices to use SNMP v2, cacti will use bulkget/walks which should speed up the process. You also should increase your php timeout in your php.ini file.
Your lack of graph text is likely because you didn't specify a font file in your rrdtool font path in cacti. If some graphs have text while others do not, then you are experianing a common rrdtool bug.
Withpeak sounds like it increases the history of the data stored? Might want to look at this guide: http://forums.cacti.net/viewtopic.php?t=11425
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Fatal error: Call to undefined function mysql_pconnect() in C:\Inetpub\wwwroot\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 355
This is all I get after i install I have tried everything in this thread.
my set up is
windows 2003 Svr.SP1
Cacti0.8.h fully patched
Mysql 5.0
PHP5
Any Suggestions would help imensely
This is all I get after i install I have tried everything in this thread.
my set up is
windows 2003 Svr.SP1
Cacti0.8.h fully patched
Mysql 5.0
PHP5
Any Suggestions would help imensely
In updating some documentation, I did a clean install of win2k3 and cacti this evening. Used PHP 5.1.2 and MySQL 5.0.18. Followed the old-password stuff and cacti worked flawlessly on the first try. IMO, you really need to follow the instructions to the letter to get it working....
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 1 guest