Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Crontab does't seems to work

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific
Author Message
peterg



Joined: 05 Sep 2003
Posts: 1

PostPosted: Fri Sep 05, 2003 2:30 am    Post subject: Crontab does't seems to work Reply with quote

I'm a new in linux and stuf..............
My problem is, when I run cacti/cmd.php in my webbrowser, so the graphic updates. But when crontab updates it, nothing hapends.......
Back to top
Fred
Cacti User


Joined: 03 Jan 2003
Posts: 78

PostPosted: Fri Sep 05, 2003 9:01 am    Post subject: Some diagnostics Reply with quote

Remove the redirection from the crontab entry. That is, cut out the "> /dev/null 2>&1", and then check root's email after 5 minutes. You'll get to see any error messages that may have been generated.
Back to top
pbulteel
Cacti User


Joined: 05 Sep 2003
Posts: 150
Location: London

PostPosted: Fri Sep 05, 2003 9:46 am    Post subject: Check your path. Reply with quote

Chances are that your crontab isn't including the path correctly to the CLI php. Try changing the crontab entry to include the path to php. Type which php at your command line and use that as the result.

e.g. which php
/usr/bin/php

crontab now reads /usr/bin/php /cacti/cmd.php > /dev/null ... etc.
Back to top
peterga
Guest





PostPosted: Fri Sep 05, 2003 1:03 pm    Post subject: dosn't work Reply with quote

When I deleted "> /dev/null......", I get this message from webmin when I run the crontab (this is the same message when I run cmd.php in linux):

Output from command /usr/bin/php4 /usr/share/cacti/cmd.php ..

Content-type: text/html

PHP Warning: mysql: Unable to initialize module
Module compiled with debug=0, thread-safety=0 module API=20020429
PHP compiled with debug=0, thread-safety=0 module API=20010901
These options need to match
in Unknown on line 0
PHP Warning: gd: Unable to initialize module
Module compiled with debug=0, thread-safety=0 module API=20020429
PHP compiled with debug=0, thread-safety=0 module API=20010901
These options need to match
in Unknown on line 0
X-Powered-By: PHP/4.1.2
Content-type: text/html

<br />
<b>Fatal error</b>: Call to undefined function: mysql_connect() in <b>/usr/share/cacti/include/database.php</b> on line <b>19</b><br />
Back to top
pbulteel
Cacti User


Joined: 05 Sep 2003
Posts: 150
Location: London

PostPosted: Sat Sep 06, 2003 12:44 am    Post subject: Looks like you haven't configured it correctly. Reply with quote

I have a feeling that the config.php file doesn't have the correct username and/or password for the database and I'm not sure if anything else is missing.
Back to top
Xtof
Guest





PostPosted: Wed Sep 10, 2003 10:34 am    Post subject: Re: Looks like you haven't configured it correctly. Reply with quote

I think you don't have de mysql extension enable in you php.ini...
Add a line in you php.ini such as :
extension=mysql.so
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group