PHP설치 오류 리스트

리눅스/PHP|2015. 1. 16. 10:25
반응형

PHP 5.2.6 configure 시 오류 

오류 메세지 : configure: error: xml2-config not found. Please check your libxml2 installation 
해결 방법 : yum install libxml2 libxml2-devel -y 

오류 메세지 : configure: error: Please reinstall the BZip2 distribution 
해결 방법 : yum -y install bzip2-devel 

오류 메세지 : configure: error: libjpeg.(a|so) not found. 
해결 방법 : yum -y install libjpeg-devel 

오류 메세지 : configure: error: libpng.(a|so) not found. 
해결 방법 : yum -y install libpng-devel 

오류 메세지 : configure: error: freetype.h not found. 
해결 방법 : yum -y install freetype-devel 

오류 메세지 : configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information. 
해결 방법 : yum -y install libc-client-devel 

오류 메세지 : configure: error: Kerberos libraries not found. 
해결 방법 : yum -y install krb5-devel 

오류 메세지 : configure: error:Cannot find OpenSSL's <evp.h> 
해결 방법 : yum -y install openssl-devel 


[출처] 박한범님의 이글루 | 박한범 ( http://kese111.egloos.com/1111146 )

===============================================================

make: warning:  Clock skew detected.  Your build may be incomplete.
시간을 동기화 시킨다.

checking for termcap functions library... configure: error: No curses/termcap library found
해결책 :  # yum -y install ncurses-devel

configure: error: C++ preprocessor "/lib/cpp" fails sanity check
해결책 : # yum -y install gcc-c++

/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

해결책 : # 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 
에러의 원인은 64비트 환경에서 32비트용 소스를 가져다가 설치하기 때문이다. 컴파일 도구와 관련된 심볼릭 링크 파일을 찾지 못한다고 나오고 있다. 

configure: error: Unable to locate gmp.h
해결책 : # yum -y install gmp*

configure: error: not found. Please reinstall the expat distribution.
해결책 : # yum -y install expat*

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

configure: error: Please reinstall libmcrypt - I cannot find mcrypt.h <br>
configure: error: Please reinstall libmhash - I cannot find mhash.h
해결책 : # yum install libmcrypt libmcrypt-devel libmhash libmhash-devel

Configure: error: xml2-config not found. Please check your libxml2 installation
해결책 : #yum install libxml2-devel

Checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's <evp.h>
해결책 : #yum install openssl-devel

Configure: error: Please reinstall the BZip2 distribution
해결책 : # yum install bzip2-devel

Configure: error: libjpeg.(also) not found.
해결책 : # yum install libjpeg-devel

Configure: error: libpng.(also) not found.
해결책 : yum install libpng-devel

Configure: error: freetype.h not found.
해결책 : #yum install freetype-devel

Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
해결책 : # yum install mysql-devel

Configure: error: Please reinstall the ncurses distribution
해결책 : # yum install ncurses-devel

Checking for unixODBC support... configure: error: ODBC header file '/usr/include/sqlext.h' not found!
해결책 : # yum install unixODBC-devel

Configure: error: Cannot find pspell
해결책 : # yum install pspell-devel

Configure: error: snmp.h not found. Check your SNMP installation.
# yum install net-snmp-devel

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


[출처] http://ysy2080.com/uribury/linuxno1/1369

반응형

댓글()

PHP설치시 오류 > make: *** [libphp5.la] 오류 1

리눅스/PHP|2015. 1. 16. 10:25
반응형

/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] 오류 1

[root@chals php-5.2.6]# yum list | grep libtool-ltdl
libtool-ltdl.i386                        1.5.22-6.1             base
libtool-ltdl-devel.i386                  1.5.22-6.1             base

설치 하면됨 


[출처] php설치시 오류|작성자 업데이트


반응형

댓글()

FreeTDS 설치 (PHP와 MS-SQL 연동)

리눅스/PHP|2015. 1. 16. 10:24
반응형

리눅스의 Apache + PHP 구조에서 MS-SQL 데이터베이스를 사용하는 방법입니다.

 


1. 설치

 

# cd /usr/local/src

# wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz

 

※ 참고

mssql 2000 로 접속할 경우 아래 버전으로 설치하셔야 합니다.

# wget http://pkgs.fedoraproject.org/repo/pkgs/freetds/freetds-0.82.tar.gz/3df6b2e83fd420e90f1becbd1162990a/freetds-0.82.tar.gz
 

# tar xvzf freetds-stable.tgz

# cd freetds-0.91

# ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --disable-odbc --disable-debug --enable-msdblib

(freetds-0.82 버전의 경우 --enable-dbmfix 옵션 추가)

 

※ 참고

mssql 2008 의 경우 옵션을 제외해도 됩니다.
mssql 2005 의 경우 --with-tdsver=8.0

mssql 2000 의 경우 --with-tdsver=8.0

mssql 7.0 의 경우 --with-tdsver=7.0

mssql 6.0 의 경우 --with-tdsver=4.2

 

# make

# make install

 

freetds 를 설치했으면 PHP 를 재컴파일 합니다.

PHP 를 재 컴파일 할때 아래 옵션을 주어 컴파일 하도록 합니다. 설치방법은 생략합니다.

 

--with-sybase=/usr/local/freetds --with-mssql=/usr/local/freetds

 
재컴파일이 불편하다면 아래와 같이 별도로 모듈만 삽입 할수 있습니다.

 

# cd /usr/local/src/php-5.2.9/ext/mssql

# /usr/local/php/bin/phpize

# ./configure --with-mssql=/usr/local/freetds --with-php-config=/usr/local/php/bin/php-config

# make

# make install

# cd /usr/local/src/php-5.2.9/ext/pdo_dblib

# /usr/local/php/bin/phpize

# ./configure --with-pdo-dblib=/usr/local/freetds --with-php-config=/usr/local/php/bin/php-config

# make

# make install

# mv /usr/local/php/lib/php/extensions/no-debug-zts-20060613/* /usr/local/php/lib/

# /usr/local/Zend/etc/php.ini

아래 내용 추가합니다.
   extension=mssql.so
   extension=pdo_dblib.so

 

 

2. 설정 

 아래 파일을 수정하여 한글 깨짐을 막고 해당 서버로 연결가능하도록 추가 설정합니다.

# vi /usr/local/freetds/etc/freetds.conf

 

[global]
client charset = EUC-KR


[192.168.10.2]
    host = 192.168.10.2

    port = 1433
    tds version = 8.0

 

 

3. 확인

아래 명령어를 통해서 접속이 잘 되는지 확인할 수 있습니다.

 

# /usr/local/freetds/bin/tsql -H 192.168.10.2 -p 1433 -U neulwon -P 12345678



[참고] 

php - mssql 연동 테스트 소스

 

<?

putenv("TDSVER=80");    <- 이거는 사용하지마시고 혹시 mssql 2008 이나 연결이 안될경우 추가해보세요.
$hostname = "";
$username = "";
$password = "";
$connection = mssql_connect($hostname,$username,$password)
or die("데이타 베이스에 연결 할수 없습니다.");
print ("데이타 베이스에 연결되었습니다.");
mssql_close($connection);
print ("데이타 베이스의 연결이 해지 되었습니다.");
?>


반응형

댓글()

libphp4.so: cannot restore segment prot after reloc: Permission denied

리눅스/PHP|2015. 1. 16. 10:23
반응형

[root@localhost libexec]# /usr/local/apache/bin/apachectl configtest
Syntax error on line 224 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server: /usr/local/apache/libexec/libphp4.so: cannot restore segment prot after reloc: Permission denied

이런 황당한 에러는... 아래와 같이 하면 해결됨.

[root@localhost libexec]# restorecon -R -v /usr/local/apache/libexec

또는

[root@localhost libexec]# chcon -t texrel_shlib_t /usr/local/apache/modules/libphp4.so

SELINUX=disabled
로 설정하고 했더니....ok
근데 다른 문제가 있어서 물어봤더니...
FC4에서 php설치하려면
php소스 컴파일 설치후

# chcon /usr/local/apache/modules/libphp4.so -t shlib_t

실행하니깐 문제가 해결 되었네요^^
아직 무슨 말인지는 모르지만... 답변 감사합니다.
언젠가는 저도 답변으로 도움드릴 날이 오겠죠^^

그러나 나(xinfra)의 해결책 chcon -t textrel_shlib_t libexec/libphp4.so


반응형

댓글()

Zend 연동이 안될 경우

리눅스/PHP|2015. 1. 16. 10:23
반응형

[증상1]
phpinfo(); 화면에 Zend 표시가 안나타날 경우
/usr/local/apache/conf/php.ini 파일의 내용이 6줄가량의 내용만 있을경우 (본래 1300여줄)
 
[조치]

# rm -rf /usr/local/Zend                                                                    // Zend 를 삭제합니다.

# rm -rf /usr/local/apache/conf/php.ini*

# cp -arp (php소스폴더)/php.ini-dist /usr/local/apache/conf/php.ini

# (Zend소스폴더)/install                                                                 // Zend 재설치를 합니다.

# cd /usr/local/php/lib
# ln -sf /usr/local/apache/conf/php.ini .
 
 
[증상2]
설치후 php -v에 zend가 없을때

[조치]
# cd /usr/local/apache/conf
# ln -s /usr/local/Zend/etc/php.ini .
# cd /usr/local/php/lib
# ln -s /usr/local/apache/conf/php.ini .
# /usr/local/php/bin/php -v
 

반응형

댓글()

php설치시 configure: error: ZLIB extension requires zlib >= 1.0.9 에러

리눅스/PHP|2015. 1. 16. 10:21
반응형

php 4.4버전대 설치시 발생한 에러

configure: error: ZLIB extension requires zlib >= 1.0.9

아래처럼 설치시 해결되었음.

./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs --with-zlib --with-gd --with-ttf --with-png --with-expat-dir=/usr --with-gmp --with-xml --with-language=korean --with-charset=euc_kr --disable-debug --disable-rpath --with-iconv --enable-safe-mode --enable-magic-quotes --enable-bcmath --enable-dio --enable-gd-native-ttf --enable-sysvsem --enable-sysvshm --enable-wddx --enable-pic --enable-inline-optimization --enable-mbstring --enable-mbregex --enable-mbstr-enc-trans --with-config-file- --enable-ftp --disable-debug --enable-track-vars=yes --with-jpeg-dir --with-freetype-dir --enable-gd-native-ttf --enable-dl --enable-gd-imgstrttf --enable-exif --enable-versioning

도중에 configure: error: Unable to locate gmp.h 에러가 난다면

yum -y install gmp* 후, 다시 설치해볼것.

반응형

댓글()