json_decode
json_decode는 PHP5.2 이상에서만 지원되기 때문에
CentOS 5의 기본 PHP인 5.16에서는 지원하지 않는다.
이럴경우 pear을 사용하면 된다.
# yum install php-devel
# yum install php-pear
# yum install gcc
# pear install pecl/json
# cd /etc/php.d
# echo "extension=json.so" > json.ini
# /usr/sbin/apachectl restart
만약 아래와 같은 에러가 난다면
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025
/usr/bin/phpize: /tmp/tmpRenIoa/json-1.2.1/build/shtool: /bin/sh: bad interpreter: 허가 거부됨
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.
ERROR: `phpize' failed
vi /etc/fstab
-> /tmp 의 noexec 옵션을 제거한 후
mount -oremount /tmp/
후 실행
# pear install pecl/json
다 끝나면 다시 원복
vi /etc/fstab
-> /tmp 의 noexec 옵션을 추가
mount -oremount /tmp/
'PHP' 카테고리의 다른 글
좋은 글 (0) | 2018.07.12 |
---|---|
php 에서 헤더 이용하여 엑셀 출력시 문자형 바꾸기 숫자->문자 (0) | 2018.02.28 |
PHP 5.16 to PHP 5.3.29 (0) | 2015.05.12 |
파일 다운로드 (서버로 다운로드가 아닌 PC로 다운로드) (0) | 2015.04.08 |
IP 체크하여 영문 혹은 한글 사이트로 분기 시키기 (0) | 2013.08.20 |