Critical PHP updates

Some of my server cannot update PHP 8.0. It's error like this. Any ideas to solve the issues?

# da build php 8.0
download_cached: using cached '/usr/local/directadmin/custombuild/cache/php-8.0.22.tar.gz' file
Patching PHP 8.0 ...
patching file ext/openssl/openssl.c
Hunk #1 succeeded at 1313 (offset -12 lines).
patching file ext/intl/config.m4
patching file ext/xml/compat.c
Hunk #1 succeeded at 374 (offset -1 lines).
patching file ext/xml/tests/gh14834.phpt
patching file ext/standard/tests/ghsa-wpj3-hf5j-x4v4.phpt
patching file main/php_variables.c
Hunk #2 FAILED at 119.
Hunk #3 succeeded at 222 (offset -14 lines).
Hunk #4 succeeded at 265 (offset -14 lines).
1 out of 4 hunks FAILED -- saving rejects to file main/php_variables.c.rej
patching file NEWS
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file NEWS.rej
patch_dir_apply: failed to apply '/usr/local/directadmin/custombuild/patches/php-8.0/100-php-cve-2024-2756.patch' patch
install_php: failed to compile '/usr/local/directadmin/custombuild/cache/php-8.0.22.tar.gz' inside '/usr/local/directadmin/custombuild/tmp/tmp.DKAlQ1r4mn.php-8.0.22.tar.gz'

This is Almalinux 8.0 that we have schedule plan to migrate on Oct 26 but if no workaround I think I will migrate tonight o_Oo_O
 
After updating PHP, Roundcube/phpMyAdmin were still routed to an old PHP 8.1 installation via httpd-hostname.conf.

Running da build rewrite_confs switched webapps to the configured primary PHP 8.5 and generated its 50-webapps.ini.

Worth checking the webapps handler after updating PHP.
 
Last edited:
Why don't you (the ones running older versions) update your code to run under a more modern version? I had to patch some sites but that was, with AI help really easy.
 
  • Haha
Reactions: mmx
Some of my server cannot update PHP 8.0. It's error like this. Any ideas to solve the issues?



This is Almalinux 8.0 that we have schedule plan to migrate on Oct 26 but if no workaround I think I will migrate tonight o_Oo_O
As I see on my AL 9.8 I have PHP 8.0.30 and I can build it without any issues. In your case you still have 8.0.22 one. Please try checking it closer.
 
Code:
[root@*redacted*~]# da build php

download_cached: downloading 'https://www.php.net/distributions/php-8.2.35.tar.gz' to '/usr/local/directadmin/custombuild/cache/php-8.2.35.tar.gz'
Warning: Transient problem: timeout Will retry in 1 seconds. 3 retries left.
Warning: Transient problem: timeout Will retry in 2 seconds. 2 retries left.
Warning: Transient problem: timeout Will retry in 4 seconds. 1 retries left.  #           #           #
-=O=-                                                                                                   #          #          #        #
curl: (28) Connection timed out after 10000 milliseconds
safe_download: downloading 'https://www.php.net/distributions/php-8.2.35.tar.gz' to '/usr/local/directadmin/custombuild/tmp/tmp.NB0kOtwGUr.safe_download' failed (0/3)
##O=#    #
curl: (22) The requested URL returned error: 404
safe_download: downloading 'https://files.directadmin.com/cache/php-8.2.35.tar.gz' to '/usr/local/directadmin/custombuild/tmp/tmp.NB0kOtwGUr.safe_download' failed (0/3)
Warning: Transient problem: timeout Will retry in 1 seconds. 3 retries left.
Warning: Transient problem: timeout Will retry in 2 seconds. 2 retries left.
Warning: Transient problem: timeout Will retry in 4 seconds. 1 retries left.  #           #           #
-=O=-                                                                                                   #          #          #        #
curl: (28) Connection timed out after 10001 milliseconds
safe_download: downloading 'https://www.php.net/distributions/php-8.2.35.tar.gz' to '/usr/local/directadmin/custombuild/tmp/tmp.NB0kOtwGUr.safe_download' failed (1/3)
curl: (22) The requested URL returned error: 404
safe_download: downloading 'https://files.directadmin.com/cache/php-8.2.35.tar.gz' to '/usr/local/directadmin/custombuild/tmp/tmp.NB0kOtwGUr.safe_download' failed (1/3)
Warning: Transient problem: timeout Will retry in 1 seconds. 3 retries left.
Warning: Transient problem: timeout Will retry in 2 seconds. 2 retries left.
Warning: Transient problem: timeout Will retry in 4 seconds. 1 retries left.  #           #           #
-=O=-                                                                                                   #          #          #        #
curl: (28) Connection timed out after 10001 milliseconds
safe_download: downloading 'https://www.php.net/distributions/php-8.2.35.tar.gz' to '/usr/local/directadmin/custombuild/tmp/tmp.NB0kOtwGUr.safe_download' failed (2/3)
curl: (22) The requested URL returned error: 404
safe_download: downloading 'https://files.directadmin.com/cache/php-8.2.35.tar.gz' to '/usr/local/directadmin/custombuild/tmp/tmp.NB0kOtwGUr.safe_download' failed (3/3)

Tried several times over the past 1,5 hours. What can be the reason?
 
As I see on my AL 9.8 I have PHP 8.0.30 and I can build it without any issues. In your case you still have 8.0.22 one. Please try checking it closer.

May I know how to do it?
I checked in versions.txt

# cat versions.txt | grep 'php80'
php80:8.0.30:

It's mentioned 8.0.30 already but when try to build php 8.0 it's still loading 8.0.22

# cat versions.txt | grep 'php80'
php80:8.0.30:
# da build clean
cleaning up temporary build dir '/usr/local/directadmin/custombuild/tmp'
cleaning up download cache dir '/usr/local/directadmin/custombuild/cache'
removed '/usr/local/directadmin/custombuild/cache/php-8.0.22.tar.gz'
# da build update
directadmin current 1.712 d957aed17d065aaa71291aed792cd72158492a01 is already latest
# da build php 8.0
download_cached: downloading 'https://www.php.net/distributions/php-8.0.22.tar.gz' to '/usr/local/directadmin/custombuild/cache/php-8.0.22.tar.gz'
#################################################################################################################################################################### 100.0%
Patching PHP 8.0 ...
patching file ext/openssl/openssl.c
Hunk #1 succeeded at 1313 (offset -12 lines).
patching file ext/intl/config.m4
patching file ext/xml/compat.c
Hunk #1 succeeded at 374 (offset -1 lines).
patching file ext/xml/tests/gh14834.phpt
patching file ext/standard/tests/ghsa-wpj3-hf5j-x4v4.phpt
patching file main/php_variables.c
Hunk #2 FAILED at 119.
Hunk #3 succeeded at 222 (offset -14 lines).
Hunk #4 succeeded at 265 (offset -14 lines).
1 out of 4 hunks FAILED -- saving rejects to file main/php_variables.c.rej
patching file NEWS
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file NEWS.rej
patch_dir_apply: failed to apply '/usr/local/directadmin/custombuild/patches/php-8.0/100-php-cve-2024-2756.patch' patch
install_php: failed to compile '/usr/local/directadmin/custombuild/cache/php-8.0.22.tar.gz' inside '/usr/local/directadmin/custombuild/tmp/tmp.ccBP9jJv9g.php-8.0.22.tar.gz'

Thank you.

Update

I fixed this issues by
change version at versions.txt

php80:8.0.30: => php80:8.0.22:

then I run build da php 8.0 and it's will fail
then I change it back to php80:8.0.30 and then build it again. It's work.
Have no ideas why but it's work now. Thank you.
 
Last edited:
Why don't you (the ones running older versions) update your code to run under a more modern version? I had to patch some sites but that was, with AI help really easy.

Tell that to the clients that don't want to pay for upgrading their Magento 1.9x CE installation. Some of us are just sysadmins getting paid to keep it running at all costs.
 
Is it possible to update on CentOS 7? I am helping a friend of mine but running a EOL os :')

Da will not get a update:
directadmin current v1.668 bca79c43d780533cba222b06b8210ccc3357cf70 is already latest
 
Tell that to the clients that don't want to pay for upgrading their Magento 1.9x CE installation. Some of us are just sysadmins getting paid to keep it running at all costs.

Exactly. Some people do not understand at all why some clients are running older PHP versions, though we have adviced them many, many, many times their current PHP-version is not safe, outdated, EOL, end-of-life, not supported, whatever. They don't want to update their application, whatever it is; Magento 1.9 or some custom mumbo written PHP code by someone who died 8 years ago.

And what does it matter anyways? We migrate (when possible) these older customers to a single server with older supported PHP versions. Sure still unsafe, but better than to have multiple older servers, right?

Some people simply do not understand. And probably they only have modern hosting customers or they do not own multiple servers, with multiple hosting accounts/domains along with a big variety of customers?

Anyways. Good job so far @fln and DA team. I can only hope they will provide patches for older PHP-versions as well. Would be great. Plesk seems to less willing. Another reason for us to leave Plesk permantly (next to the absurd price hikes every single year, 7th year in row.... Fxxx WebPros).
 
  • Like
Reactions: mmx
I don't want to be rude, but seriously, CentOS 7 is so outdated that you could do already an in-place upgrade to Almalinux.
 
I don't want to be rude, but seriously, CentOS 7 is so outdated that you could do already an in-place upgrade to Almalinux.
Depends on the virtualization ofcourse. Not always possible and also not always without issues...
 
Back
Top