Stalingrad Posted November 5, 2008 Share Posted November 5, 2008 Hello. I'm having some trouble running a simple PHP script through a cron job. I use Cpanel to make the cron job, and here's the error that gets emailed to me: /bin/sh: public_html/crons/test.php: Permission denied I'll also include the script that it's running: <?php include("../config.php"); mysql_query("INSERT INTO test (id, username) VALUES ('1', 'Stalingrad')"); ?> I really need this to work badly, but for some reason it's giving me that error. Would somebody please tell me what the problem might be, and how I should go about fixing it? Thanks in advance. =] Quote Link to comment Share on other sites More sharing options...
rhodesa Posted November 5, 2008 Share Posted November 5, 2008 you need to send it through the PHP executable...make the command you are running in your cronjob: php -f public_html/crons/test.php Quote Link to comment Share on other sites More sharing options...
Stalingrad Posted November 5, 2008 Author Share Posted November 5, 2008 Thanks! =] Quote Link to comment 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.