Error when running PHP.exe from command line

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

Moderators: Developers, Moderators

Post Reply
kdsm
Posts: 41
Joined: Thu Mar 17, 2005 5:00 pm

Error when running PHP.exe from command line

Post by kdsm »

I'm having problems with Cacti. I tried running this command line
C:\php\php.exe c:\inetpub\wwwroot\cacti\poller.php
and it returned the following error.

'-O is not a recognized as an internal or external command,
operable program or batch file.

Can anybody help me correct this.

I have
W2000 server
Cactid 0.8.6.d
Cacti 0.8.6c
PHP-4.3.10
MYSQL 4.1.10a
[/code]
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

please run "php -m" from the command line. I think PHP is not loading php_snmp.dll support.

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?
kdsm
Posts: 41
Joined: Thu Mar 17, 2005 5:00 pm

Post by kdsm »

here is what was displayed after running php.exe -m

[PHP Modules]
bcmath
calendar
com
ctype
ftp
mysql
odbc
overload
pcre
session
standard
tokenizer
wddx
xml
zlib

[Zend Modules]


it looks like you are correct. How do I get that dll to load?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Edit php.ini, typically in either your c:\php or c:\windows dir. There is a section in the file called extentions. Remove the ; in front of php_snmp.dll
kdsm
Posts: 41
Joined: Thu Mar 17, 2005 5:00 pm

Here's what happend

Post by kdsm »

I made the change you suggested and the following error comes up
Unknow(): Unable to load dynamic library './php_snmp.dll' - The specified module could not be found.

It sounds like I'm missing someing. I do have an c:\snmp directoy however.
kdsm
Posts: 41
Joined: Thu Mar 17, 2005 5:00 pm

got it.

Post by kdsm »

Thanks for your help.
If I would have read the install document a bit closer I would have seen that change in the PHP.INI file. :D
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests