How to fix Cannot load modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol: OnUpdateLong
Some day i install php with apache web server, when i integrate the php with apache and restart the apache an error occurred
[root@localhost httpd-2.4.37]# service httpd restart
Shutting down httpd: [FAILED]
httpd: Syntax error on line 464 of /usr/local/apache2/conf/httpd.conf: Syntax error on line 6 of /usr/local/apache2/conf/conf.modules.d/10-php.conf: Cannot load modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol: OnUpdateLong
[FAILED]
[root@localhost httpd-2.4.37]#
Delete the php source directory
[root@localhost ~]# ls
anaconda-ks.cfg bakupan_eplan.tar.gz install.log mysql80-community-release-el6-1.noarch.rpm wch_backres_eplan.sh
apr-1.6.5.tar.gz httpd-2.4.37 install.log.syslog php-5.4.45
apr-util-1.6.1.tar.gz httpd-2.4.37.tar.gz ius-release.rpm php-5.4.45.tar.gz
[root@localhost ~]#
[root@localhost ~]# rm -rf php-5.4.45
Extract the php source again
[root@localhost ~]# tar xzf php-5.4.45.tar.gz
[root@localhost ~]# ls
anaconda-ks.cfg bakupan_eplan.tar.gz install.log mysql80-community-release-el6-1.noarch.rpm wch_backres_eplan.sh
apr-1.6.5.tar.gz httpd-2.4.37 install.log.syslog php-5.4.45
apr-util-1.6.1.tar.gz httpd-2.4.37.tar.gz ius-release.rpm php-5.4.45.tar.gz
[root@localhost ~]#
Change working directory to new php source directory and build the configuration
[root@localhost ~]# cd php-5.4.45
[root@localhost php-5.4.45]# ls
acinclude.m4 generated_lists mkinstalldirs README.NEW-OUTPUT-API scripts
aclocal.m4 genfiles netware README.PARAMETER_PARSING_API server-tests-config.php
build header NEWS README.PHP4-TO-PHP5-THIN-CHANGES server-tests.php
buildconf INSTALL pear README.REDIST.BINS snapshot
buildconf.bat install-sh php5.spec.in README.RELEASE_PROCESS stamp-h.in
CODING_STANDARDS LICENSE php.gif README.SELF-CONTAINED-EXTENSIONS stub.c
config.guess ltmain.sh php.ini-development README.STREAMS svnclean.bat
config.sub main php.ini-production README.SUBMITTING_PATCH tests
configure makedist README.EXTENSIONS README.TESTING TSRM
configure.in Makefile.frag README.EXT_SKEL README.TESTING2 UPGRADING
CREDITS Makefile.gcov README.GIT-RULES README.UNIX-BUILD-SYSTEM UPGRADING.INTERNALS
ext Makefile.global README.input_filter README.WIN32-BUILD-SYSTEM vcsclean
EXTENSIONS makerpm README.MAILINGLIST_RULES run-tests.php win32
footer missing README.namespaces sapi Zend
[root@localhost php-5.4.45]# ./buildconf
You should not run buildconf in a release package.
use buildconf --force to override this check.
[root@localhost php-5.4.45]# ./buildconf --force
Forcing buildconf
Removing configure caches
buildconf: checking installation...
buildconf: autoconf version 2.63 (ok)
[root@localhost php-5.4.45]#
Configure the php with apxs2
[root@localhost php-5.4.45]# ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --enable-sysvshm --enable-sysvsem --enable-sysvmsg --enable-shmop --disable-short-tags --with-openssl --with-pcre-regex --with-zlib --enable-bcmath --with-gettext --with-mcrypt --with-bz2 --enable-calendar --with-curl --enable-exif --with-gd --enable-intl --enable-mbstring --with-mysqli --enable-pcntl --with-pdo-mysql --enable-soap --enable-sockets --with-xmlrpc --enable-zip --with-jpeg-dir --with-png-dir --enable-wddx --enable-ftp --with-mhash
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
..
..
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@localhost php-5.4.45]#
Compile the php
[root@localhost php-5.4.45]# make
/bin/sh /root/php-5.4.45/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -Iext/date/ -I/root/php-5.4.45/ext/date/ -DPHP_ATOM_INC -I/root/php-5.4.45/include -I/root/php-5.4.45/main -I/root/php-5.4.45 -I/root/php-5.4.45/ext/date/lib -I/root/php-5.4.45/ext/ereg/regex -I/usr/include/libxml2 -I/root/php-5.4.45/ext/mbstring/oniguruma -I/root/php-5.4.45/ext/mbstring/libmbfl -I/root/php-5.4.45/ext/mbstring/libmbfl/mbfl -I/root/php-5.4.45/ext/sqlite3/libsqlite -I/root/php-5.4.45/TSRM -I/root/php-5.4.45/Zend -I/usr/include -g -O2 -fvisibility=hidden -c /root/php-5.4.45/ext/date/php_date.c -o ext/date/php_date.lo
/bin/sh /root/php-5.4.45/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -Iext/date/ -I/root/php-5.4.45/ext/date/ -DPHP_ATOM_INC -I/root/php-5.4.45/include -I/root/php-5.4.45/main -I/root/php-5.4.45 -I/root/php-5.4.45/ext/date/lib -I/root/php-5.4.45/ext/ereg/regex -I/usr/include/libxml2 -I/root/php-5.4.45/ext/mbstring/oniguruma -I/root/php-5.4.45/ext/mbstring/libmbfl -I/root/php-5.4.45/ext/mbstring/libmbfl/mbfl -I/root/php-5.4.45/ext/sqlite3/libsqlite -I/root/php-5.4.45/TSRM -I/root/php-5.4.45/Zend -I/usr/include -g -O2 -fvisibility=hidden -c /root/php-5.4.45/ext/date/lib/astro.c -o ext/date/lib/astro.lo
/bin/sh /root/php-5.4.45/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -Iext/date/ -I/root/php-5.4.45/ext/date/ -DPHP_ATOM_INC -I/root/php-5.4.45/include -I/root/php-5.4.45/main -I/root/php-5.4.45 -I/root/php-5.4.45/ext/date/lib -I/root/php-5.4.45/ext/ereg/regex -I/usr/include/libxml2 -I/root/php-5.4.45/ext/mbstring/oniguruma -I/root/php-5.4.45/ext/mbstring/libmbfl -I/root/php-5.4.45/ext/mbstring/libmbfl/mbfl -I/root/php-5.
..
..
tdc++ -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -lcurl -lxml2 -lz -lm -lssl -lcrypto -licui18n -licuuc -licudata -lm -licuio -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -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.
clicommand.inc
directorytreeiterator.inc
pharcommand.inc
invertedregexiterator.inc
directorygraphiterator.inc
phar.inc
Build complete.
Don't forget to run 'make test'.
[root@localhost php-5.4.45]#
Install the php
[root@localhost php-5.4.45]# 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.4.45/libs' chmod 755 /usr/local/apache2/modules/libphp5.so [activating module `php5' in /usr/local/apache2/conf/httpd.conf] 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.3.12 [PEAR] Console_Getopt - already installed: 1.3.1 [PEAR] Structures_Graph- already installed: 1.0.4 [PEAR] XML_Util - already installed: 1.2.3 [PEAR] PEAR - already 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.4.45/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@localhost php-5.4.45]#
Restart the apache service again
[root@localhost php-5.4.45]# service httpd restart
Shutting down httpd: [ OK ]
Starting httpd: [ OK ]
[root@localhost php-5.4.45]#
Tidak ada komentar :
Posting Komentar