Jeremy Jackson
Jeremy Jackson

Reputation: 2257

Issues Running CodeIgniter from CLI

I've followed the directions here to run codeigniter from the cli, but I'm not having any luck getting it to run. PHP is in my path, but when I run

php index.php tools message

Nothing happens. If I try

php index.php/tools/message

I get "Could not open input file: index.php/tools/message."

If I run php -v on my cli I get

PHP 5.3.24 (cli) (built: Apr 10 2013 18:32:42)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies

So, it has cli support. Any idea on what I could be doing wrong?

Upvotes: 1

Views: 2528

Answers (2)

Jeremy Jackson
Jeremy Jackson

Reputation: 2257

Those methods didn't work for me, so I wound up using

curl <full url to function>

Upvotes: 0

saqibahmad
saqibahmad

Reputation: 962

i run the cron job using this

/path/tosite/index.php memberController memberFunct

In your case

/path/tosite/index.php tools message

for you case for more details read this https://ellislab.com/codeigniter/user-guide/general/cli.html#what

Complete Line is:

*/5 * * * * /usr/bin/php /path/tosite/index.php memberController genFunction  /dev/null 2>&1

Upvotes: 1

Related Questions