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.......
Crontab does't seems to work
Moderators: Developers, Moderators
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.
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.
e.g. which php
/usr/bin/php
crontab now reads /usr/bin/php /cacti/cmd.php > /dev/null ... etc.
uname -a
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 />
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 />
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.
uname -a
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
Add a line in you php.ini such as :
extension=mysql.so
Who is online
Users browsing this forum: No registered users and 1 guest