Welcome Guest, Not a member yet? Register   Sign In
Where to set CI_ENV for CI methods executed via cron?
#6

You do not need to do anything to index.php as suggested by spjonez. Index.php already looks at $_SERVER['CI_ENV'] and responds accordingly.

As InsiteFX suggested set .htaccess like this

Code:
   #Set the CodeIgniter Environment.
   SetEnv CI_ENV production

So a command along the lines ought to work.

... php full/path/to/html/root/index.php controller method arg1 argn

The big thing you have to assert is that your server has the env module up an running. It is often not on in shared hosting situations.
Reply


Messages In This Thread
RE: Where to set CI_ENV for CI methods executed via cron? - by dave friend - 04-11-2017, 11:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB