termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
12.99k stars 2.99k forks source link

Package request: pecl #1015

Open Rudloff opened 7 years ago

Rudloff commented 7 years ago

Hello,

There are several tickets asking for PHP extensions. Maybe adding a pecl package could be a helpful workaround, so people can build the extensions themselves.

vaites commented 7 years ago

PEAR and PECL installation fails, but with phpize you can compile extensions. Just install gcc and php-dev, download the extension package and compile it...

Neo-Oli commented 7 years ago

@vaites unfortunately it's not always that easy. I've been trying for almost 2 hours to compile the "apcu" extension.

It compiled and installed finem but it doesn't get loaded by php (I did enable it in the php.ini).

vaites commented 7 years ago

I have some patches to make phpize works without modifications (will publish soon) so I will try to build apcu.

thawkins commented 4 years ago

I have been trying to creste a mongodb driver extension, i can build tbe extension and i can load it, but it only appreas in php cli and not in php-apache, plus its showing a missing function in the error logs of zend_ce_traversable, but only in php-apache and not in tbe php cli

Php -i | grep mongo shows the extensin has loaded on php cli but it does not appear in phpinfo() page under apache

In apache error log..... PHP Warning: PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /data/data/com.termux/files/usr/lib/php/mongodb.so (dl open failed: cannot locate symbol "zend_ce_traversable" referenced by "/data/data/com.termux/files/usr/lib/php/mongodb

On cli $ php -i | grep mongo mongodb libmongoc bundled version => 1.16.0-20191114+gitbef4cf349d libmongoc SSL => enabled libmongoc SSL library => OpenSSL libmongoc crypto => enabled libmongoc crypto library => libcrypto libmongoc crypto system profile => disabled libmongoc SASL => disabled libmongoc ICU => enabled libmongoc compression => enabled libmongoc compression snappy => disabled

From this i conclude there is a difference between the build of the php executable and the libphp7.so apache runtime.

Falconaiz commented 3 years ago

@vaites unfortunately it's not always that easy. I've been trying for almost 2 hours to compile the "apcu" extension. It compiled and installed finem but it doesn't get loaded by php (I did enable it in the php.ini).

Hi @Neo-Oli , do you still remember how to compile "apcu" for php in termux?? I compiled it but in termux it has some problem to make dynamic link for the libraries, when I tryed to invoche the extension "apcu.so" in the php.ini file I get "Unable to load dynamic library 'apcu.so' ...." thankyou