Skip to content
Shuhei Tanuma edited this page Dec 24, 2013 · 14 revisions

building php-protocolbuffers

linux like system

git clone https://github.com/chobie/php-protocolbuffers.git
cd php-protocolbuffers
phpize
./configure
make
make install
# please add following line to your php.ini
# extension=protocolbuffers.so

windows

git clone https://github.com/chobie/php-protocolbuffers.git
cd php-protocolbuffers
phpize
configure --with-protocolbuffers
nmake
# copy Release_TS\php_protocolbuffers.dll into your php directory
# don't forget to add following line to your php.ini
# extension=protocolbuffers.so

building protoc-gen-php

You need build and install protoc-gen-php when generating message from .proto file.

cd contrib
mkdir build && cd build && cmake ..
cmake --build .
sudo cmake --build . --target install

create your first message