![]() |
File not executed when running from terminal - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: File not executed when running from terminal (/showthread.php?tid=58951) |
File not executed when running from terminal - El Forum - 08-07-2013 [eluser]djuric[/eluser] hi guys, I need to run a file using CLI ( will later use it for cron ) but somehow it's not being executed. I tested by adding email function somewhere in the middle of the file so i get email ( if program gets to this line ) but no luck ( even if I put it on top ) I tried different file ( which is just in /var/www/codeigniter/test.php and not run through codeigniter ) and this works fine Command I ran: Code: php /var/www/codeigniter/index.php cron dothis and what I get is: Code: Set-Cookie: ci_session=a:5:{s:10:"session_id";s:32:"86a27290ff1a94dc58db92a416e213a3";s:10:"ip_address";s:7:"0.0.0.0";s:10:"user_agent";b:0;s:13:"last_activity";i:1375930801;s:9:"user_data";s:0:"";}bb99518e71917592e4545375908dd57c; expires=Thu, 08-Aug-2013 05:00:01 GMT; path=/ so basically it outputs my home file HTML. I have sessions class auto loaded and changed core/Input.php due to this error which is NOT fixed in 2.1.4 Any suggestion appreciated File not executed when running from terminal - El Forum - 08-08-2013 [eluser]ivantcholakov[/eluser] Maybe command line requests are not detected properly on this machine. You may try this file for testing, it implements the CI's method for CLI detection: detect_cli.php Code: <?php |