hassank1 Posted January 2, 2009 Share Posted January 2, 2009 I've a problem . I've made a PHP script and when I open it from my browser ex: www.mysite.....com/file.php it worked normally .. however when I try to open it in cron using the command wget www.mysite....com/file.php .. the script don't execute and I got this cron output to my email --2009-01-02 14:12:01-- http://*******/file.php Resolving www.***... **.**.**.** Connecting to ***|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 491 [text/html] file.php: Permission denied Cannot write to `file.php' (Permission denied). Note : (I've hidded the address for security reasons) Link to comment https://forums.phpfreaks.com/topic/139193-crontab-permission/ Share on other sites More sharing options...
DarkWater Posted January 2, 2009 Share Posted January 2, 2009 Don't use wget for cron....just call the script through the CLI. 0 0 * * * /usr/bin/php /path/to/your/script.php Link to comment https://forums.phpfreaks.com/topic/139193-crontab-permission/#findComment-728025 Share on other sites More sharing options...
hassank1 Posted January 2, 2009 Author Share Posted January 2, 2009 I am using a plesk control panel so I enter all data (min , sec etc..) using textboxes and there's a textbox for command so I put the following in the command txtbox : ?? /usr/bin/php /path/to/your/script.php (of couse I will change the path ) Link to comment https://forums.phpfreaks.com/topic/139193-crontab-permission/#findComment-728040 Share on other sites More sharing options...
Mchl Posted January 2, 2009 Share Posted January 2, 2009 Basically yes. You should also make sure that path to php is /usr/bin/php Link to comment https://forums.phpfreaks.com/topic/139193-crontab-permission/#findComment-728047 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.