cd ~/compile curl -L -k http://de1.php.net/get/php-5.5.19.tar.gz/from/this/mirror -o php-5.5.19.tar.gz tar -xzf php-5.5.19.tar.gz cd ~/compile/php-5.5.19 find . -type f \( -exec sed -i s/"\/usr\/bin\/perl"/"\/ffp\/bin\/perl"/ {} \; , -exec sed -i s/"\/usr\/bin\/python"/"\/ffp\/bin\/python"/ {} \; , -exec sed -i s/"\/usr\/bin\/bash"/"\/ffp\/bin\/bash"/ {} \; , -exec sed -i s/"\/usr\/bin\/sh"/"\/ffp\/bin\/sh"/ {} \; , -exec sed -i s/"\/usr\/bin\/env"/"\/ffp\/bin\/env"/ {} \; , -exec sed -i s/"\/bin\/bash"/"\/ffp\/bin\/bash"/ {} \; , -exec sed -i s/"\/bin\/sh"/"\/ffp\/bin\/sh"/ {} \; , -exec sed -i s/"\/bin\/env"/"\/ffp\/bin\/env"/ {} \; , -exec sed -i s/"\/ffp\/ffp\/"/"\/ffp\/"/ {} \; \) cp -r ~/compile/php-5.5.19 ~/compile/php-5.5.19-ffp #to do only when rebuilding; start also from here: cd ~/compile rm -r ~/compile/php-5.5.19 cp -r ~/compile/php-5.5.19-ffp ~/compile/php-5.5.19 cd ~/compile/php-5.5.19 export BUILD_FLAGS="-march=armv5te -mtune=xscale -mfloat-abi=soft -mabi=aapcs-linux -pthread -O2 -lintl -Wall -I/ffp/include" export BUILD_FLAGS="-march=armv5te -mfloat-abi=soft -mabi=aapcs-linux -pthread -O2 -lintl -Wall -I/ffp/include" export LDFLAGS="-L/ffp/lib -lintl" export CPPFLAGS="$BUILD_FLAGS" export CXXFLAGS="$BUILD_FLAGS" export CFLAGS="$BUILD_FLAGS" export LC_ALL=POSIX ./configure --help > configure.help.txt cat configure.help.txt ERROR0: don't know how to define struct flock on this system ... set --enable-opcache=no SOLUTION0: funpkg -r libgd-2.1.0-arm-0 #ATTENTION, don't use --with-pear, will fail at end and won't install pear. #With threads (with zts) #See also install pthreads php-module: https://adrhc.go.ro/wordpress/using-pecl/. #Remarca utilizarea apache-2.2.29-worker ci nu prefork! ./configure --prefix=/ffp --enable-re2c-cgoto --enable-mod-charset=shared --with-apxs2=/ffp/opt/apache-2.2.29-worker/bin/apxs --with-config-file-path=/ffp/etc --with-libxml-dir=/ffp --with-zlib=/ffp --with-zlib-dir=/ffp --with-bz2=/ffp --enable-calendar=shared --with-curl=/ffp --enable-dba=shared --enable-exif=shared --with-pcre-dir=/ffp --enable-ftp=shared --with-openssl=/ffp --with-jpeg-dir=/ffp --with-png-dir=/ffp --with-freetype-dir=/ffp --with-gettext=/ffp --with-gmp=/ffp --with-mhash=/ffp --with-icu-dir=/ffp --enable-mbstring=shared --with-onig=/ffp --with-mcrypt=/ffp --with-mysql=shared,/ffp --with-mysql-sock=/ffp/var/run/mysql/mysql.sock --with-mysqli=shared,/ffp/bin/mysql_config --enable-opcache --enable-pcntl --with-pdo-mysql=/ffp --with-mysql-sock=/ffp/var/run/mysql/mysql.sock --with-readline=/ffp --with-snmp=/ffp --enable-soap=shared --enable-sockets --with-iconv=/ffp --with-xsl=/ffp --enable-zip=shared --enable-mysqlnd=shared --with-tsrm-pth=/ffp/bin/pth-config --with-gd=shared --enable-maintainer-zts #Without threads (without zts; not required: --disable-maintainer-zts) #Remarca utilizarea apache-2.2.29-prefork ci nu worker! ./configure --prefix=/ffp --enable-re2c-cgoto=shared --enable-mod-charset=shared --with-apxs2=/ffp/opt/apache-2.2.29-prefork/bin/apxs --with-config-file-path=/ffp/etc/php.ini --with-config-file-scan-dir=/ffp/etc --with-libxml-dir=/ffp --with-zlib=/ffp --with-zlib-dir=/ffp --with-bz2=shared,/ffp --enable-calendar=shared --with-curl=shared,/ffp --enable-dba=shared --enable-exif=shared --with-pcre-dir=/ffp --enable-ftp=shared --with-openssl=/ffp --with-jpeg-dir=/ffp --with-png-dir=/ffp --with-freetype-dir=/ffp --with-gettext=shared,/ffp --with-gmp=shared,/ffp --with-mhash=shared,/ffp --with-icu-dir=/ffp --enable-mbstring --with-onig=/ffp --with-mcrypt=shared,/ffp --with-mysql=/ffp --with-mysql-sock=/ffp/var/run/mysql/mysql.sock --with-mysqli=/ffp/bin/mysql_config --enable-opcache=shared --enable-pcntl=shared --with-pdo-mysql=/ffp --with-readline=shared,/ffp --with-snmp=shared,/ffp --enable-soap=shared --enable-sockets=shared --with-iconv=/ffp --with-xsl=shared,/ffp --enable-zip --enable-mysqlnd --without-pear --without-pdo-sqlite --without-sqlite3 nohup make -C ~/compile/php-5.5.19 & renice -14 `pidof cc1plus` -p `pidof make` -p `pidof as` tail -f nohup.out #BEFORE INSTALL: #If installed using --with-pear do (but anyway will still fail to install pear): sed -i s/"phar:\/\/install-pear-nozlib\.phar\/index\.php"/"\/ffp\/home\/root\/compile\/php-5.5.19\/pear\/install-pear-nozlib.phar"/ pear/install-pear-nozlib.phar #INSTALL rm -r $HOME/temp/php-5.5.19 mkdir -p $HOME/temp/php-5.5.19/ffp/opt/apache-2.2.29-prefork/conf/ cp -v /ffp/opt/apache-2.2.29-prefork/conf/httpd.conf $HOME/temp/php-5.5.19/ffp/opt/apache-2.2.29-prefork/conf/ INSTALL_ROOT=$HOME/temp/php-5.5.19 make install libtool --finish /ffp/home/root/compile/php-5.5.19/libs rm -vr $HOME/temp/php-5.5.19/ffp/opt/apache-2.2.29-prefork/conf/ cd $HOME/temp/php-5.5.19 ls -l /tmp/php-* ls -l ~/ffp_0.7_armv5/packages/php-* #makepkg php version buildnumber #makepkg php-mysql-5.5.28 5.5.19 0 makepkg php-mysql-5.6.21 5.5.19 0 funpkg -i /tmp/php-mysql-5.6.21-5.5.19-arm-0.txz cp -v /tmp/php-5.5.19-*.txz $HOME/ffp_0.7_armv5/packages/ mv -v /ffp/opt/apache-2.2.29-prefork/modules/libphp5.so /ffp/opt/apache-2.2.29-prefork/modules/libphp5-prefork-mysql-5.6.21.so cp -v /ffp/opt/apache-2.2.29-prefork/modules/libphp5-*.so ~/NSA310-backups/2014-08-19\ apache-modules #AFTER INSTALL #INSTALL PEAR wget http://pear.php.net/go-pear.phar php go-pear.phar #INSTALL PECL #see https://adrhc.go.ro/wordpress/using-pear/ #INSTALL APCu (compile or use https://adrhc.go.ro/wordpress/using-pecl/) cd ~/compile wget http://pecl.php.net/get/apcu-4.0.7.tgz tar zxfv apcu-4.0.7.tgz cd ~/compile/apcu-4.0.7 phpize ./configure --with-php-config=/ffp/bin/php-config --enable-apcu make install #dezactiveaza autentificarea in ~/compile/apcu-4.0.7/apc.php: defaults('USE_AUTHENTICATION',0) #Nu copia apc.php in /i-data/60cb70cf/www/pages/wordpress/wp-content/plugins/wp-apc-panel/include/ pt ca deja exista! cp -v ~/compile/apcu-4.0.7/apc.php $HOME/tools/ #INSTALL gd.so cd ~/temp mkdir php-5.5.201306201030-arm-1 cd ~/temp/php-5.5.201306201030-arm-1 wget http://ffp.memiks.fr/pkg/php-5.5.201306201030-arm-1.txz tar Jxvf php-5.5.201306201030-arm-1.txz cp -v ffp/lib/php/extensions/no-debug-non-zts-20121212/gd.so /ffp/lib/php/extensions/no-debug-non-zts-20121212/ #show php modules php -m #Using php5_module with Apache: #LoadModule php5_module /usr/local/zy-pkgs/lib/libphp5.so #Link required: /usr/local/zy-pkgs/php/php.ini -> /ffp/etc/php.ini #PHPIniDir /usr/local/zy-pkgs/php #AddHandler php5-script .php #AddType application/x-httpd-php .php .phtml #AddType application/x-httpd-php-source .phps