No pear and pecl after upgrade php1_release to PHP7.4

Phuturist

Verified User
Joined
Dec 30, 2018
Messages
28
I upgraded my php1_release from PHP7.1 to PHP7.4. All went well but after that I wanted to add the redis extension to PHP7.4 (which is already installed for other PHP version). For installing extensions I use the excellent and easy script from https://help.poralix.com/articles/install-pecl-extension-for-php-directadmin-server

I first checked the status with ./php-extension.sh status redis this indeed tells me it's installed for all PHP versions except PHP7.4. But when I try to run ./php-extension.sh install redis --php=74 I get the following: [ERROR] PECL for PHP version php74 was not found!

I looked into it a little further and I noticed pear, peardev and pecl are missing in /usr/local/php74/bin/. I thought pear and pecl where installed by Directadmin when installing (or upgrading to) a new version of PHP. Am I wrong?

Either way, how can I fix it so that pecl is available and I can install redis for PHP7.4 as well. Thanx in advance.
 
Please seee this thread: https://forum.directadmin.com/threads/php-7-4-pecl.59649/

@wattie: PEAR is disabled by default on PHP 7.4. As "PECL is a repository of PHP extensions that are made available to you via the PEAR packaging system", it also removes the PECL too.

and

@zEitEr: The pear/pecl will be installed as mentioned by user @wattie if you configure PHP 7.4 with the option --with-pear which is missing to my surprise by default.
 
Thanx, I just found that topic half an hour ago and compiled PHP7.4 with pear support. That brought back pear and pecl (although the content of that thread worries me that something needs to change). Unfortuntely I run into another problem where redis can not be installed on PHP7.4. See the error below.

Code:
[root@vps scripts]# ./php-extension.sh install redis --php=74
PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/redis.so (/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/redis.so: cannot open shared object file: No such file or directory), /usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/redis.so.so (/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Updating channel "pecl.php.net"
Update of Channel "pecl.php.net" succeeded
PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/redis.so (/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/redis.so: cannot open shared object file: No such file or directory), /usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/redis.so.so (/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
No releases available for package "pecl.php.net/redis"
download failed
Failed to download a file

Is there any other way I can install redis on PHP 7.4?

[EDIT]
I noticed something strange though. It seems I can not connect to ssl://pear.php.net:443 and ssl://pecl.php.net:443 through PHP7.4 command line. This is perhaps the root cause. Not sure how to fix that though. Do I need to add other stuff to the default compile options of PHP 7.4?

Code:
[root@vps scripts]# pear update-channels
Updating channel "doc.php.net"
Channel "doc.php.net" is up to date
Updating channel "pear.php.net"
Channel "pear.php.net" is not responding over http://, failed with message: Connection to `ssl://pear.php.net:443' failed:
Trying channel "pear.php.net" over https:// instead
Cannot retrieve channel.xml for channel "pear.php.net" (Connection to `ssl://pear.php.net:443' failed: )
Updating channel "pecl.php.net"
Channel "pecl.php.net" is up to date

Code:
[root@vps scripts]# pecl list-all

Notice: Trying to access array offset on value of type bool in PEAR/REST.php on line 181
PHP Notice:  Trying to access array offset on value of type bool in /usr/local/php74/lib/php/PEAR/REST.php on line 181
Connection to `ssl://pecl.php.net:443' failed:
 
Last edited:
Hello @Phuturist , did you ever find the solution? My company project uses Redis with the PHP Redis extension as well and this is the only thing holding me off from upgrading to PHP 7.4
Of course sudo apt install php-redis does not provide the correct version unfortunately, will this be fixed in later Ubuntu versions? Is it possible to install php redis without pecl,
Regards
 
Hello @Phuturist , did you ever find the solution? My company project uses Redis with the PHP Redis extension as well and this is the only thing holding me off from upgrading to PHP 7.4
Of course sudo apt install php-redis does not provide the correct version unfortunately, will this be fixed in later Ubuntu versions? Is it possible to install php redis without pecl,
Regards
 
Hello @Phuturist , did you ever find the solution? My company project uses Redis with the PHP Redis extension as well and this is the only thing holding me off from upgrading to PHP 7.4
Of course sudo apt install php-redis does not provide the correct version unfortunately, will this be fixed in later Ubuntu versions? Is it possible to install php redis without pecl,
Regards
No, I have not solved it. I'm still stuck at the same error of my previous post. PHP7.4 has been compiled with PEAR but I cant add redis due to
No releases available for package "pecl.php.net/redis". I have given up and decided to stick with PHP 7.3.
 
Back
Top