chinclub Posted May 5, 2007 Share Posted May 5, 2007 I am trying to write a script that will allow cronjobs to update the site. What I want it to do is: $update = mysql_query("UPDATE `available_food` SET `available`='1'"); The cronjob will run and it finds the .php fine but then I get an email error that "Permission denied" I load the .php file in my browser and the script runs fine and updated the database just as it should. Is the PHP language different for cron jobs than for regular PHP scripts? What am I doing wrong. Quote Link to comment https://forums.phpfreaks.com/topic/50081-solved-cronjobs-help/ Share on other sites More sharing options...
pocobueno1388 Posted May 5, 2007 Share Posted May 5, 2007 Here is an example of what your command line should look like: php /home/username/public_html/folder/script_name.php Obviously you will need to change up the path to the file that fits yours. Quote Link to comment https://forums.phpfreaks.com/topic/50081-solved-cronjobs-help/#findComment-245815 Share on other sites More sharing options...
chinclub Posted May 5, 2007 Author Share Posted May 5, 2007 Thanks I was missing the PHP in front. Quote Link to comment https://forums.phpfreaks.com/topic/50081-solved-cronjobs-help/#findComment-246084 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.