{"id":390,"date":"2014-10-24T06:46:28","date_gmt":"2014-10-24T06:46:28","guid":{"rendered":"http:\/\/adrhc.go.ro\/wordpress\/?p=390"},"modified":"2017-10-07T17:26:02","modified_gmt":"2017-10-07T15:26:02","slug":"compiling-php-5-5-18","status":"publish","type":"post","link":"https:\/\/adrhc.go.ro\/blog\/compiling-php-5-5-18\/","title":{"rendered":"Compiling php 5.5.x"},"content":{"rendered":"<pre class=\"brush:bash shell;toolbar: false;auto-links: true\">\r\ncd ~\/compile\r\ncurl -L -k http:\/\/de1.php.net\/get\/php-5.5.19.tar.gz\/from\/this\/mirror -o php-5.5.19.tar.gz\r\ntar -xzf php-5.5.19.tar.gz\r\ncd ~\/compile\/php-5.5.19\r\nfind . -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\\\/\"\/ {} \\; \\)\r\ncp -r ~\/compile\/php-5.5.19 ~\/compile\/php-5.5.19-ffp\r\n\u00a0\r\n#to do only when rebuilding; start also from here:\r\ncd ~\/compile\r\nrm -r ~\/compile\/php-5.5.19\r\ncp -r ~\/compile\/php-5.5.19-ffp ~\/compile\/php-5.5.19\r\ncd ~\/compile\/php-5.5.19\r\n\u00a0\r\nexport BUILD_FLAGS=\"-march=armv5te -mtune=xscale -mfloat-abi=soft -mabi=aapcs-linux -pthread -O2 -lintl -Wall -I\/ffp\/include\"\r\nexport BUILD_FLAGS=\"-march=armv5te -mfloat-abi=soft -mabi=aapcs-linux -pthread -O2 -lintl -Wall -I\/ffp\/include\"\r\nexport LDFLAGS=\"-L\/ffp\/lib -lintl\"\r\nexport CPPFLAGS=\"$BUILD_FLAGS\"\r\nexport CXXFLAGS=\"$BUILD_FLAGS\"\r\nexport CFLAGS=\"$BUILD_FLAGS\"\r\nexport LC_ALL=POSIX\r\n\r\n.\/configure --help > configure.help.txt\r\ncat configure.help.txt\r\n\r\nERROR0:\r\n\tdon't know how to define struct flock on this system ... set --enable-opcache=no\r\nSOLUTION0:\r\n\tfunpkg -r libgd-2.1.0-arm-0\r\n\r\n#ATTENTION, don't use --with-pear, will fail at end and won't install pear.\r\n\r\n#With threads (with zts)\r\n#See also install pthreads php-module: https:\/\/adrhc.go.ro\/wordpress\/using-pecl\/.\r\n#Remarca utilizarea apache-2.2.29-worker ci nu prefork!\r\n.\/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\r\n\r\n#Without threads (without zts; not required: --disable-maintainer-zts)\r\n#Remarca utilizarea apache-2.2.29-prefork ci nu worker!\r\n.\/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\r\n\r\nnohup make -C ~\/compile\/php-5.5.19 &\r\nrenice -14 `pidof cc1plus` -p `pidof make` -p `pidof as`\r\ntail -f nohup.out\r\n\u00a0\r\n#BEFORE INSTALL:\r\n#If installed using --with-pear do (but anyway will still fail to install pear):\r\nsed -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\r\n\r\n#INSTALL\r\nrm -r $HOME\/temp\/php-5.5.19\r\nmkdir -p $HOME\/temp\/php-5.5.19\/ffp\/opt\/apache-2.2.29-prefork\/conf\/\r\ncp -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\/\r\nINSTALL_ROOT=$HOME\/temp\/php-5.5.19 make install\r\nlibtool --finish \/ffp\/home\/root\/compile\/php-5.5.19\/libs\r\nrm -vr $HOME\/temp\/php-5.5.19\/ffp\/opt\/apache-2.2.29-prefork\/conf\/\r\ncd $HOME\/temp\/php-5.5.19\r\nls -l \/tmp\/php-*\r\nls -l ~\/ffp_0.7_armv5\/packages\/php-*\r\n#makepkg php version buildnumber\r\n#makepkg php-mysql-5.5.28 5.5.19 0\r\nmakepkg php-mysql-5.6.21 5.5.19 0\r\nfunpkg -i \/tmp\/php-mysql-5.6.21-5.5.19-arm-0.txz\r\ncp -v \/tmp\/php-5.5.19-*.txz $HOME\/ffp_0.7_armv5\/packages\/\r\nmv -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\r\ncp -v \/ffp\/opt\/apache-2.2.29-prefork\/modules\/libphp5-*.so ~\/NSA310-backups\/2014-08-19\\ apache-modules\r\n\r\n#AFTER INSTALL\r\n#INSTALL PEAR\r\nwget http:\/\/pear.php.net\/go-pear.phar\r\nphp go-pear.phar\r\n#INSTALL PECL\r\n#see https:\/\/adrhc.go.ro\/wordpress\/using-pear\/\r\n#INSTALL APCu (compile or use https:\/\/adrhc.go.ro\/wordpress\/using-pecl\/)\r\ncd ~\/compile\r\nwget http:\/\/pecl.php.net\/get\/apcu-4.0.7.tgz\r\ntar zxfv apcu-4.0.7.tgz\r\ncd ~\/compile\/apcu-4.0.7\r\nphpize\r\n.\/configure --with-php-config=\/ffp\/bin\/php-config --enable-apcu\r\nmake install\r\n#dezactiveaza autentificarea in ~\/compile\/apcu-4.0.7\/apc.php: defaults('USE_AUTHENTICATION',0)\r\n#Nu copia apc.php in \/i-data\/60cb70cf\/www\/pages\/wordpress\/wp-content\/plugins\/wp-apc-panel\/include\/ pt ca deja exista!\r\ncp -v ~\/compile\/apcu-4.0.7\/apc.php $HOME\/tools\/\r\n#INSTALL gd.so\r\ncd ~\/temp\r\nmkdir php-5.5.201306201030-arm-1\r\ncd ~\/temp\/php-5.5.201306201030-arm-1\r\nwget http:\/\/ffp.memiks.fr\/pkg\/php-5.5.201306201030-arm-1.txz\r\ntar Jxvf php-5.5.201306201030-arm-1.txz\r\ncp -v ffp\/lib\/php\/extensions\/no-debug-non-zts-20121212\/gd.so \/ffp\/lib\/php\/extensions\/no-debug-non-zts-20121212\/\r\n\r\n#show php modules\r\nphp -m\r\n\r\n#Using php5_module with Apache:\r\n#LoadModule php5_module \/usr\/local\/zy-pkgs\/lib\/libphp5.so\r\n#Link required: \/usr\/local\/zy-pkgs\/php\/php.ini -> \/ffp\/etc\/php.ini\r\n#PHPIniDir \/usr\/local\/zy-pkgs\/php\r\n#AddHandler php5-script .php\r\n#AddType application\/x-httpd-php .php .phtml\r\n#AddType application\/x-httpd-php-source .phps\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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\/&#8221;\\\/usr\\\/bin\\\/perl&#8221;\/&#8221;\\\/ffp\\\/bin\\\/perl&#8221;\/ {} \\; , -exec sed -i s\/&#8221;\\\/usr\\\/bin\\\/python&#8221;\/&#8221;\\\/ffp\\\/bin\\\/python&#8221;\/ {} \\; , -exec sed -i s\/&#8221;\\\/usr\\\/bin\\\/bash&#8221;\/&#8221;\\\/ffp\\\/bin\\\/bash&#8221;\/ {} \\; , -exec [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/adrhc.go.ro\/blog\/compiling-php-5-5-18\/#more-390\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Compiling php 5.5.x<\/span><\/a><\/div>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,11,163],"tags":[],"class_list":["post-390","post","type-post","status-publish","format-standard","hentry","category-compiling-from-source","category-linux","category-nsa310"],"_links":{"self":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/comments?post=390"}],"version-history":[{"count":0,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/390\/revisions"}],"wp:attachment":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/media?parent=390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/categories?post=390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/tags?post=390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}