Cannot update php (even though it claims success)

Sygmoral

Verified User
Joined
Aug 15, 2012
Messages
64
Hello! I have a weird issue, so hoping someone can rescue me.

I am currently running mod_php 7.4.1. A few weeks ago, I tried upgrading to 7.4.3, which did not work - it claimed success, but when I tried "./build versions", it shows php 7.4.1 is still installed. I left it alone thinking perhaps it was a temporary issue.

So just now I tried again, upgrading to 7.4.4 this time. It results in the same issue.

Here's part of my options.conf:
Code:
php1_mode=mod_php
php1_release=7.4
php2_mode=php-fpm
php2_release=no

Here's the last few lines of ./build update_versions:
Code:
/usr/local/directadmin/custombuild/php-7.4.4/build/shtool install -c ext/phar/phar.phar /usr/local/bin
ln -s -f phar.phar /usr/local/bin/phar
Installing PDO headers:           /usr/local/include/php/ext/pdo/
Enabling temporary disabled extensions...
Copying php.ini..
/usr/local/php74/lib/php.ini already exists, skipping.
Enabling  mail.add_x_header option in /usr/local/php74/lib/php.ini
Creating symlink for /usr/local/php74/bin/php74...
Creating symlink for /usr/local/php74/bin/lsphp74...
Creating symlink for /usr/local/php74/bin/php-cgi74...
Creating symlink for /usr/local/php74/bin/php-config74...
Creating symlink for /usr/local/php74/bin/phpize74...
There is no ionCube loader available for PHP 7.4.
opCache is now installed for PHP 7.4.
Downloading             ioncube_loaders_lin_x86-64.tar.gz...
--2020-03-28 02:34:18--  https://files.directadmin.com/services/custombuild/ioncube_10.3.9/ioncube_loaders_lin_x86-64.tar.gz
Resolving files.directadmin.com (files.directadmin.com)... 69.162.69.58, 104.128.54.74, 185.42.221.168
Connecting to files.directadmin.com (files.directadmin.com)|69.162.69.58|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12619060 (12M) [application/x-gzip]
Saving to: '/usr/local/directadmin/custombuild/ioncube_loaders_lin_x86-64.tar.gz'

100%[=======================================================================================================================================================================>] 12,619,060  2.29MB/s   in 9.1s

2020-03-28 02:34:28 (1.32 MB/s) - '/usr/local/directadmin/custombuild/ioncube_loaders_lin_x86-64.tar.gz' saved [12619060/12619060]

There is no ionCube loader available for PHP 7.4.
Restarting apache.
Rewriting all users httpd.conf files, please wait...
Debug mode. Level 10

dataskq: command: action=rewrite&value=httpd
PHP 7.4.4 Installed.
I get the same result when I just ./build php.

But, as mentioned, the next ./build versions says:
Code:
PHP 7.4: 7.4.1 to 7.4.4 update is available.

A few notes:
- I tried php1_mode=php-fpm a few months ago, but experienced unexplained occasional crashes, so reverted back to mod_php to ensure stability.
- This is a rather new (virtual private) server, it was installed from scratch in December. I did update php from 7.4.0 to 7.4.1 on 3 January, but that may have been when I was still using php-fpm.

When I go look around in /usr/local/php74/, I see that ./lib has an updated php.ini and php.conf.d contents, and the file links in ./bin are 'updated', but the actual binaries, along with everything else in /usr/local/php74/, is most recently changed on 7 January (or earlier). I do still see a lot of references to php-fpm in that folder, I'm not sure whether I should worry about that.
 
"There is no ionCube loader available for PHP 7.4"
disable ioncube, run build update, and again try to build PHP
 
"There is no ionCube loader available for PHP 7.4"
disable ioncube, run build update, and again try to build PHP
Thanks for the suggestion, tried that, but it doesn't have an effect.
Code:
Build complete.
Don't forget to run 'make test'.

Make Complete
Making PHP 7.4 installation compatible with php.ini file
Temporary disabling extensions...
Installing php...
Installing PHP SAPI module:       apache2handler
/var/www/build/instdso.sh SH_LIBTOOL='/var/www/build/libtool' libphp7.la /usr/lib/apache
/var/www/build/libtool --mode=install install libphp7.la /usr/lib/apache/
libtool: install: install .libs/libphp7.so /usr/lib/apache/libphp7.so
libtool: install: install .libs/libphp7.lai /usr/lib/apache/libphp7.la
libtool: warning: remember to run 'libtool --finish /usr/local/directadmin/custombuild/php-7.4.4/libs'
chmod 755 /usr/lib/apache/libphp7.so
[activating module `php7' in /etc/httpd/conf/httpd.conf]
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20190902/
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing phpdbg binary:         /usr/local/bin/
Installing phpdbg man page:       /usr/local/php/man/man1/
Installing PHP CGI binary:        /usr/local/bin/
Installing PHP CGI man page:      /usr/local/php/man/man1/
Installing build environment:     /usr/local/lib/php/build/
Installing header files:          /usr/local/include/php/
Installing helper programs:       /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
/usr/local/directadmin/custombuild/php-7.4.4/build/shtool install -c ext/phar/phar.phar /usr/local/bin
ln -s -f phar.phar /usr/local/bin/phar
Installing PDO headers:           /usr/local/include/php/ext/pdo/
Enabling temporary disabled extensions...
Copying php.ini..
/usr/local/php74/lib/php.ini already exists, skipping.
Enabling  mail.add_x_header option in /usr/local/php74/lib/php.ini
Creating symlink for /usr/local/php74/bin/php74...
Creating symlink for /usr/local/php74/bin/lsphp74...
Creating symlink for /usr/local/php74/bin/php-cgi74...
Creating symlink for /usr/local/php74/bin/php-config74...
Creating symlink for /usr/local/php74/bin/phpize74...
opCache is now installed for PHP 7.4.
Restarting apache.
Rewriting all users httpd.conf files, please wait...
Debug mode. Level 10

dataskq: command: action=rewrite&value=httpd
PHP 7.4.4 Installed.

[root@funkyserver custombuild]# ./build versions
Latest version of DirectAdmin: 1.60.4
Installed version of DirectAdmin: 1.60.4

[...]

Latest version of PHP 7.4: 7.4.4
Installed version of PHP 7.4: 7.4.1

PHP 7.4: 7.4.1 to 7.4.4 update is available.
 
Thanks for the follow-up. I restarted apache from the DA web UI, and then tried via the console.
Code:
[root@funkyserver ~]# php -v
PHP 7.4.1 (cli) (built: Jan  7 2020 10:22:27) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.1, Copyright (c), by Zend Technologies

Summarizing: from the ./build commands, it looks like php 7.4.4 successfully builds, but at the end, it isn't set to be actually used. Maybe it's building into the wrong directory, or the old version is not being succesfully replaced by it after the build, ...
 
Is there a way to purge everything related to php (mod_php, php_fpm, config files, everything) and rebuild 'for the first time'? I'm not using any custom php.ini. (The only 'unusual thing' I do is add --with-xmlrpc to the ./configure/ap2/configure.php74 script.)

I do hope something like that won't risk leaving me with no php though, as I have live applications running on it 😅
 
Back
Top