Cann't execute "php poller.php", error returned

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
dimsh
Posts: 6
Joined: Sat Dec 03, 2005 7:08 am
Contact:

Cann't execute "php poller.php", error returned

Post by dimsh »

Hi,

I have installed cacti from source, and I have Apache v2.2 & PHP v5.11

when I invoke "php poller.php" as cacti user OR as root I get the following:

Code: Select all

sh: -: command not found
and the terminal is still waiting for commands, so i terminate it with Ctrl+C.
this is also the case when invoking

Code: Select all

./poller.php
cacti directory is [DocRoot]/cacti and I have set the permissions:
chown -R cactiuser:apache [DocRoot]/cacti
chmod -R 775 [DocRoot]/cacti

I think it is a PHP error , not an error in poller.php itself.

BTW: the first line in poller.php is

Code: Select all

#!/usr/bin/php -q
and I could not know what does the "-q" option do, it is not in php man page.

please if any one have an idea about this error in the CLI caused from php, let me know.

Regards
Last edited by dimsh on Wed Dec 21, 2005 9:01 am, edited 2 times in total.
dimsh
Posts: 6
Joined: Sat Dec 03, 2005 7:08 am
Contact:

Post by dimsh »

Sorry,

I do not think it is a PHP error, I have tried another page, which i made:

index.php:

Code: Select all

#!/usr/bin/php -q
<?php
phpinfo();
?>
and it works when running it as ./index.php or as "php index.php"

so, I am still wondering why poller.php gives an error??

is there any way to track that error and debug the execution of poller.php?
dimsh
Posts: 6
Joined: Sat Dec 03, 2005 7:08 am
Contact:

Post by dimsh »

The Problem just solved


I did issue the poller command( "php poller.php") before I run

http://xxx/cacti

and proceed with the web installation, after I complete the web installation, i could run php poller.php with no problems.

I recommend that this issue be documented in the installation page of cacti


Regards.
gttommy
Posts: 25
Joined: Thu Oct 06, 2005 6:52 pm
Contact:

Post by gttommy »

Hi, I'm having a similar problem. Not sure what you mean by:

"I did issue the poller command( "php poller.php") before I run"

-are you simply saying that "terminal # php poller.php" didn't work before the web installation? Or did you mean you had to run some "poller command" before you can go to the web installation, and as a result was able to run poller.php via the terminal?
dimsh
Posts: 6
Joined: Sat Dec 03, 2005 7:08 am
Contact:

Post by dimsh »

I meant [terminal # php poller.php] didn't work before the web installation.

and this is not mentioned in the manual.
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests