Newb: What did I break?
Moderators: Developers, Moderators
Newb: What did I break?
Had this working before the system got trashed. Did a new install and am now getting this when I first attempt to open http://localhost/cacti/
Fatal error: Call to undefined function mysql_connect() in C:\a\Apache2\htdocs\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 338
However, mysql seems to be working fine, and php is happy. php -m gets this:
[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]
Versions:
Apache 2.0.55
cacti 1.8.6g
MySQL 4.1
net-snmp 5.2.1.2-1
php 5.0.5
rrdtool 1.2.11
What am I missing?
Fatal error: Call to undefined function mysql_connect() in C:\a\Apache2\htdocs\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 338
However, mysql seems to be working fine, and php is happy. php -m gets this:
[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]
Versions:
Apache 2.0.55
cacti 1.8.6g
MySQL 4.1
net-snmp 5.2.1.2-1
php 5.0.5
rrdtool 1.2.11
What am I missing?
---------
The Glue Guy
The Glue Guy
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Are you sure mysql is running?
Also, make sure that the username, password, database and host are correctly set in your include/config.php file in your cacti installation.
Also, make sure that the username, password, database and host are correctly set in your include/config.php file in your cacti installation.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Read the guide in my signature. Specifically the MySQL section, step 6.
| 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 |
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Moved to Windows
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Yes, MySQL is running & no errors show in the log.
I am able to connect via MySQL admin, as well as the command line. I can also do queries against the cacti DB, so I am pretty sure that is running properly.
BSOD: I presume you're talking about the OLD_PASSWORDS fix for 4.1 MySQL?
So I have the cacti user as "cactiuser" and the password as "cacti" in all the appropriate places.
I used your guide to set things up this time.
Is there some log setting somewhere that I can turn on to see some sort of clue?
I am able to connect via MySQL admin, as well as the command line. I can also do queries against the cacti DB, so I am pretty sure that is running properly.
BSOD: I presume you're talking about the OLD_PASSWORDS fix for 4.1 MySQL?
So I have the cacti user as "cactiuser" and the password as "cacti" in all the appropriate places.
I used your guide to set things up this time.
Is there some log setting somewhere that I can turn on to see some sort of clue?
---------
The Glue Guy
The Glue Guy
Did you follow the steps outlined in step 6? You need to do that in order for the older mysql client in PHP (which cacti uses) to connect.
Yes, mysqladmin will work because it's using the updated mysql client.
Yes, mysqladmin will work because it's using the updated mysql client.
| 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, I explicitly followed your guide, including step 6 of the MySQL section.
I re-did the setting as follows:
still no joy.
I am wondering. I've placed all the cacti-related stuff under the directory of
C:\a\x
where 'x' is php, perl, apache, mysql, cactid, cygwin, net-snmp, and rrdtool.
Perhaps there is a broken path statement somewhere? I thought I got them all. However, I do notice that PHP seems to have several DLLs with c:\php encoded in them....
I re-did the setting as follows:
Code: Select all
C:\a\MySQL41\bin>mysql --user=root --password
Enter password: *****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 24 to server version: 4.1.15-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('cacti') WHERE Host = 'localhost' AND User = 'cactiuser';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
I am wondering. I've placed all the cacti-related stuff under the directory of
C:\a\x
where 'x' is php, perl, apache, mysql, cactid, cygwin, net-snmp, and rrdtool.
Perhaps there is a broken path statement somewhere? I thought I got them all. However, I do notice that PHP seems to have several DLLs with c:\php encoded in them....
---------
The Glue Guy
The Glue Guy
Did you modify the mysql service and add the --old-password switch?
| 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 |
To answer my own question, the help for Services says:
Still looking for something obvious...
Makes ya wonder where the heck they go... I've put that particular parameter in about 5 times now.To configure startup parameters for a service, right-click the service, click Properties, and then type the parameters in Start parameters before you click Start. These settings are used only once and are not saved. (A backslash (\) is treated as an escape character; type two backslashes for each backslash in a parameter.)
Still looking for something obvious...
---------
The Glue Guy
The Glue Guy
Weird. When I wrote that portion of the guide, thats what I did on my test machine. Look in your event log. There should be something about mysql starting and/or the errors it had with you putting in the startup paramter.
| 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 |
There seem to be no startup messages from MySQL, but it leaves two messages at the start and completion of the shutdown process. Back about three hours ago, PHP left this message in the event log:
So at some point in time, the password was causing a problem. That message has not appeared the last many times I've tried to access it though.The description for Event ID ( 2000 ) in Source ( php ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: php[180], PHP Warning: mysql_connect(): Access denied for user 'cactiuser'@'localhost' (using password: YES) in C:\a\Apache2\htdocs\cacti\lib\adodb\drivers\adodb-mysql.inc.php on line 339.
---------
The Glue Guy
The Glue Guy
I did a complete system shutdown; restart.
Now getting to first base.
A couple of times it has displayed the index.php page as plain text (not sure what that's about).
However, I have at least gotten in to reset the admin password now. Perhaps the de-install/re-install, and broken password stuff was all wrapped up in some cache somewhere... Don't know.
I will trudge on. Thanks for the help.
Now getting to first base.
A couple of times it has displayed the index.php page as plain text (not sure what that's about).
However, I have at least gotten in to reset the admin password now. Perhaps the de-install/re-install, and broken password stuff was all wrapped up in some cache somewhere... Don't know.
I will trudge on. Thanks for the help.
---------
The Glue Guy
The Glue Guy
The NEXT problem seems to be some issue with PHP. When I run php, it tells me I have some problem with changing root:
I can display devices in cacti, but when I go back to the console, it displays index.php as plain text (Apache does not interpret the php). Something still funny with this installC:\a\Apache2\htdocs\cacti\log>php c:\a\Apache2\htdocs\cacti\poller.php
ERROR: change root is not supported by your OS or at least by this copy of rrdto
ol
11/07/2005 01:47:15 PM - SYSTEM STATS: Time:1.1303 Method:cmd.php Processes:1 Th
reads:N/A Hosts:2 HostsPerProcess:2 DataSources:10 RRDsProcessed:5
---------
The Glue Guy
The Glue Guy
Who is online
Users browsing this forum: No registered users and 2 guests