Control Web Panel
WebPanel => PHP => Topic started by: victorgomes on December 08, 2024, 10:39:49 PM
-
when installing php version 8.3.14 using php switch version the extensions readline is not being installed.
do you guys know how to solve it?
php -a
SourceGuardian requires Zend Engine API version 420220829.
The Zend Engine API version 420230831 which is installed, is newer.
Contact SourceGuardian Ltd. at https://www.sourceguardian.com/ for a later version of SourceGuardian.
Interactive shell (-a) requires the readline extension.
-
Which version of php do you have set for CLI use?
-
PHP 8.3.14 (cli) (built: Dec 9 2024 03:06:51) (NTS)
-
when running command:
cat /var/log/php-rebuild.log | grep readline
i got these informations:
Package readline-devel-8.1-4.el9.x86_64 is already installed.
Link pcre2test with libreadline .... : no
checking for phpdbg readline support... no
checking for phpdbg and readline integration... disabled
checking for libedit readline replacement... no
checking for readline support... no
-
Try to install libedit, libedit-devel:
yum install libedit-devel libedit
and then compile php again.
-
it is already installed.
-
Then try to install the extension readline manually:
cd /usr/local/src/
wget https://www.php.net/distributions/php-8.3.14.tar.gz
tar -xvzf php-8.3.14.tar.gz
cd php-8.3.14/ext/readline
phpize
./configure
make
make install
echo "extension=readline.so" > /usr/local/php/php.d/readline.ini
Make sure there are no errors and the file readline.so exists in /usr/local/lib/php/extensions/no-debug-non-zts-XXXXXXXX/
If everything is ok then check 'php -a' again.
If you get some errors then show us the errors.
-
hi, thank you so much it worked!
but also i had to run command:
./configure
after command:
phpize
-
Yes, `configure` is necessary to perform the installation. Sorry for that. I was in hurry. Updated my previous post.
Also, in case you update PHP using php switch then make sure to update readline if it isn't updated automatically by php switch.