![]() |
codeigniter command line cron error stating constants already defined - 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: codeigniter command line cron error stating constants already defined (/showthread.php?tid=37129) |
codeigniter command line cron error stating constants already defined - El Forum - 12-29-2010 [eluser]jayapalchandran[/eluser] Hi, I am calling a controller/function from command line like the following like said in other posts of stackoverflow I am in the directory where index.php in located that is document root and i have set path to the php.exe so that i can call it from anywhere. Quote:d:\\www\htdocs\site\> php index.php cronjob localhost /cronjob there is a space between localhost and /crontab and in the index.php i have given Code: if(isset($argv[1]) && $argv[1]=='cronjob') i am setting this because when running from command line server name, document root will be empty For my old projects in codeigniter the above works prefectly. But in my recent projects i get the error constants already defined. there are some constants in constants file but to make it easy for me i have defined all my constants in config.php so i get an error constants already defined. when i checked by echoing a string from config.php it echoed two times... Does the config.php gets executed twice? |