Page 1 of 1

where is PHP CLI ?

Posted: Sun Dec 27, 2015 2:47 am
by baijianpeng
I am using VestaCP v0.9.8 on CentOS with PHP 5.5.30 . Now I want to add a Cron job which has following command:

Code: Select all

/path/to/php      /web/j.com/public_html/cli/akeeba-backup.php
Of course I have to replace the "/path/to/php" part with real PHP CLI path on my server. But I have no idea where is the PHP CLI on VestaCP?

Thank you.

Re: where is PHP CLI ?

Posted: Sun Dec 27, 2015 3:11 am
by baijianpeng
OK, after some search I got the trick:

Just run following command on SSH termianal :

Code: Select all

which php
Then I will get the real path to PHP CLI:
/usr/bin/php
Thank you.

This issue solved.

Re: where is PHP CLI ?

Posted: Mon Dec 28, 2015 11:46 am
by baijianpeng
It seems that this is NOT the PHP CLI. It is fastcgi binary.

Re: where is PHP CLI ?

Posted: Mon Dec 28, 2015 1:39 pm
by skurudo

Code: Select all

rpm -q php-cli
php-cli installed?

Re: where is PHP CLI ?

Posted: Mon Dec 28, 2015 2:04 pm
by baijianpeng

Code: Select all

# rpm -q php-cli
php-cli-5.5.30-1.el7.remi.x86_64
Well, it IS the PHP CLI I was looking for. After some search, now I am sure I had found it. My former post was wrong.