System: Windows XP
IIS Version: 5.1
Mysql Version: 5.0.45
Cacti Version: 0.8.7e
Had a working installation of Cacti with PHP 5.2.10. Required to upgrade to 5.3.1. Since then, haven't been able to successfully connect to my Mysql database. My PHP installation directory is C:\Program Files\PHP. Currently this houses my 5.3.1 installation. Kept the old installation directory (5.2.10) as C:\Program Files\PHP_Old. When I rename PHP_Old to PHP, my cacti installation works fine. However when I'm using PHP version 5.3.1 I get "FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php"
Nothing has changed in my database (database name, database user, or password)
From what I've read, PHP 5.3.1 no longer supports old-password hashing, which I believe is required by Cacti. At least it was when I read this installation guide.
http://www.cacti.net/downloads/docs/htm ... ndows.html
"If you are running MySQl 4.1 and above, you will need to apply the old password setting in order to authenticate with Cacti. To make this change, stop the MySQL service and add the following to the Start Parameter field. Start it again once it has been added. "
Has anyone found a work-around? To further cloud the issue, PHP 5.3.1 now uses mysqlnd to connect to Mysql (as opposed to libmysql.dll in earlier versions) - so I'm not sure if the issue is with the password hashing (as I suspect) or if it's with mysqlnd.
As always any help is appreciated.
Thanks,
Matt
Upgraded to PHP 5.3 - Can't connect to Mysql Database
Moderators: Developers, Moderators
That old password thing is for MySQL, not PHP. My installation guide (in signature) is more up to date than the one on the cacti site... well except for the PHP ISAPI to FastCGI switch. That's possibly where your install is messed up, since those are two entirely different methods.
Also, bottom line is that Cacti doesn't play nice with PHP 5.3.x (yet).
Also, bottom line is that Cacti doesn't play nice with PHP 5.3.x (yet).
| 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 |
Yes.
If using IIS, just the small task of switching from ISAPI to FastCGI...
If using IIS, just the small task of switching from ISAPI to FastCGI...
| 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 |
BSOD2600 wrote:Yes.
If using IIS, just the small task of switching from ISAPI to FastCGI...
Can I call this "Stupid Question Thursday"?
I was using IIS 6 with ISAPI and PHP 5.2.9 earlier today. I downloaded/installed/configured FastCGI per the link you provide in your Windows install doc. I then installed and configured PHP 5.2.12 (upgrading from 5.2.9) and re-tweaked my php.ini file.
My stupid question is: How can I be sure everything is working after all of my twiddling today?
I've done the following with the desired results:
- php -m shows everything I think it should show (LDAP, MySQL, snmp, sockets)
- I can log on with my LDAP credentials (I figure just getting the main page up and being able to log in is a good sign)
- I can log on to Cacti, view graphs, etc. (and the data is still being updated)
- Checked the Cacti log and compared new entries against yesterday's entries. Everything looks "the same": Poller is running every 5 minutes, weathermap messages look the same, I don't see any errors and the "WARNING: Result from SNMP not valid" warnings are the same as they were before.
Sounds like all was upgraded properly then
If you wanted, you could enable error logging in php.ini (web service restart required) to see if there are any additional errors PHP related being thrown.
If you wanted, you could enable error logging in php.ini (web service restart required) to see if there are any additional errors PHP related being thrown.
| 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