Welcome Guest, Not a member yet? Register   Sign In
Cron job bootstrapper: what is the 'full absolute file/path of my CodeIgniter index.php file'
#1

[eluser]russel[/eluser]
hi there,
i am now working with cron job in codeigniter. the codeigniter bootstrapper wiki seems a good solution to CI cron.

there is a line in wiki code:
Code:
define('CRON_CI_INDEX', '/var/www/vhosts/intranet/index.php');   // Your CodeIgniter main index.php file

i put for both sites:
Code:
define('CRON_CI_INDEX', '/var/www/index.php');
and it is working fine in one site.

but in another site it results error like,
Code:
<br />
<b>Warning</b>:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in <b>/home/content/m/o/n/reallycool/html/system/duty/cron.php</b> on line <b>54</b><br /> <br />

i thing i am missing the CRON_CI_INDEX in this case.

the question is how can i get the 'Main CI index.php file' location?
#2

[eluser]russel[/eluser]
don't understand why this topic is showing as 'old post'.
#3

[eluser]eoinmcg[/eluser]
Hi Russel,

You can get the ‘Main CI index.php file’ location as follows:

Code:
echo BASEPATH.'/'.SELF;

then for the Cron job bootstrapper try

Code:
define('CRON_CI_INDEX', BASEPATH.'/'.SELF);

Hopefully that should do it...




Theme © iAndrew 2016 - Forum software by © MyBB