Protocol-buffers – Install extension in PHP

I am trying to install the extension of PHP 5.3.6 on Ubuntu 11.10.
The extension is: php- from https://github.com/allegro/php-protobuf protobuf.

First I compile it: phpize,./configure,make and finally sudo make install. I have:

Install the shared extension: /usr/lib/php5 / 20090626 /

ziel@ziel:/usr/lib/php5/20090626$ls -la protobuf.so 
-rwxr-xr-x 1 root root 113599 2013-06-13 20:48 protobuf.so

In /etc/php5/apache2/php.ini I set:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
extension_dir = "/usr/lib/php5/20090626/"
extension="/usr /lib/php5/20090626/protobuf.so"

But php -m means that the protobuf extension is not loaded.

[Solved]
Everything I did is fine. When I execute the code through apache, it works. I realized that the php from the console needs to include php.ini.

Just specify “protobuf.so” in the extension_dir INI entry. (Also check the Apache error log file)

About php cli, check the search for php.ini Location.

php -i | grep .ini

I am trying to install PHP 5 on Ubuntu 11.10 .3.6 extension.
The extension is: php-protobuf from https://github.com/allegro/php-protobuf.

First I compile it: phpize,./ configure, make and finally sudo make install. I have:

Install the shared extension: /usr/lib / php5 / 20090626 /

ziel@ziel: /usr/lib/php5/20090626$ls -la protobuf.so 
-rwxr-xr-x 1 root root 113599 2013-06-13 20:48 protobuf.so

In /etc /php5/apache2/php.ini I set:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/ extension-dir
extension_dir = "/usr/lib/php5/20090626/"
extension="/usr/lib/php5/20090626/protobuf.so"

But php- m means that the protobuf extension is not loaded.

[Solved]
Everything I do is fine. When I execute the code through apache, it works. I realize that the php from the console needs to include php.ini.

Just specify “protobuf.so” in the extension_dir INI entry. (Also check the Apache error log file)

< /p>

About php cli, check where you are searching for php.ini.

php -i | grep .ini

Leave a Comment

Your email address will not be published.