Which PHP should be used?

Started by edoniti, December 30, 2014, 01:05:48 AM

Previous topic - Next topic

edoniti

It is a little bit confusing which PHP should be used, the one at /usr/local/php or /usr/local/cwp/php54 or /usr/local/cwp/php ?

Because if you go at PHP.ini Configuration menu it will edit this file /usr/local/php/php.ini

While at the bottom of PHP info "Loaded Configuration File => /usr/local/cwp/php54/php.ini"
But at the table of PHP Info it is "Loaded Configuration File /usr/local/php/php.ini"

I have seen that if I used crontab I had to execute using "/usr/local/cwp/php54/bin/php" because with only "php" it did not work. But now on a laravel web site using "/usr/local/cwp/php54/bin/php" does not recognize PDO drivers, that is why I am confused where I have to focus at which PHP to configure properly ?

misterpat

I also had the cron issue with php. Through some Google searching, I came up with this:

SSH into the server under the user who will be running the cron job.

[user@server ~]$ which php
/usr/local/bin/php


I then changed my cron for that user from just php to /usr/local/bin/php and all is well.

edoniti

Hello,

That works now with /usr/local/bin/php, but it is a bit confusing that part at PHP Info "Loaded Configuration File => /usr/local/cwp/php54/php.ini" makes people confused which is used.

Best regards,
Edoniti.