PHP 서버를 신규로 구성하던 중 “PHP Fatal error: Call-time pass-by-reference has been removed
in …” 라는 오류가 발생하였다. 기존의 서버에서는 실행에 이상이 없던 것이라 여러가지를
찾던중 php 5.4 version 부터 개발에 새로운 제약 사항이 생겼다는 것을 알고 기존서버와 같은 4.3.27 버전으로 낮추려고 했으나 yum의 repository 리스트 상에 5.4 이하 버전이 없었다.
인터넷을 뒤적이며 repository를 수정하면 5.3.x 버전으로 Downgrade 시킬 수 있다는 말을 들었으나
실패하여 php.net 사이트에 있는 5.3.27을 다운받아
설치 하기로 했다.
몇가지의 Compile 중 오류는 있었지만 오히려 좀더
수월하게 설치가 된 것 같다. 앞으로도 당분간은 이렇게 설치를 해야 할 것 같아서 미리 기록으로 남겨놓는다.
1.
CentOS 5.9 PHP 5.3.27 Source
II. 소스를 다운로드 받아 서버에 FTP 등을 통하여 전송한다.
III. tar
xvzf php-5.3.27.tar.gz 을 이용하여 압축을 해제 한다.
2. CentOS 5.9 PHP 5.3.27 Source
Compile
./configure
--prefix=/usr --with-apxs2=/usr/sbin/apxs --with-curl --enable-exif
--enable-ftp --with-gd --with-gettext --with-gmp --with-mhash --with-ldap
--enable-mbstring --with-mysql=/usr/include/mysql/ --with-mysqli --with-openssl
--enable-pcntl --with-pdo-mysql --with-zlib-dir --with-pspell --with-readline
--enable-shmop --enable-sockets --enable-sysvmsg --enable-sysvsem
--enable-sysvshm --enable-wddx --with-xmlrpc --enable-zip --with-zlib
--with-libdir=lib64
3.
컴파일 완료 후 적용
make && make install
make 명령을 실행 시켰는데 make를 인식하지 못하는 오류가 발생할 경우, make 가 설치되지
않은 경우이다. 이 경우에는 다음과 같이 하면된다.
Yum –y install make
make && make install
4.
php.ini 적용
perl -pi -e 's/register_globals =
Off/register_globals = On/g' /etc/php.ini
5.
Apache 재기동
Service httpd restart
6.
CentOS 5.9 PHP 5.3.27 Source Compile 중 각종 Error 해결방법
I.
make:
warning: Clock skew detected. Your build may be incomplete.
해걸책 : 시간을 동기화 시킨다.
해걸책 : 시간을 동기화 시킨다.
II.
checking
for termcap functions library... configure: error: No curses/termcap library
found
해결책 : # yum -y install ncurses-devel
해결책 : # yum -y install ncurses-devel
III.
configure:
error: C++ preprocessor "/lib/cpp" fails sanity check
해결책 : # yum -y install gcc-c++
해결책 : # yum -y install gcc-c++
IV.
/usr/lib/libdb-4.3.so:
could not read symbols: File in wrong format
/usr/lib/libexpat.so: could not read symbols: File in wrong format
/usr/lib/libexpat.so: could not read symbols: File in wrong format
해결책 : # mv /usr/lib/libexpat.so
/usr/lib/libexpat.so.bak
# ln -s /lib64/libexpat.so.0.5.0 /usr/lib/libexpat.so
# mv /usr/lib/libdb-4.3.so /usr/lib/libdb-4.3.so.bak
# ln -s /lib64/libdb-4.3.so /usr/lib/libdb-4.3.so
# ln -s /lib64/libexpat.so.0.5.0 /usr/lib/libexpat.so
# mv /usr/lib/libdb-4.3.so /usr/lib/libdb-4.3.so.bak
# ln -s /lib64/libdb-4.3.so /usr/lib/libdb-4.3.so
에러의 원인은 64비트 환경에서 32비트용 소스를 가져다가 설치하기
때문이다. 컴파일 도구와 관련된 심볼릭 링크 파일을 찾지 못한다고 나오고 있다.
V.
configure:
error: Unable to locate gmp.h
해결책 : # yum -y install gmp*
해결책 : # yum -y install gmp*
VI.
configure:
error: not found. Please reinstall the expat distribution.
해결책 : # yum -y install expat*
해결책 : # yum -y install expat*
VII.
configure:
error: Please reinstall the libcurl distribution - easy.h should be in
/include/curl/
해결책 : # yum -y install curl* 또는 yum -y install curl & yum -y install curl-devel
해결책 : # yum -y install curl* 또는 yum -y install curl & yum -y install curl-devel
VIII.
configure:
error: Please reinstall libmcrypt - I cannot find mcrypt.h
configure: error: Please reinstall libmhash - I cannot find mhash.h
해결책 : # yum install libmcrypt libmcrypt-devel libmhash libmhash-devel
configure: error: Please reinstall libmhash - I cannot find mhash.h
해결책 : # yum install libmcrypt libmcrypt-devel libmhash libmhash-devel
IX.
Configure:
error: xml2-config not found. Please check your libxml2 installation
해결책 : #yum install libxml2-devel
해결책 : #yum install libxml2-devel
X.
Checking
for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's <evp.h>
해결책 : #yum install openssl-devel
configure: error: Cannot find OpenSSL's <evp.h>
해결책 : #yum install openssl-devel
XI.
Configure:
error: Please reinstall the BZip2 distribution
해결책 : # yum install bzip2-devel
해결책 : # yum install bzip2-devel
XII.
Configure:
error: libjpeg.(also) not found.
해결책 : # yum install libjpeg-devel
해결책 : # yum install libjpeg-devel
XIII.
Configure:
error: libpng.(also) not found.
해결책 : yum install libpng-devel
해결책 : yum install libpng-devel
XIV.
Configure:
error: freetype.h not found.
해결책 : #yum install freetype-devel
해결책 : #yum install freetype-devel
XV.
Configure:
error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
해결책 : # yum install mysql-devel
Note that the MySQL client library is not bundled anymore!
해결책 : # yum install mysql-devel
XVI.
Configure:
error: Please reinstall the ncurses distribution
해결책 : # yum install ncurses-devel
해결책 : # yum install ncurses-devel
XVII.
Checking
for unixODBC support... configure: error: ODBC header file
'/usr/include/sqlext.h' not found!
해결책 : # yum install unixODBC-devel
해결책 : # yum install unixODBC-devel
XVIII.
Configure:
error: Cannot find pspell
해결책 : # yum install pspell-devel
해결책 : # yum install pspell-devel
XIX.
Configure:
error: snmp.h not found. Check your SNMP installation.
해결책 : yum install net-snmp-devel
해결책 : yum install net-snmp-devel
XX.
Configure:
error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This
should not happen. Check config.log for additional information.
해결책 : yum install libc-client-devel
해결책 : yum install libc-client-devel
XXI. Configure: error: libXpm.(a|so) not
found 에러날때
해결책 : yum install xorg-x11-devel
해결책 : yum install xorg-x11-devel
XXII.
Configure:
error: mcrypt.h not found. Please reinstall libmcrypt. 에러날때
해결책 : wget http://ftp.linux.co.kr/pub/etc/libmcrypt-2.5.7.tar.gz
tar zxvfp libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure && make && make install
해결책 : wget http://ftp.linux.co.kr/pub/etc/libmcrypt-2.5.7.tar.gz
tar zxvfp libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure && make && make install
XXIII.
Configure:
error: png.h not found.
해결책 : yum install libpng-devel
해결책 : yum install libpng-devel
XXIV.
Configure: error: Unable to locate gmp.h
해결책 : yum -y install gmp gmp-devel
XXV.
configure: error: Cannot find ldap libraries in /usr/lib.
해결책 : cp -frp /usr/lib64/libldap* /usr/lib/
XXVI.
configure: error: Cannot find MySQL header files under
/usr/include/mysql/.
A.
해결책 : mysql 용 모듈이 부족하여 발생하는 현상
B.
yum remove mysql 로 기존 설치된 package 삭제
C.
yum install mysql-devel 설치
D.
rpm -qa | grep mysql-devel 로 확인
E.
rpm -q --filesbypkg mysql-devel-5.0.95-5.el5_9 실행
XXVII.
configure: error: mysql configure failed. Please check config.log for more
information.
A.
해결책 : --with-libdir=lib64 옵션을 추가한다.
B.
해당 문제는 mysql와 php의 bit 수에 따른 문제로 생각된다.
XXVIII.
configure: error: Cannot find pspell
해결책 : yum install pspell-devel
XXIX.
configure: error: Please reinstall readline - I cannot find readline.h
해결책 : yum install readline-devel
XXX. configure: error:
Cannot find ldap.h
해결책 : yum
–y install libldap2-dev openldap-devel
XXXI.
configure:
error: ZLIB extension requires zlib >= 1.0.9
ln -sf /usr/lib64/libgssapi_krb5.so.2.2
/usr/lib/libgssapi_krb5.so
ln -sf /usr/lib64/libkrb5.so.3.3 /usr/lib/libkrb5.so
ln -sf /usr/lib64/libk5crypto.so.3.1 /usr/lib/libk5crypto.so
ln -sf /lib64/libcom_err.so.2 /usr/lib/libcom_err.so
ln -sf /usr/lib64/libgcrypt.so.11 /usr/lib/libgcrypt.so
ln -sf /usr/lib64/libgpg-error.so.0 /usr/lib/libgpg-error.so
ln -sf /usr/lib64/libexpat.so /usr/lib/libexpat.so
ln -sf /usr/lib64/libm.so /usr/lib/libm.so
ln -sf /usr/lib64/libssl.so /usr/lib/libssl.so
apache시작시 아래 에러ln -sf /usr/lib64/libkrb5.so.3.3 /usr/lib/libkrb5.so
ln -sf /usr/lib64/libk5crypto.so.3.1 /usr/lib/libk5crypto.so
ln -sf /lib64/libcom_err.so.2 /usr/lib/libcom_err.so
ln -sf /usr/lib64/libgcrypt.so.11 /usr/lib/libgcrypt.so
ln -sf /usr/lib64/libgpg-error.so.0 /usr/lib/libgpg-error.so
ln -sf /usr/lib64/libexpat.so /usr/lib/libexpat.so
ln -sf /usr/lib64/libm.so /usr/lib/libm.so
ln -sf /usr/lib64/libssl.so /usr/lib/libssl.so
Apache is running a threaded MPM, but your PHP Module is not compiled to be
threadsafe. You need to recompile PHP.
이건 phpinstall ./configure 옵션에 --enable-maintainer-zts 붙여주면 해결됨.
이건 phpinstall ./configure 옵션에 --enable-maintainer-zts 붙여주면 해결됨.
댓글 없음:
댓글 쓰기