直接上操作过程
rpm -ivh oracle-instantclient11.2-basic-11.2.0.1.0-1.i386.rpm
rpm -ivh oracle-instantclient11.2-devel-11.2.0.1.0-1.i386.rpm
rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.1.0-1.i386.rpm
tar zxvf oci8-1.4.5.tgz
cd oci8-1.4.5
/usr/bin/phpize
显示Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
./configure --with-php-config=/usr/bin/php-config --with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client/lib
部分结尾显示:
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
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
然后make部分结尾显示:
libtool: compile: cc -I. -I/root/oci8-1.4.5 -DPHP_ATOM_INC -I/root/oci8-1.4.5/include -I/root/oci8-1.4.5/main -I/root/oci8-1.4.5 -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 -I/usr/include/oracle/11.2/client -DHAVE_CONFIG_H -g -O2 -c /root/oci8-1.4.5/oci8.c -fPIC -DPIC -o .libs/oci8.o
/root/oci8-1.4.5/oci8.c: In function ‘php_oci_do_connect_ex’:
/root/oci8-1.4.5/oci8.c:1760: error: ‘struct _php_core_globals’ has no member named ‘safe_mode’
/root/oci8-1.4.5/oci8.c:1856: warning: cast from pointer to integer of different size
/root/oci8-1.4.5/oci8.c:2083: warning: cast to pointer from integer of different size
make: *** [oci8.lo] Error 1
这个问题要怎么解决呢?编绎的地址都是对的。
我的是linux64位的,前面的都已经装好了。用了你的命令行,还是提示错误,错误还是一样的。