Author Topic: PHP-FPM PHP 8.2 & 8.3 failing to update - CWPpro version: 0.9.8.1178  (Read 1912 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Hi,

I've been using the PHP-FPM selector for years, and tried manually updating PHP 8.1, 8.2 & 8.3 today to their latest versions...

Although getting a notification that the PHP updates had completed successfully, I notice that only PHP 8.1 had updated correctly to 8.1.28, the other versions are still at 8.2.17 & 8.3.4.

I again tried updating the 8.2 & 8.3 to the latest version. There were no error messages in the update log. The log seems to say that the new version numbers are being installed... but the currently installed versions remain at the old version.

I have also tried rebooting the server, but no change. PHP 8.1 is the latest version but 8.2 & 8.3 are still at the old version.

I guess that the is some error/bug in the latest CWP Panel version regarding this.

Thanks, Stephen

Offline
*****
Just tried, 8.2.17 to 8.2.19 updated without problems on AlmaLinux 8.9 with 0.9.8.1178

Also manually updated ionCube from 13.0.2 to 13.0.3

Offline
*
I'm still on CentOS7, and here switching to PHP 8.2.19 fails, while switching to PHP 8.2.18 still works.
The error in the log is:
Code: [Select]
configure: error: *** A compiler with support for C++17 language features is required.So apparently the C compiler on Centos 7 is too old to compile PHP 8.2.19.

I'm currently preparing to switch to Almalinux since Centos 7 will be end of life by June 30, 2024. I hope that this will work without a complete reinstall.

Offline
*****
ELevate should work for you. Just take a full image backup first.

Offline
*
I'm still on CentOS7, and here switching to PHP 8.2.19 fails, while switching to PHP 8.2.18 still works.
The error in the log is:
Code: [Select]
configure: error: *** A compiler with support for C++17 language features is required.So apparently the C compiler on Centos 7 is too old to compile PHP 8.2.19.

I'm currently preparing to switch to Almalinux since Centos 7 will be end of life by June 30, 2024. I hope that this will work without a complete reinstall.

I am also on CentOS7. Likewise, PHP 8.2.18 works but 8.2.19 fails

Offline
***
The default installation of PHP-8.2.19 is failing at this point:
"configure: error: *** A compiler with support for C++17 language features is required"

Install the CentOS SCL repository, this is an environment enabled to run the g++ compiler, with C++17 support:
===========================================
yum installcentos-release-scl -y
===========================================

Install C++ support for GCC version 7:
===========================================
yum install devtoolset-7-gcc-c++ --enablerepo='centos-sclo-rh' -y
===========================================

Just one line in the compiler script solves this problem, changing the environment to this compiler before building PHP version 8.2.19:
===========================================
scl enable devtoolset-7 'bash'
===========================================

After the above command, you can check the g++ version like this:
===========================================
g++ -v
===========================================

...resulting in this:
===========================================
(...)
gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)
===========================================

(Source: <https://access.redhat.com/documentation/en-us/red_hat_developer_toolset/7/html/user_guide/chap-gcc>)

The script must be run with this environment enabled.
Problem solved.

Regards,
Netino

Offline
*
The default installation of PHP-8.2.19 is failing at this point:
"configure: error: *** A compiler with support for C++17 language features is required"

Install the CentOS SCL repository, this is an environment enabled to run the g++ compiler, with C++17 support:
===========================================
yum installcentos-release-scl -y
===========================================


Hi Netino,

Thanks for your suggestion. (Note there is a space missing in your first line between install and centos.)

I now have "gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)", however, this has NOT fixed the problem. The latest versions of PHP 8.2 and 8.3 do not install. There is no obvious error message the log. After trying to install the latest versions, the previous version remains the installed version.

Regards,
Stephen

Offline
***
The default installation of PHP-8.2.19 is failing at this point:
"configure: error: *** A compiler with support for C++17 language features is required"

Install the CentOS SCL repository, this is an environment enabled to run the g++ compiler, with C++17 support:
===========================================
yum installcentos-release-scl -y
===========================================


Yes, you are correct, sorry for the typo.
The correct repository installation is:
===========================================
yum install centos-release-scl -y
===========================================

You must to enable as default that environment.
===========================================
scl enable devtoolset-7 'bash'
===========================================
If did'n worked to you, is because that environment was not enabled by the script.

This can be made by several forms.
For the CWP team, is just to put that line right before the the php-fpm82 script installation invokation, in the php build script.

But for you, as you will use the CWP web environment, the more easy is to rename the file to /usr/bin/g++.old, and create a new script enabling that environment:
========================================================================
# mv /usr/bin/g++ /usr/bin/g++.old
# echo "scl enable devtoolset-7 'bash'" > /usr/bin/g++
# chmod 755 /usr/bin/g++
========================================================================

Only now, then, can you try compiling via CWP web environment.
Now, CWP will use it to build environment, when asked the g++ the environment will be enabled.

After you compile it with success, you need to return to the normal configuration:
========================================================================
# mv /usr/bin/g++ /usr/bin/g++.new
# mv /usr/bin/g++.old /usr/bin/g++
========================================================================
« Last Edit: May 21, 2024, 11:37:04 PM by Netino »

Offline
***
(...)
But for you, as you will use the CWP web environment, the more easy is to rename the file to /usr/bin/g++.old, and create a new script enabling that environment:
========================================================================
# mv /usr/bin/g++ /usr/bin/g++.old
# echo "scl enable devtoolset-7 'bash'" > /usr/bin/g++
# chmod 755 /usr/bin/g++
========================================================================
(...)

Sorry, this step is incomplete.
The correct, after install the environment, is:
========================================================================
# mv /usr/bin/g++ /usr/bin/g++.old
# echo "scl enable devtoolset-7 'bash'" > /usr/bin/g++
# echo "/opt/rh/devtoolset-7/root/usr/bin/g++" >> /usr/bin/g++
# chmod 755 /usr/bin/g++
========================================================================

We are simply using the newly installed 'g++'.
So, I just forget to invoke it.