Newb: What did I break?

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

Moderators: Developers, Moderators

User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Newb: What did I break?

Post by GlueGuy »

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?
---------
The Glue Guy
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

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.
[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]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Read the guide in my signature. Specifically the MySQL section, step 6.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

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]
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

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?
---------
The Glue Guy
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

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.
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

Yes, I explicitly followed your guide, including step 6 of the MySQL section.

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)
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....
---------
The Glue Guy
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Did you modify the mysql service and add the --old-password switch?
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

Yes, I did.

Shouldn't that argument be "sticky"? I stop the MySQL service, add the argument to the Parameters, and re-start it.

However, when I get properties on the MySQL services, the --old-password switch is missing. I would think that this would stick around...

???
---------
The Glue Guy
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

To answer my own question, the help for Services says:
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.)
Makes ya wonder where the heck they go... I've put that particular parameter in about 5 times now.

Still looking for something obvious...
---------
The Glue Guy
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

Turns out there is also control for the old-passwords in the MySQL Admin application. Select the security tab, and check the box labeled "Use old passwords".

So I checked it there too.

still no joy...
---------
The Glue Guy
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

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.
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

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:
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.
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.

:cry:
---------
The Glue Guy
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

I did a complete system shutdown; restart.

Now getting to first base. :D

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
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Post by GlueGuy »

The NEXT problem seems to be some issue with PHP. When I run php, it tells me I have some problem with changing root:
C:\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
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 install :x
---------
The Glue Guy
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests