php & cmd.php at crontab

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

Moderators: Developers, Moderators

Post Reply
bocasman
Posts: 24
Joined: Mon Aug 19, 2002 8:27 am
Location: Panama
Contact:

php & cmd.php at crontab

Post by bocasman »

Hi every one!

Before setting a new job in my crontab I always try it first; and this is what I have done y this is what I got:

[root@monitor bin]# pwd
/usr/bin
[root@monitor bin]# ls -l php
-rwxr-xr-x 1 root root 3025218 Aug 17 13:40 php
[root@monitor bin]#

[root@monitor bin]# ./php /usr/local/apache/htdocs/test/cacti/cmd.php
Can't open perl script "/usr/local/apache/htdocs/cacti/scripts/users.pl": No such file or directory

Warning: Failed opening 'include/config.php' for inclusion (include_path='.:/usr/local/php-4.2.1/lib/php') in /usr/local/apache/htdocs/test/cacti/include/rrd_functions.php on line 82

Warning: Failed opening 'include/functions.php' for inclusion (include_path='.:/usr/local/php-4.2.1/lib/php') in /usr/local/apache/htdocs/test/cacti/include/rrd_functions.php on line 83

Warning: Failed opening 'include/database.php' for inclusion (include_path='.:/usr/local/php-4.2.1/lib/php') in /usr/local/apache/htdocs/test/cacti/include/rrd_functions.php on line 84

Warning: Failed opening 'include/config.php' for inclusion (include_path='.:/usr/local/php-4.2.1/lib/php') in /usr/local/apache/htdocs/test/cacti/include/functions.php on line 108

...many others lines of errors...
------------"------------"---------------"------------

This is a normal output?

Any one have an idea what this could be?
Regards,
BM
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

It sounds like some of your path variables in cacti may be incorrect. Open up cacti in a web browser and click on 'cacti Settings'.

Make sure 'Apache Web Root' is set to:
/usr/local/apache/htdocs/
Then make sure 'cacti Web Root' is set to:
/test/cacti
Please note that I got these values from the output you pasted to this board. Check to make sure they make sense before applying them.

-Ian
bocasman
Posts: 24
Joined: Mon Aug 19, 2002 8:27 am
Location: Panama
Contact:

Post by bocasman »

Hi thaks for your answer.

I think that the problem is some where else because I made an alias on my apache for cacti, is something like this:
# ***** Working directory for Cacti *****
Alias /cacti "/usr/local/apache/htdocs/test/cacti/"
<Directory "/usr/local/apache/htdocs/test/cacti">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Any way, just for if should in case I have tried changing my settings as you recommend me and I got the same errors.

and this one's also:

Warning: Failed opening 'include/config.php' for inclusion (include_path='.:/usr/local/php-4.2.1/lib/php') in /usr/local/apache/htdocs/test/cacti/include/functions.php on line 27
sh: -c: line 1: syntax error near unexpected token `>>'
sh: -c: line 1: `echo '08/20/2002 9:55 AM - CMD: update --template N' >> '

Warning: fpassthru(): supplied argument is not a valid File-Handle resource in /usr/local/apache/htdocs/test/cacti/include/rrd_functions.php on line 64
Any one know what could be causing this?
Regards,
BM
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest