...
- Change to
PATH-TO-THRIFT/lib/php/src/ext/thrift_protocol
. - Install support for building PHP extensions:
- On Ubuntu:
No Format sudo apt-get install php5-dev
- On CentOS:
No Format sudo yum install php-devel
- On Ubuntu:
- Build the extension:
No Format phpize ./configure --enable-thrift_protocol make
- Copy the extension's
.so
to the extensions directory.- On Ubuntu:
No Format sudo cp modules/thrift_protocol.so /usr/lib/php5/20060613/
- On 64-bit CentOS:
No Format sudo cp modules/thrift_protocol.so /usr/lib64/php/modules/
- On Ubuntu:
- Enable the module.
- On Ubuntu:
Code Block title sudo nano /etc/php5/conf.d/thrift_protocol.ini extension=thrift_protocol.so
- On CentOS:
Code Block title sudo nano /etc/php.d/thrift_protocol.ini extension=thrift_protocol.so
- On Ubuntu:
- Verify installation:
No Format php -i | grep -v "PWD" | grep "thrift_protocol"
- Restart Apache.
- On Ubuntu:
No Format sudo /etc/init.d/apache2 restart
- On CentOS:
No Format sudo /etc/init.d/httpd restart
- On Ubuntu:
- Ensure that the PHP is using
TBinaryProtocolAccelerated
and notTBinaryProtocol
as the protocol.
...