when running cmd.php i get the following error

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
faulknkg
Posts: 6
Joined: Wed Oct 23, 2002 7:33 am

when running cmd.php i get the following error

Post by faulknkg »

sh: -c: line 1: syntax error near unexpected token `|'
sh: -c: line 1: `|path_php_binary| -q /srv/www/htdocs/cacti/scripts/query_host_cpu.php 157.21.49.100 public get usage 0'
command: |path_php_binary| -q /srv/www/htdocs/cacti/scripts/query_host_cpu.php 157.21.49.100 public get usage 0, output:
sh: -c: line 1: syntax error near unexpected token `|'
sh: -c: line 1: `|path_php_binary| -q /srv/www/htdocs/cacti/scripts/query_host_cpu.php 157.21.49.101 public get usage 0'
command: |path_php_binary| -q /srv/www/htdocs/cacti/scripts/query_host_cpu.php 157.21.49.101 public get usage 0, output:
Guest

Post by Guest »

Hi

we had the same problem when upgrading from 0.8.2a to 0.8.3a. This has been solved by using the full path to the php binary, eg :

*/5 * * * * /usr/bin/php /usr/local/cacti/cmd.php

Regards,

Frédéric Mangeant
Guest

path_php_binary

Post by Guest »

Likewise. After searching around, I finally altered records in on of the data_cache tables, replacing the |path_php_binary| in the command field with /usr/bin/php. After looking through scripts for a while, I think I could have changed it to <path_php_binary> instead.

John Ruble
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests