Using PECL

#See https://adrhc.go.ro/wordpress/common-commands-when-building/ for building environment, x.sh script and other things not defined here.
#Before starting do declare the environment variables specified to the link above.

#BEFORE RUNNING any "php peclcmd.php install xxx" these also have to be set:
export PKG_CONFIG=/ffp/bin/pkg-config

#ERROR1:
	configuration option "php_ini" is not set to php.ini location
	You should add "extension=uploadprogress.so" to php.ini.
#SOLUTION1:
	pear config-set php_ini /ffp/etc/php.ini
	pecl config-set php_ini /ffp/etc/php.ini
	Then if you really don't feel like touching your php.ini file:
	pecl uninstall uploadprogress
	pecl install uploadprogress

php peclcmd.php list
php -c /ffp/etc/php.ini /ffp/share/pear/peclcmd.php search msgpack
php peclcmd.php search APC
pecl search APC
pear install CodeGen_PECL
#php peclcmd.php install APC
#php peclcmd.php install intl
php peclcmd.php uninstall xxx

php peclcmd.php install ZendOpcache-7.0.3 -> trebuie specificata versiunea exacta pt ca e o versiune alfa, beta, etc (non stable)
#ZendOpcache creates /ffp/lib/php/extensions/no-debug-non-zts-20121212/opcache.so 
#which must be declared to php.ini in php if not compiled with --enable-opcache:
#zend_extension=/ffp/lib/php/extensions/no-debug-non-zts-20121212/opcache.so

#Compile php whith threads:
./configure --prefix=/ffp ... --enable-maintainer-zts
#install pthreads php-module:
php peclcmd.php install pthreads
#use pthreads php-module in php.ini:
extension=pthreads.so

#For viewing ZendOpcache cache:
#https://rtcamp.com/tutorials/php/zend-opcache
wget https://raw.github.com/rlerdorf/opcache-status/master/opcache.php

#do first "BEFORE RUNNING"
php peclcmd.php install APCu-4.0.7
#see https://adrhc.go.ro/tools/apc.php

#first do: "BEFORE RUNNING"
#requires https://adrhc.go.ro/wordpress/compiling-libmemcached/
#requires php peclcmd.php install igbinary
#requires php peclcmd.php install msgpack-0.5.5
#Varianta asta crapa:
export CC="--with-libmemcached-dir=/ffp --enable-memcached-igbinary --enable-memcached-json --enable-memcached-msgpack --disable-memcached-sasl --enable-memcached-protocol --with-zlib-dir=/ffp"
php peclcmd.php install memcached
#Varianta asta e ok:
cd $HOME/compile
wget http://pecl.php.net/get/memcached-2.2.0.tgz
tar -xvzf memcached-2.2.0.tgz
cd $HOME/compile/memcached-2.2.0
#see README.markdown
phpize
./configure --help > configure.help.txt
./configure --with-php-config=/ffp/bin/php-config --enable-memcached --with-libmemcached-dir=/ffp --enable-memcached-igbinary --enable-memcached-json --enable-memcached-msgpack --disable-memcached-sasl --enable-memcached-protocol --with-zlib-dir=/ffp
make
make test
make install

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.