Okay I still have not got to the bottom of this and it is now driving my crazy.
I am running pre-patched Cacti 0.8.6b with cactid 0.8.6c on a Windows 2000 & 2003 server with PHP 5.02 cli and Active Perl 5.8.4. Both perl and php are available system wide. It must be said everything is working great and I have had no problems at all UNTIL trying to get various php & perl scripts working. I have copied the scripts into the scripts directory of cacti and imported the various templates fine via the cacti gui. I can now setup the relevant graphs etc without a problem but the graph never updates with any values.
If i run the scripts from the windows command line as follows for example all is fine and the values I expect get returned.
php -q <path_cacti>/scripts/mysql_com.php xxx.xx.xxx.xx cactiuser cactiuser
output shown is along the lines off
change_db:9796 delete:0 insert:11503 select:36270 update:3719
Now if I switch on Debug mode within the gui the cacti log reports the following error when the above runs via cactid / poller
12/10/2004 02:06:03 PM - CACTID: Poller[0] Host[4] ERROR: Empty result [xxx.xx.xxx.xx]: 'php -q E:/wwwroot/cacti-0.8.6b/scripts/mysql_com.php xxx.xx.xxx.xx cactiuser cactiuser'
12/10/2004 02:06:03 PM - CACTID: Poller[0] Host[4] WARNING: Result from SCRIPT not valid. Partial Result: U...
12/10/2004 02:06:03 PM - CACTID: Poller[0] Host[4] SCRIPT: php -q E:/wwwroot/cacti-0.8.6b/scripts/mysql_com.php xxx.xx.xxx.xx cactiuser cactiuser, output: U
12/10/2004 02:06:03 PM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (133,'','2004-12-10 14:06:00','U')
I have recently edited the data paths on the Data Input Methods as below and it still does not work on my Windows boxes.
c:/php/php.exe <path_cacti>/scripts/mysql_com.php <hostname> <username> <password>
I have also tried
c:/php/php-win.exe <path_cacti>/scripts/mysql_com.php <hostname> <username> <password>
I have also tried reversing the slashes.
I had this same problem on a Solaris box but putting the full path of php & perl in fixed the problem. The solaris box runs an earlier version of cacti (0.8.5) and php (4.3.0 cli) compared to the windows boxes
Has anyone had this problem on a Windows box and managed to get it to work. I must re-iterarte the scripts all run fine from the Windows command prompt. The problem seems to lie with some sort of bug between Windows and Cacti as it all works okay on Cacti under Solaris. Maybee this is an offical bug. Maybee there is a patch for it I do not know about.
Please Help.
Possible php / perl bug under cacti running on Windows
Moderators: Developers, Moderators
Cactid
Hi there are many posts with this issue, use cmd.php instead of cactid poller and everything is OK for now...
http://forums.cacti.net/about5741.html
http://forums.cacti.net/about5741.html
Okay I just switched to cmd.php and my perl & php scripts now appear to be producing output as expected.
I also just installed the default cygwin onto this box and switched back to cactid and hey presto the perl scripts are working but the php scripts are not.
So why does cactid not work for php scripts and only perl scripts if you actually install cygwin ? even if you have perl and php installed and they are visable to the entire system from anywhere etc.
Is there an update for cactid on windows that will work for both perl & php scripts without the need for an actual cygwin install ?
I also just installed the default cygwin onto this box and switched back to cactid and hey presto the perl scripts are working but the php scripts are not.
So why does cactid not work for php scripts and only perl scripts if you actually install cygwin ? even if you have perl and php installed and they are visable to the entire system from anywhere etc.
Is there an update for cactid on windows that will work for both perl & php scripts without the need for an actual cygwin install ?
Hi
I installed the Base install pakage for Cygwin, and now my perl scripts are working with Cactid poller, one thing to keep in mind is that there should not be any spaces in the return string...
for instance
max:23 is ok
max: 23 does not work, I had to add a type of trim string function on my script to get it to work..........
have fun.....
for instance
max:23 is ok
max: 23 does not work, I had to add a type of trim string function on my script to get it to work..........
have fun.....
LIfe is very hard without the proper tools.....I am but a Slave...
Hi
I installed the Base install pakage for Cygwin, and now my perl scripts are working with Cactid poller, one thing to keep in mind is that there should not be any spaces in the return string...
for instance
max:23 is ok
max: 23 does not work, I had to add a type of trim string function on my script to get it to work..........
have fun.....
for instance
max:23 is ok
max: 23 does not work, I had to add a type of trim string function on my script to get it to work..........
have fun.....
LIfe is very hard without the proper tools.....I am but a Slave...
php scripts
Hey,
I noticed in your post that you are using php 5.02. With php 5, you need to use php-win in your settings, not php.
Regards,
Willie
I noticed in your post that you are using php 5.02. With php 5, you need to use php-win in your settings, not php.
Regards,
Willie
Who is online
Users browsing this forum: No registered users and 2 guests