Senin, 29 Oktober 2018

How to fix libphp5.so not compiled when installing php from source

  Tidak ada komentar

PHP with httpd Installed

Install httpd-devel first to make apsx installed like shown on following link : how to install and find apsx file  after apsx installed, the next step is configure the php
[root@WebApps php-5.6.27]# ./configure --prefix=/usr/local/php5  --with-config-file-path=/usr/local/php5/etc --with-config-file-scan-dir=/usr/local/php5/etc/conf.d --disable-short-tags --with-openssl --with-pcre-regex --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-exif --with-gd --enable-intl --enable-mbstring  --with-mcrypt --with-mysqli --enable-pcntl --with-pdo-mysql --enable-soap --enable-sockets --with-xmlrpc --enable-zip --with-jpeg-dir --with-png-dir
configure: WARNING: unrecognized options: --with-pcre-jit, --with-webp-dir
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
..
..
Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
[root@WebApps php-5.6.27]#
Make the php
[root@WebApps php-5.6.27]# make
/bin/sh /root/php-5.6.27/libtool --silent --preserve-dup-deps --mode=compile cc  -Iext/opcache/ -I/root/php-5.6.27/ext/opcache/ -DPHP_ATOM_INC -I/root/php-5.6.27/include -I/root/php-5.6.27/main -I/root/php-5.6.27 -I/root/php-5.6.27/ext/date/lib -I/root/php-5.6.27/ext/ereg/regex -I/usr/include/libxml2 -I/root/php-5.6.27/ext/mbstring/oniguruma -I/root/php-5.6.27/ext/mbstring/libmbfl -I/root/php-5.6.27/ext/mbstring/libmbfl/mbfl -I/root/php-5.6.27/ext/sqlite3/libsqlite -I/root/php-5.6.27/ext/zip/lib -I/root/php-5.6.27/TSRM -I/root/php-5.6.27/Zend    -I/usr/include -g -O2 -fvisibility=hidden   -c /root/php-5.6.27/ext/opcache/ZendAccelerator.c -o ext/opcache/ZendAccelerator.lo
/root/php-5.6.27/ext/opcache/ZendAccelerator.c: In function ‘acc
..
..
solv -lcrypt -lrt -lmcrypt -lstdc++ -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -ldl -lssl -lcrypto -lcurl -lxml2 -lz -lm -ldl -ldl -lm -licui18n -licuuc -licudata -ldl -lm -licuio -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lcrypt -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lssl -lcrypto -lcrypt  -o sapi/cgi/php-cgi
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
invertedregexiterator.inc
directorygraphiterator.inc
clicommand.inc
directorytreeiterator.inc
pharcommand.inc
phar.inc

Build complete.
Don't forget to run 'make test'.

[root@WebApps php-5.6.27]#
Make install the php
[root@WebApps php-5.6.27]# make install
Installing PHP SAPI module:       apache2handler
/usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' libphp5.la /usr/lib64/httpd/modules
/usr/lib64/apr-1/build/libtool --mode=install install libphp5.la /usr/lib64/httpd/modules/
libtool: install: install .libs/libphp5.so /usr/lib64/httpd/modules/libphp5.so
libtool: install: install .libs/libphp5.lai /usr/lib64/httpd/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /root/php-5.6.27/libs'
chmod 755 /usr/lib64/httpd/modules/libphp5.so
[activating module `php5' in /etc/httpd/conf/httpd.conf]
Installing shared extensions:     /usr/local/php5/lib/php/extensions/no-debug-non-zts-20131226/
Installing PHP CLI binary:        /usr/local/php5/bin/
Installing PHP CLI man page:      /usr/local/php5/php/man/man1/
Installing PHP CGI binary:        /usr/local/php5/bin/
Installing PHP CGI man page:      /usr/local/php5/php/man/man1/
Installing build environment:     /usr/local/php5/lib/php/build/
Installing header files:           /usr/local/php5/include/php/
Installing helper programs:       /usr/local/php5/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php5/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php5/lib/php/
[PEAR] Archive_Tar    - already installed: 1.4.0
[PEAR] Console_Getopt - already installed: 1.4.1
[PEAR] Structures_Graph- already installed: 1.1.1
[PEAR] XML_Util       - already installed: 1.3.0
[PEAR] PEAR           - already installed: 1.10.1
Wrote PEAR system config file at: /usr/local/php5/etc/pear.conf
You may want to add: /usr/local/php5/lib/php to your php.ini include_path
/root/php-5.6.27/build/shtool install -c ext/phar/phar.phar /usr/local/php5/bin
ln -s -f phar.phar /usr/local/php5/bin/phar
Installing PDO headers:           /usr/local/php5/include/php/ext/pdo/
[root@WebApps php-5.6.27]#

The libphp5.so installed properly
[root@WebApps html]# ls /usr/lib64/httpd/modules/libphp5.so
/usr/lib64/httpd/modules/libphp5.so
[root@WebApps html]#
PHP with apache 2.4 from source installed

Configure the php

[root@cloud php-5.5.17]# ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-config-file-scan-dir=/usr/local/php5/etc/conf.d --with-apxs2=/usr/local/apache2/bin/apxs  --enable-sysvshm  --enable-sysvsem  --enable-sysvmsg --enable-shmop --disable-short-tags --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd  --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-cgi
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
..
..

Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
[root@cloud php-5.5.17]#
Make the php

[root@cloud php-5.5.17]# make
/bin/sh /root/php-5.5.17/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -Iext/date/ -I/root/php-5.5.17/ext/date/ -DPHP_ATOM_INC -I/root/php-5.5.17/include -I/root/php-5.5.17/main -I/root/php-5.5.17 -I/root/php-5.5.17/ext/date/lib -I/root/php-5.5.17/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/freetype2 -I/root/php-5.5.17/ext/mbstring/oniguruma -I/root/php-5.5.17/ext/mbstring/libmbfl -I/root/php-5.5.17/ext/mbstring/libmbfl/mbfl -I/root/php-5.5.17/ext/sqlite3/libsqlite -I/root/php-5.5.17/TSRM -I/root/php-5.5.17/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /root/php-5.5.17/ext/date/php_date.c -o ext/date/php_date.lo
/bin/sh /root/php-5.5.17/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -Iext/date/ -I/root/php-5.5.17/ext/date/ -DPHP_ATOM_INC -I/root/php-5.5.17/include -I/root/php-5.5.17/main -I/root/php-5.5.17 -I/root/php-5.5.17/ext/date/lib -I/root/php-5.5.17/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/freetype2 -I/root/php-5.5.17/ext/mbstring/oniguruma -I/root/php-5.5.17/ext/mbstring/libmbfl -I/root/php-5.5.17/ext/mbstring/libmbfl/mbfl -I/root/php-5.5.17/ext/sqlite3/libsqlite -I/root/php-5.5.17/TSRM -I/root/php-5.5.17/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /root/php-5.5.17/ext/date/lib/astro.c -o ext/date/lib/astro.lo
/bin/sh /root/php-5.5.17/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -Iext/date/ -I/root/php-5.5.17/ext/date/ -DPHP_ATOM_INC -I/root/php-5.5.17/include -I/root/php-5.5.17/main -I/root/php-5.5.17 -I/root/php-5.5.17/ext/date/lib -I/root/php-5.5.17/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/freetype2 -I/root/php-5.5.17/ext/mbstring/oniguruma -I/root/php-5.5.17/ext/mbstring/libmbfl -I/root/php-5.5.17/ext/mbstring/libmbfl/mbfl -I/root/php-5.5.17/ext/sqlite3/libsqlite -I/root/php-5.5.17/TSRM -I/root/php-5.5.17/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /root/php-5.5.17/ext/date/lib/dow.c -o ext/date/lib/dow.lo
/bin/sh /root/php-5.5.17/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -Iext/date/ -I/root/php-5.5.17/ext/date/ -DPHP_ATOM_INC -I/root/php-5.5.17/include -I/root/php-5.5.17/main -I/root/php-5.5.17 -I/root/php-5.5.17/ext/date/lib -I/root/php-5.5.17/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/freetype2 -I/root/php-5.5.17/ext/mbstring/oniguruma -I/root/php-5.5.17/ext/mbstring/libmbfl -I/root/php-5.5.17/ext/mbstring/libmbfl/mbfl -I/root/php-5.5.17/ext/sqlite3/libsqlite -I/root/php-5.5.17/TSRM -I/root/php-5.5.17/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /root/php-5.5.17/ext/date/lib/parse_date.c -o ext/date/lib/parse_date.lo
..
..
gc.lo Zend/zend_closures.lo Zend/zend_float.lo Zend/zend_string.lo Zend/zend_signal.lo Zend/zend_generators.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_execute.lo main/internal_functions_cli.lo sapi/cgi/cgi_main.lo sapi/cgi/fastcgi.lo -lcrypt -lz -lexslt -lcrypt -lrt -lmcrypt -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 -lz -lm -lssl -lcrypto -lfreetype -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxslt -lxml2 -lz -lm -lssl -lcrypto -lcrypt  -o sapi/cgi/php-cgi
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
pharcommand.inc
clicommand.inc
directorygraphiterator.inc
directorytreeiterator.inc
invertedregexiterator.inc
phar.inc

Build complete.
Don't forget to run 'make test'.

[root@cloud php-5.5.17]#
Make install the php
[root@cloud php-5.5.17]# make install
Installing PHP SAPI module:       apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install install libphp5.la /usr/local/apache2/modules/
libtool: install: install .libs/libphp5.so /usr/local/apache2/modules/libphp5.so
libtool: install: install .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /root/php-5.5.17/libs'
chmod 755 /usr/local/apache2/modules/libphp5.so
[activating module `php5' in /usr/local/apache2/conf/httpd.conf]
Installing shared extensions:     /usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212/
Installing PHP CLI binary:        /usr/local/php5/bin/
Installing PHP CLI man page:      /usr/local/php5/php/man/man1/
Installing PHP CGI binary:        /usr/local/php5/bin/
Installing PHP CGI man page:      /usr/local/php5/php/man/man1/
Installing build environment:     /usr/local/php5/lib/php/build/
Installing header files:          /usr/local/php5/include/php/
Installing helper programs:       /usr/local/php5/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php5/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php5/lib/php/
[PEAR] Archive_Tar      - installed: 1.3.12
[PEAR] Console_Getopt   - installed: 1.3.1
[PEAR] Structures_Graph - installed: 1.0.4
[PEAR] XML_Util         - installed: 1.2.3
[PEAR] PEAR             - installed: 1.9.5
Wrote PEAR system config file at: /usr/local/php5/etc/pear.conf
You may want to add: /usr/local/php5/lib/php to your php.ini include_path
/root/php-5.5.17/build/shtool install -c ext/phar/phar.phar /usr/local/php5/bin
ln -s -f /usr/local/php5/bin/phar.phar /usr/local/php5/bin/phar
Installing PDO headers:          /usr/local/php5/include/php/ext/pdo/
[root@cloud php-5.5.17]#

Tidak ada komentar :

Posting Komentar