Unable to load dynamic library '/usr/lib64/php/modules/json.so'
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/json.so' - /usr/lib64/php/modules/json.so: undefined symbol: ZVAL_DELREF in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/json.so' - /usr/lib64/php/modules/json.so: undefined symbol: ZVAL_DELREF in Unknown on line 0
[root@slave php-json-ext-1.2.1]# vi JSON_parser.c
/* JSON_parser.c */
/* 2005-12-30 */
/*
Copyright (c) 2005 JSON.org
………………
#include "JSON_parser.h"
#include <stdio.h>
#define true 1
#define false 0
/*
Characters are mapped into these 32 symbol classes. This allows for significant reductions in the size of the state transition table.
*/
/* error */#define S_ERR -1
#define ZVAL_DELREF Z_DELREF_P 加入这一行
/* space */
#define S_SPA 0
/* other whitespace */
#define S_WSP 1
/* { */
#define S_LBE 2
"JSON_parser.c" 757L, 21504C written
[root@slave php-json-ext-1.2.1]# phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
[root@slave php-json-ext-1.2.1]# ./configure
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 for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 for system library directory... lib
………………………………
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
[root@slave php-json-ext-1.2.1]# make
/bin/sh /tmp/php-json-ext-1.2.1/libtool --mode=compile cc -I. -I/tmp/php-json-ext-1.2.1 -DPHP_ATOM_INC -I/tmp/php-json-ext-1.2.1/include -I/tmp/php-json-ext-1.2.1/main -I/tmp/php-json-ext-1.2.1 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/php-json-ext-1.2.1/utf8_to_utf16.c -o utf8_to_utf16.lo
libtool: compile: cc -I. -I/tmp/php-json-ext-1.2.1 -DPHP_ATOM_INC -I/tmp/php-json-ext-1.2.1/include -I/tmp/php-json-ext-1.2.1/main -I/tmp/php-json-ext-1.2.1 -………………………………
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
[root@slave php-json-ext-1.2.1]# make install
Installing shared extensions: /usr/lib64/php/modules/
[root@slave php-json-ext-1.2.1]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
echo "extensio=json.so" >> /etc/php.ini
[root@slave php-json-ext-1.2.1]# php -m
PHP Warning: Module 'json' already loaded in Unknown on line 0
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
ereg
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
memcache
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
xml
zip
zlib
/etc/init.d/httpd restart即可
更多推荐
所有评论(0)