0

To run PHP CLI on my centos virtualbox image I need to type

source /opt/remi/php71/enable

but after rebooting the machine the PHP CLI is down again and I need to do this again...

In best case I would like to have a PHP CLI online before HTTPD service even starts

I guess there is a way to autorun this command, but I am not sure if I would do this in the correct way

2 Answers 2

0

As enable file is only about exporting environment paths I just did

cp /opt/remi/php71/enable /etc/profile.d/php71.sh

It should have a global effect on every machine user

1
  • best would be to simlink - ln -s /opt/remi/php71/enable /etc/profile.d/php71.sh Jun 15, 2017 at 15:31
0

I would like to have a PHP CLI online before HTTPD service even starts

Apache Web server don't need this, as it use either mod_php or php-fpm, not the cli command.

1
  • Unless you work with frameworks like Laravel which comes with own tools that uses PHP CLI on boot. It should not happen, but the programmer can make it happen Jun 15, 2017 at 15:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .