Mobile app version of vmapp.org
Login or Join
Caterina187

: How do I get a better PHP version to work with Plesk? I've had an issue for quite a while now that I don't know how to fix. I'm running a VPS with Ubuntu 12.04 LTS, it has the latest

@Caterina187

Posted in: #ControlPanel #Php #Plesk #Ubuntu

I've had an issue for quite a while now that I don't know how to fix.

I'm running a VPS with Ubuntu 12.04 LTS, it has the latest version of Plesk (12.0.18 Update #34 ). Annoyingly, it only has PHP version 5.3.10 which is too old. I thought it would be fairly simple to update PHP - but it turns out it's not for some reason?

I've tried doing the following:

sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get upgrade


and then running:

/usr/local/psa/bin/php_handler --add -displayname php-5.6.2 -path /usr/bin/php5-cgi -phpini /etc/php5/fpm/php.ini -type fastcgi -id 2


I then go to hosting settings and select the new version of PHP, however nothing happens at all, the phpinfo() still reports running PHP version 5.3.10.

How do I get a better PHP version to work with Plesk?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Caterina187

2 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

I've run into this issue myself, and would recommend not using apt-get and instead installing PHP according to the directions here from Parallels for Multiple PHP Versions in Plesk on Linux:



Be sure to use the new version number of PHP for NN in the above so that you're installing and configuring it in a new directory and path for that version, and run the configure utility with the option --with-config-file-path=/some/path in step 3.

I would not recommend removing all versions of PHP since the control panel will no longer function or be accessible by you and your clients (it runs on PHP). Instead I'd leave the default 5.3.3 version (at the time of this post) for Plesk to use, and assign the updated version in the service plan and hosting settings for specific accounts that need an updated version of PHP:



Plesk will automatically update PHP for the version of PHP that it needs to function along with its other base packages. So if you follow the above, you'll be keeping the base PHP install separate and functioning with fewer potential problems than with updating it to the latest PHP version that might not work well with Plesk.

10% popularity Vote Up Vote Down


 

@Radia820

Rather than using <?php phpinfo(); ?> you should opt to use /usr/local/psa/bin/php_handler --list as this should list what versions of PHP you have installed. If you don't know already Plesk can handle multiple versions of PHP so you should ensure that the the latest php.ini is being used, manually overwrite old with new, but backup first. You should also restart your web server if haven't already.

If you don't want to multiple versions of PHP installed on the server then you can brute force remove them all by doing sudo apt-get -y purge php.*, take a note exactly what gets uninstalled as this will remove everything that starts with php i.e would remove php4 php5-server etc.

If you suspect that a extension has be removed as the result of the upgrade you can check by doing /usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --show-components

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme