![]() |
Crontab Codeigniter 403 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Crontab Codeigniter 403 (/showthread.php?tid=42435) |
Crontab Codeigniter 403 - El Forum - 06-07-2011 [eluser]christeso[/eluser] I'm trying to run some crons and am getting 403 errors. I've tried following several tutorials such as this one http://codeigniter.com/wiki/Category:Advanced::CronScript/ and this one that states 2.02 can be run from cli http://ellislab.com/codeigniter/user-guide/general/cli.html Neither have worked for me. I've tried both calling server files directly from crontab and also wget and curl both from Plesk and CLI. Can someone fill me in on the best method to call a controller via crontab? Thanks, Chris Crontab Codeigniter 403 - El Forum - 06-07-2011 [eluser]Clooner[/eluser] What is your uri_protocol set to? Also don't bother checking crontab if you can't run them from the CLI! Crontab Codeigniter 403 - El Forum - 06-07-2011 [eluser]christeso[/eluser] $config['uri_protocol'] = "AUTO"; I don't check crontab if I can't get cli to run it. Crontab Codeigniter 403 - El Forum - 06-07-2011 [eluser]Clooner[/eluser] I've read your problem again and when using the cli you should use the php binary to call the index.php file directly and not using wget/curl(are http regular requests) Crontab Codeigniter 403 - El Forum - 06-07-2011 [eluser]christeso[/eluser] Thanks. Can you show me or point me to a working example? Crontab Codeigniter 403 - El Forum - 06-07-2011 [eluser]Clooner[/eluser] [quote author="christeso" date="1307489291"]Thanks. Can you show me or point me to a working example?[/quote] Google it! Crontab Codeigniter 403 - El Forum - 06-07-2011 [eluser]christeso[/eluser] Getting closer. Error: php /var/www/vhosts/myserver/cron/test_dm.php PHP Warning: require(/var/www/vhosts/myserver/system/application/config/constants.php): failed to open stream: No such file or directory in /var/www/vhosts/myserver/system/core/CodeIgniter.php on line 49 PHP Fatal error: require(): Failed opening required '/var/www/vhosts/myserver/system/application/config/constants.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/vhosts/myserver/system/core/CodeIgniter.php on line 49 |