|
|
| Author |
Message |
peterg
Joined: 05 Sep 2003 Posts: 1
|
Posted: Fri Sep 05, 2003 2:30 am Post subject: Crontab does't seems to work |
|
|
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
|
Posted: Fri Sep 05, 2003 9:01 am Post subject: Some diagnostics |
|
|
| 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
|
Posted: Fri Sep 05, 2003 9:46 am Post subject: Check your path. |
|
|
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
|
Posted: Fri Sep 05, 2003 1:03 pm Post subject: dosn't work |
|
|
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
|
Posted: Sat Sep 06, 2003 12:44 am Post subject: Looks like you haven't configured it correctly. |
|
|
| 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
|
Posted: Wed Sep 10, 2003 10:34 am Post subject: Re: Looks like you haven't configured it correctly. |
|
|
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 |
|
 |
|