Added the following under Dynamic Extensions
in both php.ini's (Apache's, and the normal one found with: sudo updatedb && locate php.ini
)
extension=raphf.so
extension=propro.so
extension=http.so
Ran the following installs, which all worked:
sudo apt-get install libpcre3-dev php5-dev php-pear
sudo pecl channel-update pecl.php.net
sudo pecl install pecl_http
Yet testing it still fails
php -r 'http_post_data();'
PHP Fatal error: Call to undefined function http_post_data() in Command line code on line 1
PHP Stack trace:
PHP 1. {main}() Command line code:0
What am I missing?
Ran across the same issue myself. http_post_data() is provided by v1 of this PECL extension, not v2 which is the default to install.
Re-install via
pecl install -f pecl_http-1.7.6
After that:
Ubuntu PHP usually comes with some help functions
php5enmod
andphp5dismod
. These map to enabling modules by name found in/etc/php5/mods-available
and symlinking them as appropriate to/etc/php5/[SAPI]/conf.d
, where the sapi is usually "cli", "fpm", or "apache2".I would check to make sure the ini files you referenced, presumably found in
/etc/php5/mods-available
have been symlinked to/etc/php5/cli/conf.d
and/or/etc/php5/apache2/conf.d
. You can usesudo php5enmod -s ALL mod_name_here
to create those symlinks for you for all SAPI's (cli, apache, etc). "mod_name_here" is usually the name of the INI file created minus the.ini
extension portion.I'm making some assumptions about your system though, for example I don't know if you've installed PHP from
apt-get
/aptitude
or if you've compiled from source, so your mileage may vary.