Author Topic: Which PHP should be used?  (Read 8658 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Which PHP should be used?
« on: December 30, 2014, 01:05:48 AM »
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 ?
« Last Edit: December 30, 2014, 01:11:33 AM by edoniti »

Offline
*
Re: Which PHP should be used?
« Reply #1 on: December 30, 2014, 01:57:55 AM »
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.

Code: [Select]
[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.

Offline
*
Re: Which PHP should be used?
« Reply #2 on: December 31, 2014, 12:00:33 PM »
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.