Welcome Guest, Not a member yet? Register   Sign In
Crontab Codeigniter 403
#1

[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:Adv...ronScript/ and this one that states 2.02 can be run from cli http://ellislab.com/codeigniter/user-gui...l/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
#2

[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!
#3

[eluser]christeso[/eluser]
$config['uri_protocol'] = "AUTO";

I don't check crontab if I can't get cli to run it.
#4

[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)
#5

[eluser]christeso[/eluser]
Thanks.

Can you show me or point me to a working example?
#6

[eluser]Clooner[/eluser]
[quote author="christeso" date="1307489291"]Thanks.

Can you show me or point me to a working example?[/quote]

Google it!
#7

[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




Theme © iAndrew 2016 - Forum software by © MyBB