allegro / php-protobuf

PHP Protobuf - Google's Protocol Buffers for PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 7 PHP-PROTOBUF INSTALLATION

MiB3Avenger opened this issue · comments

Hello, I'm trying to install php-protobuf for php 7.0. I have followed this guide to install both protobuf and cruve: link. I have installed cruve, but couldn't install protobuf. Instead I get this when I try to check which modules are loaded (php -m):

^[[6~PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/protobuf.so' - /usr/lib/php/20151012/protobuf.so: cannot open shared object file: No such file or directory in Unknown on line 0

Can anyone help me?

Closing Issue because I didn't search enough to find that it was already answered. To all those who are having same problem and couldn't find it, you need to follow:

git clone https://github.com/serggp/php-protobuf cd php-protobuf git checkout php7 phpize ./configure sudo make sudo make install

Then php -i | grep .ini to to find your php.ini file. It is stored in Loaded Configuration File => /etc/php/7.0/cli/php.ini It might be different that yours or not.

nano /etc/php/7.0/cli/php.ini then CTRL + - then 1916 to get to the last part of the .ini file. It might have few more lines. Navigate to the end and then add extension=protobuf.so and then save it. Use php -m to list all the installed extensions and try to search for protobuf. Cheers!