Last update at :2024-06-19,Edit by888u
Among the many Linux VPS/server one-click installation environment packages, LLsMP actually has a relatively large number of users. Because it takes up less resources, it is widely used by resource-saving and small-memory VPS hosts. The default PHP version is 5.2 or you can choose to install it. Install version 5.3. PHP version vulnerabilities have recently appeared and require patching and upgrading PHP. Previously, Snail also provided upgrade and patching methods for other commonly used one-click packages and WEB panels.
The latest WDCP panel security patch package and PHP version vulnerability patch and PHP upgrade 5.6.9
LNMP one-click package environment upgrades PHP version to solve Multipart/form-data vulnerability problem
AMH4.2 panel upgrade PHP patch solves Multipart/form-data vulnerability problem
I just took some time at noon to test the PHP upgrade method for the LLSMP one-click package environment on several machines. No problems have been found so far, so I will share the method so that friends in need can refer to it. The one-click package uses litespeed driver and comes with a panel. We can upgrade it directly in the litespeed panel.
Reminder: It is best to back up website data before upgrading to avoid abnormal problems.
First, log in to litespeed to upgrade to the latest version
The litespeed version installed by default is a bit low. When we see a prompt for a new version, we click to upgrade to the latest version.
See the prompt above, click the AVAILABLE button link, and then select 4.2.23 Direct Download/Upgrade to upgrade. After the upgrade is completed, restart the panel.
Second, LiteSpeed upgrades PHP version
A – Select PHP version
After upgrading to the latest LiteSpeed, we can see the latest PHP version option.
See the picture above, click ACTIONS – Compile PHP, and then you can see all PHP versions that can be upgraded/downgraded.
Select version 5.4.41 here, click NEXT to continue. If other versions are needed, we will choose them ourselves.
B – Prepare to download and compile PHP
Seeing the above interface, we can select the components that need to be installed, or leave them alone by default, and then click the BUILD PHP 5.4.4 button to continue. Then download the PHP installation package from the official website.
Need to add compilation in Conflgure Parameters:
\\'–with-pdo-mysql\\' \\'–with-mysql\\' \\'–with-mysqli\\' \\'–with-zlib\\' \\'–with -gd\\' \\'–enable-shmop\\' \\'–enable-track-vars\\' \\'–enable-sockets\\' \\'–enable-sysvsem\\' \\' –enable-sysvshm\\’ \\’–enable-magic-quotes\\’ \\’–enable-mbstring\\’ \\’–with-iconv\\’ \\’–with-litespeed\\’ \ \'–enable-inline-optimization\\' \\'–with-curl\\' \\'–with-curlwrappers\\' \\'–with-mcrypt\\' \\'–with-mhash\\ ' \\'–with-mime-magic\\' \\'–with-openssl\\' \\'–with-freetype-dir=/usr/lib\\' \\'–with-jpeg-dir= /usr/lib\\'
Copy it and compile it together.
The download and update speeds vary depending on the performance of the VPS server. When the download is complete, we click NEXT to continue the update.
C – Upgrade PHP version
Seeing such an interface, we need to log in to SSH and then throw in the script
/usr/local/lsws/phpbuild/buildphp_manual_run.sh
Then execute the PHP upgrade process. This process is a bit long, about 20 minutes. We only have to wait until we see the upgrade completed interface.
When you see this, the upgrade is complete, then click Apply Changes to restart the panel and it will take effect.
Third, reconfigure the PHP.INI file to take effect
CP told me that I needed to modify the PHP.INI configuration, but I didn’t know what to modify. Later, I asked Mr. P to help solve the problem and found the address of the PHP.INI file of LLSMP.
/usr/local/lsws/lsphp5/lib/php.ini
Then modify the three parameters inside.
Comment out the two parameters:
A – magic_quotes_gpc = On and register_long_arrays = On are preceded by ; symbols and commented out.
B – Change the allow_call_time_pass_reference parameter from On to Off
Then we restart the LITESPEED panel.
Finally, we execute the /usr/local/lsws/lsphp5/bin/php -v command to see or drop a PHPINFO file to see if it is the upgraded PHP5.4.41 version of PHP.
Recommended site search: free IP address in mainland China, free IP proxy, Beijing domain name registration, hosting space, domain name query, Wanwang domain name registration official website, asp hosting space, domain name registration service website Hong Kong server rental 99idc, mainland China free of registration space,
发表评论