In many Linux vps/server one-click installation Environment Package, LLSMP user volume is actually more, because less resources, by saving resources, small memory VPS host use, The default PHP version is 5.2 or choose to install the 5.3 version, this is not a recent period of time the PHP version of the vulnerability needs to be patched and upgraded PHP, before the old left there are other commonly used to provide a key package and the Web panel upgrade and patch methods.
Just a little time at noon. LLSMP a key package environment of the PHP upgrade method to test several machines, there is no problem, so the method to share out so that the need for friends can refer to use. A key package using Litespeed drive, itself is with the panel, we can directly in the Litespeed panel to upgrade.
Reminder: It's a good idea to back up your site data before you upgrade to avoid any unusual problems.
First, login Litespeed upgrade the latest version
The default installation of the Litespeed version is a bit low, we see a new version of the prompts, click to upgrade to the latest version.
See the above picture hint, click the Available button link, and then select 4.2.23 Direct download/upgrade to upgrade. Reboot the panel after the upgrade is complete.
Second, Litespeed upgrade PHP version
After upgrading to the latest litespeed, we can see the latest PHP version options.
See above, click Actions-compile php, and then see all the PHP versions that can be upgraded/degraded.
Here old left here Select 5.4.41 version, click on the back next to continue. If you need a different version of our own choice.
B-ready to download and compile PHP
To see the above interface, we can choose the components that need to be installed, also can not move by default, then click the Build PHP 5.4.4 button to continue. Then there is the official download of the PHP installation package.
Depending on the performance of the VPS server download and update speed somewhat different, see download complete, we click Next to continue to update.
See this interface, we need to login ssh, and then drop the script
The code is as follows |
Copy Code |
/usr/local/lsws/phpbuild/buildphp_manual_run.sh
|
Then perform the upgrade PHP process, the process is a little bit longer, about 20 minutes, we have to wait, see the upgraded interface can be.
See here to upgrade completed, and then click Apply Changes to restart the panel will take effect.
Third, reconfigure the php.ini file to take effect
CP told me that I need to modify the php.ini configuration, but do not know what to modify, and then find p always help solve, find LLSMP php.ini file address.
The code is as follows |
Copy Code |
/usr/local/lsws/lsphp5/lib/php.ini
|
Then modify the three parameters inside.
Comment out two parameters:
A-MAGIC_QUOTES_GPC = on and register_long_arrays = on front plus;
The b-allow_call_time_pass_reference parameter modifies on to off
Then we'll reboot the Litespeed panel.
Finally, we execute the/usr/local/lsws/lsphp5/bin/php-v command to look at or drop a phpinfo file to see if it is an upgraded PHP5.4.41 version of PHP.