PHP errors

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

Moderators: Developers, Moderators

User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

PHP errors

Post by BSOD2600 »

Just updated Cacti from 0.8.5 to 0.8.6 and now cacti-0.8.6a-pre20040928

I noticed when I run php by itself, I get all of these errors. I'm not sure why, since I don't use SNMPv2 for any device.

Code: Select all

C:\>php /?
Did not find 'PhysAddress' in module RFC1155-SMI (/USR/MIBS/Zyxel.mib)
Cannot find module (SNMPv2-SMI-v1): At line 11 in /USR/MIBS/RFC2668-MIB-V1SMI.MIB
Cannot find module (SNMPv2-TC-v1): At line 13 in /USR/MIBS/RFC2668-MIB-V1SMI.MIB
Cannot find module (SNMPv2-SMI-v1): At line 11 in /USR/MIBS/RFC2006-MIB-V1SMI.MIB
Cannot find module (SNMPv2-TC-v1): At line 13 in /USR/MIBS/RFC2006-MIB-V1SMI.MIB
Cannot find module (SNMPv2-TC-v1): At line 11 in /USR/MIBS/RFC1595-MIB-V1SMI.MIB
Did not find 'hrMIBAdminInfo' in module HOST-RESOURCES-MIB (/USR/MIBS/HOST-RESOURCES-
TYPES.mib)
Unlinked OID in HOST-RESOURCES-TYPES: hostResourcesTypesModule ::= { hrMIBAdminInfo 4
 }
Cannot find module (SNMPv2-SMI-v1): At line 11 in /USR/MIBS/DOCS-SUBMGT-MIB-V1SMI.MIB

Cannot find module (SNMPv2-TC-v1): At line 13 in /USR/MIBS/DOCS-SUBMGT-MIB-V1SMI.MIB
Cannot find module (SNMPv2-SMI-v1): At line 11 in /USR/MIBS/DOCS-IF-MIB-V1SMI.MIB
Cannot find module (SNMPv2-TC-v1): At line 13 in /USR/MIBS/DOCS-IF-MIB-V1SMI.MIB
Cannot find module (SNMPv2-SMI-v1): At line 10 in /USR/MIBS/DOCS-CABLE-DEVICE-MIB-V1S
MI.MIB
Cannot find module (SNMPv2-TC-v1): At line 14 in /USR/MIBS/DOCS-CABLE-DEVICE-MIB-V1SM
I.MIB
Cannot find module (SNMPv2-TC-v1): At line 13 in /USR/MIBS/DOCS-BPI-PLUS-MIB-V1SMI.MI
B
Cannot find module (SNMPv2-TC-v1): At line 11 in /USR/MIBS/DOCS-BPI-MIB-V1SMI.MIB
Cannot adopt OID in HOST-RESOURCES-TYPES: hostResourcesTypesModule ::= { hrMIBAdminIn
fo 4 }
Cannot adopt OID in HOST-RESOURCES-TYPES: hostResourcesTypesModule ::= { hrMIBAdminIn
fo 4 }
Status: 404
Content-type: text/html
X-Powered-By: PHP/4.3.9

No input file specified.

Code: Select all

C:\>path
PATH=C:\Program Files\Support Tools\;C:\Perl\bin\;C:\Program Files\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program  iles\Symantec\pcAnywhere\;c:\cygwin\bin;c:\php\
I've also got the two system variables, MIBS=ALL and MIBSDIR=c:/usr/mibs

Any ideas on what a fix might be?
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Try MIBS="".

Also, do you have your Own mibs in that directory, or is it just the base. Cacti does not use the MIB's. Therefore that directory can be empty for all we care.

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

Post by BSOD2600 »

Thanks, the blank MIB fixed that one error...

Now when I run cactid, I get the following:

Code: Select all

C:\Auntie\cacti>cactid
CACTID: Using cactid config file [cactid.conf]
CACTID: Windows Environment, root permissions not required for ICMP Ping
CACTID: Version 0.8.6 starting
No log handling enabled - turning on stderr logging
IP-MIB: Module not found
IF-MIB: Module not found
TCP-MIB: Module not found
UDP-MIB: Module not found
HOST-RESOURCES-MIB: Module not found
SNMPv2-MIB: Module not found
RFC1213-MIB: Module not found
SNMPv2-SMI: Module not found
NOTIFICATION-LOG-MIB: Module not found
UCD-SNMP-MIB: Module not found
UCD-DEMO-MIB: Module not found
SNMP-TARGET-MIB: Module not found
NET-SNMP-AGENT-MIB: Module not found
SNMP-VIEW-BASED-ACM-MIB: Module not found
SNMP-COMMUNITY-MIB: Module not found
UCD-DLMOD-MIB: Module not found
SNMP-FRAMEWORK-MIB: Module not found
SNMP-MPD-MIB: Module not found
SNMP-USER-BASED-SM-MIB: Module not found
SNMP-NOTIFICATION-MIB: Module not found
SNMPv2-TM: Module not found

Initially I thought it was because something with PHP was broken, causing my rrd files not to be updated. But they still are not, so there is something else that is.
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

These error messages are harmless and are not the cause of the problem. You should be running the latest pre-release of 0.8.6a if I didn't say so already. You would not be receiving these messages if your variables were set appropriately and the directories actualy exist.

Therefore, open a command prompt, type SET <CR> and then post the output.

Thanks,

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

Post by BSOD2600 »

I am running cacti-0.8.6a-pre20040928

I'm running on Win2K3

Code: Select all

C:\>SET <CR>
The syntax of the command is incorrect.

C:\>set M
MIBS=""
MIBSDIR=C:\usr\mibs
Well all those annoying messages are gone now:

Code: Select all

C:\Auntie\cacti>cactid
CACTID: Using cactid config file [cactid.conf]
CACTID: Windows Environment, root permissions not required for ICMP Ping
CACTID: Version 0.8.6 starting
Cannot find module (""): At line 10 in (none)
No log handling enabled - turning on stderr logging
"": Module not found
But the rrdtool does not appear to be running and updating the RRD files. I've noticed there are several threads on the forum about users having problems with rrd files not updating after upgrading to 0.8.6. What gives?

What is the optimal values for Maximum Concurrent Poller Processes and Maximum Threads per Process on a P2 400?

It was my understanding that the whole point of the poller was to find out which devices were online and only get information from them. Looking through the logs, I can see cacti is trying to talk to some machines that the poller has deemed offline (and they really are). This a bug also?
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

This is much better. If you now change MIBS=All, your error messages will go away.

The reason for all the threads about graphs not updating was due to an attempt on our part to implement a new method of updating RRD files. Unfortunately, it did not work out too well. There were too many platform specific issues with PHP at various version levels. Therefore, we have returned to a more predictable version of the RRD process in the latest pre-release.

The reason we have implemented poller.php is part of a first step to supporting a multiple poller architecture to expand the capacity of the system.

It has been a difficult six months on this project but for now. I think by reverting to the former method, we should be close to out of the woods so that we can begin to work on other improvement.

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

Post by BSOD2600 »

TheWitness wrote:This is much better. If you now change MIBS=All, your error messages will go away.
Soon as I do that, I get all those messages about Cannot find module... in my first post.
TheWitness wrote:Therefore, we have returned to a more predictable version of the RRD process in the latest pre-release.
Since there is no difference between cacti-0.8.6a-pre20040929 and cacti-0.8.6a-pre20040928, why aren't I seeing the rrd process fixed?
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What are your PHP, OS, MySQL, Net-SNMP, and Cacti Versions. Were you planning on posting your DEBUG output so I can answer your question?

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

Post by BSOD2600 »

OS: Windows 2003 Advanced Server
PHP: 4.3.9
MySQL: 4.0.21-nt
SNMPGet: 5.1.1
Cacti: cacti-0.8.6a-pre20040928
RRDTool: 1.0.48
Cactid: 0.8.6

Debug is attached
Last edited by BSOD2600 on Fri Apr 22, 2005 5:23 pm, edited 1 time in total.
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Your CACTID output is fine. One thing I did notice is any POLLER messages. The correct started task for Cacti is "c:\php\php.exe <webroot>\Cacti\poller.php". If you are using PHP 5, it would be "c:\php\php-win.exe <webroot>\Cacti\poller.php".

It is the POLLER.PHP script that updates your RRD files.

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

Post by BSOD2600 »

1. I've got the php directory in my path, I thought that would eliminate the need for a full path listing.

2. I'm using cactid, I thought that would invoke the proper poller stuff.

When I simply run C:\php\php.exe C:\auntie\cacti\poller.php I get:

Code: Select all

Content-type: text/html
X-Powered-By: PHP/4.3.9

<br><strong>This script is only meant to run at the command line.</strong>
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

When I run C:\php\cli\php.exe C:\auntie\cacti\poller.php

the poller goes into an endless pinging loop:

Code: Select all

09/30/2004 12:26:32 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/auntie/cacti, ARGS:  0 4]
09/30/2004 12:26:33 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/auntie/cacti, ARGS:  5 8]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'min:148' [map min->ping_min]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'avg:173' [map avg->ping_avg]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'max:195' [map max->ping_max]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'loss:0' [map loss->ping_loss]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'min:125' [map min->ping_min]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'avg:156' [map avg->ping_avg]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'max:194' [map max->ping_max]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'loss:0' [map loss->ping_loss]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'min:100' [map min->ping_min]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'avg:102' [map avg->ping_avg]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'max:106' [map max->ping_max]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'loss:0' [map loss->ping_loss]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'min:256' [map min->ping_min]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'avg:334' [map avg->ping_avg]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'max:400' [map max->ping_max]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'loss:0' [map loss->ping_loss]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'min:90' [map min->ping_min]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'avg:130' [map avg->ping_avg]
09/30/2004 12:26:33 PM - POLLER: Poller[0] Parsed MULTI output field 'max:170' [map max->ping_max]
09/30/2004 12:26:34 PM - POLLER: Poller[0] Parsed MULTI output field 'loss:0' [map loss->ping_loss]
09/30/2004 12:26:34 PM - POLLER: Poller[0] Parsed MULTI output field 'min:164' [map min->ping_min]
09/30/2004 12:26:34 PM - POLLER: Poller[0] Parsed MULTI output field 'avg:260' [map avg->ping_avg]
09/30/2004 12:26:34 PM - POLLER: Poller[0] Parsed MULTI output field 'max:405' [map max->ping_max]
09/30/2004 12:26:34 PM - POLLER: Poller[0] Parsed MULTI output field 'loss:0' [map loss->ping_loss]
09/30/2004 12:26:34 PM - POLLER: Poller[0] Parsed MULTI output field 'min:86' [map min->ping_min]
09/30/2004 12:26:34 PM - POLLER: Poller[0] Parsed MULTI output field 'avg:99' [map avg->ping_avg]
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok, I would suspect that your poller_output table is loaded with quite a bit of output in it.

To clear it out, perform the following:

c:\mysql\bin\mysql -u root -p cacti
> truncate table poller_output;
> exit

Then rerun.

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

Post by BSOD2600 »

Code: Select all

mysql> truncate table poller_output;
Query OK, 0 rows affected (0.01 sec)
By that output, I assume that the command didn't do anything useful?

Well, it seems now I've really broken things, since I can't get the sucker to start at all.

Code: Select all

C:\php>php c:\auntie\cacti\poller.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

<br><strong>This script is only meant to run at the command line.</strong>

C:\php\cli>php c:\auntie\cacti\poller.php
The line, C:\php\cli>php c:\auntie\cacti\poller.php, actually opens up the c:\auntie\cacti\ folder in Windows while the dos window just sits there with nothing.

The next thing I ran was cactid from c:\auntie\cacti. After it got done displaying the typical SNMPv2 errors for me, it just sat there showing nothing more. The log file on the otherhand, continued to grow. 1 minute later, the scheduled task to run poller.php started and this time it actually updated the RRD files! Furthermore the window that opened with: c:\windows\system32\svchost has over a dozens lines with only OK.
Something weird is surely going on here.

Maybe I'm confused on how stuff works now with 0.8.6. In the past, I know one could either run cmd.php OR cactid to poll the hosts and collect the information. With 0.8.6, must you always run poller.php and then select from Settings -> Poller, which one you use (cmd.php or cactid) ?
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Maybe I'm confused on how stuff works now with 0.8.6. In the past, I know one could either run cmd.php OR cactid to poll the hosts and collect the information. With 0.8.6, must you always run poller.php and then select from Settings -> Poller, which one you use (cmd.php or cactid) ?
Yes, you appear to be a little. The "Ok's" are RRDTool responses stating that the RRD file was created successfully.

Yes, in this version, you select the poller via the user interface. So, I looks like the poller is working Ok. However, the explorer window opening does not make sense. It may be the result of a poorly written script.

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests