I use centos and php 7.3.2 and Nginx web server
I have installed several packages using pecl. They are all installed successfully.
When I run command "pecl list" or "php -m", I see the name of the desired packages:
Package Version State
PDO_IBM 1.5.0 stable
apcu 5.1.21 stable
ibm_db2 2.1.5 stable
igbinary 3.2.7 stable
raphf 2.0.1 stable
I have also checked the php version related to CLI with phpinfo() function. Both of them are one.
I have also run the "pecl config-show" command. Its php path is correct
I have also checked the following values. CLI and phpinfo() are the same
PHP API 20180731
PHP Extension 20180731
Zend Extension 320180731
However, I cannot see the installed modules on the phpinfo() page. And their functions don't work either
Related
I'm currently attempting to upgrade Xdebug 2.8.1 to 2.9.0 in order to resolve performance issues on code coverage report generation as reported in https://bugs.xdebug.org/view.php?id=1717.
My system is Ubuntu 19.10, running a Vagrant VM with Debian GNU/Linux 9 (stretch). The VM has multiple versions of PHP running, to support multiple applications on our stack. Those versions are 5.6, 7.0, 7.1, 7.2, 7.3, and 7.4.
The only version of Xdebug available through apt is version 2.8.1, so I've attempted the following methods:
Using Pecl, with apt-get install php-dev, pecl channel-update pecl.php.net, and pecl install xdebug.
Using the Xdebug wizard at https://xdebug.org/wizard, which has instructions for manually unpacking the .tgz file, compiling the xdebug.so, and placing it in the correct folder.
However, in both of these methods, when adding zend_extension=/path/to/xdebug.so to the appropriate php.ini file and restarting the web server, I'm given the following error: Failed loading /usr/lib/php/20180731/xdebug.so: /usr/lib/php/20180731/xdebug.so: undefined symbol: zend_post_startup_cb.
Can anyone provide further guidance?
I've found the solution to the problem.
When installing php-dev the package selected at the time of this writing is for PHP 7.3, when the server's default PHP version is 7.1. By installing php7.1-dev I was able to perform the install using either of the above processes without issue.
I need to install mcrypt for php on my Linux server. I have PECL, and PHP 7.2 running on API version 20170718 (i.e., all the PHP *.so extensions are loaded from /usr/bin/php/20170718). But, when I run,
pecl install mcrypt-1.0.1
It says,
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
libmcrypt prefix? [autodetect] : ...
And if I install it, the wrong version gets installed, and it doesn't appear because I'm running php API version 20170717, not 20180731. In addition, including it directly from the /usr/bin/php/20180731 directory still causes it to crash since it recognizes it's the wrong API version.
How can I install the proper mcrypt version for PHP API version 20170718?
I need php-cli module installed and working but when I run php -m this module is not listed although it's installed via yum. Both php-cli and php are listed and have the same version which are Version 5.4.16 release 36.3.el7_2. How can I make sure this module is correctly installed? phpinfo does not indicate the module is installed either.
I am trying to install pecl_http on Ubuntu 14.04, however it reports to require PHP 7.
$ sudo pecl install pecl_http
pecl/pecl_http requires PHP (version >= 7.0.0), installed version is 5.5.9-1ubuntu4.14
pecl/raphf requires PHP (version >= 7.0.0), installed version is 5.5.9-1ubuntu4.14
pecl/propro requires PHP (version >= 7.0.0), installed version is 5.5.9-1ubuntu4.14
No valid packages found
install failed
$
Similarly on Debian:
pecl/pecl_http requires PHP (version >= 7.0.0), installed version is 5.6.17-0+deb8u1
pecl/raphf requires PHP (version >= 7.0.0), installed version is 5.6.17-0+deb8u1
pecl/propro requires PHP (version >= 7.0.0), installed version is 5.6.17-0+deb8u1
I can't find changelog any information that pecl_http is not backward compatible with PHP 5.x.
I tried with PHP 7.0 and it installed successfully, but is there anything I can do to install it with PHP 5.x?
You'll need to find out what version of pecl_http doesn't require the current version of PHP, and then specifically install that one. According to the documentation:
"Package[-version/state][.tar]" : queries your default channel's server
(pear.php.net) and downloads the newest package with
the preferred quality/state (stable).
To retrieve Package version 1.1, use "Package-1.1," to retrieve
Package state beta, use "Package-beta." To retrieve an uncompressed
file, append .tar (make sure there is no file by the same name first)
And according to the changelog, pecl_http 3.0 is the first PHP 7 compatible version, so maybe try the previous.
Final answer: you'd be looking for sudo pecl install pecl_http-2.5.5
This question has an accepted answer, but I will add my 2 cents to the subject:
Based on your PHP version:
for PHP 7 use 'pecl install oci8'
for PHP 5.2 to 5.6 use 'pecl install oci8-2.0.12'
for PHP 4.3.9 to 5.1 use 'pecl install oci8-1.4.10'
OCI8 2.0.12 is the final release for PHP 5.6.x
OCI8 2.1.x is only valid for PHP 7
Installing OCI8 for PHP 5.6.31:
[root#server bin]# ./pecl install oci8-2.0.12
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading oci8-2.0.12.tar ...
Starting to download oci8-2.0.12.tar (1,615,360 bytes)
....
11 source files, building
running: phpize
Configuring for:
...
Expected output for PHP 5.6.31 and OCI8 2.0.12
This is the easiest way to install OCI8 support.
I've installed the sphinx binaries and libraries and am now trying to install the PECL sphinx module.
My system is running OS X 10.6 with MAMP 1.8.2 installed. I try to install sphinx using the following command:
sudo pecl install sphinx
The PECL command outputs the following:
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
The versions above don't match the versions listed when doing a phpinfo(). It seems that PECL is trying to complie against the built-in version of PHP.
If I ignore the errors and continue the it will successfully compile and place the sphinx.so file in:
/usr/lib/php/extensions/no-debug-non-zts-20090626/sphinx.so
when in fact it should be:
/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/
I've tried copying the sphinx.so file to the MAMP extensions dir but when I restart apache PHP displays the following warning:
PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/sphinx.so
I think this is because MAMP is 32bit and the built-in PHP is 64bit so PECL complies for 64bit. I might be completely wrong but I did read this when I goggled on the topic.
Does anyone know how to get PECL to map to the MAMP version of PHP instead of the built-in version?
If the "correct" version of PHP is installed in something like /Applications/MAMP/bin/php5/, and has the development tools included, you should have some version of the pecl command to go with it, some next to that directory.
If so, running that pecl command that corresponds to your "correct" version of PHP should help : it'll run the correct version of phpize, and will allow the extension to be compiled against the (once again) correct version of PHP.
You just have to hope that MAMP includes those commands -- I cannot check, as I don't have a mac.