php script not providing output for Cacti interface to rrdtool

From: Date: Mon, 19 May 2003 15:46:23 +0000
Subject: php script not providing output for Cacti interface to rrdtool
Groups: php.general 
Request: Send a blank email to php-general+get-148180@lists.php.net to get a copy of this message
not directly PHP related, but the cacti list appears to be devoid of life, and since it is written in PHP and I am trying to outsorce the data collection to a php script, hoping that someone on the list here has come across this. have been unsuccessful in getting Cacti to recognize and get data from a PHP script; Cacti:Data Input Source Configuration Name "Get Something" Input "/usr/local/custom/myscript.php <VAR>" Output "<RESULT>" Cacti:Current Data Input Source Fields RESULT RESULT Output Yes VAR VAR Input No when I go to Cacti:"Cron Printout" to ensure it is pulling the results correctly I see "/usr/local/custom/myscript.php MYVAR" "" When I run the same script via the shell I get nx# /usr/local/custom/myscript.php MYVAR 76 nx# Have tried formatting the string, removing line feeds and cr, running out of ideas here. simple test script looks like the following -- begin myscript.php -- #!/usr/local/bin/php -q <?PHP $type=$argv[1]; if($type=='MYVAR'){ echo '76'."\n"; } ?> -- end myscript.php -- Thoughts? Dave

« previous php.general (#148180) next »