编译php的时候,加入了oic8的支持却报错了,怎么改?

yizhixiaozhu 2015-09-24 07:15:23
我用的linux想安装了php和apache。apache先装好了
没问题。

但是我在编译php的时候出问题了。

机器64位的。
相关的那些oracle-instantclient也都装好了,如:oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
那个basic 还有devel 还有那个sqlplus这几个文件

./configure --prefix=/usr/local/php5.6.13 --with-config-file-path=/usr/local/php5.6.13/etc --enable-opcache=no --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --with-curl --with-curlwrappers --with-mhash --with-mcrypt --with-gd --enable-gd-native-ttf --with-xsl --with-openssl --with-ldap-sasl --with-xmlrpc --without-pear --enable-zip --enable-soap --enable-mbstring --enable-ftp --enable-sockets --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --disable-rpath --enable-mbregex --with-mysql --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-oci8=/usr/lib/oracle/12.1/client64 --with-oci-include=/usr/include/oracle/12.1/client64 --with-oci-lib=/usr/lib/oracle/12.1/client64/lib --with-pdo-oci=/usr/lib/oracle/12.1/client64 --with-apxs2=/usr/local/apache2.4.16/bin/apxs

在configure的时候没问题,但是买make的时候 之前还好好的,但是到了编译oci的时候就出现了:

/var/www/src/php-5.6.13/ext/oci8/oci8.c:2482: error: ‘zend_oci_globals’ has no member named ‘in_call’
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2484: error: ‘OCI_SUCCESS’ undeclared (first use in this function)
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2485: error: ‘php_oci_connection’ has no member named ‘errcode’
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2485: error: ‘php_oci_connection’ has no member named ‘err’
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: ‘ub4’ undeclared (first use in this function)
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: expected ‘;’ before ‘serverStatus’
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: ‘php_oci_connection’ has no member named ‘errcode’
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: ‘php_oci_connection’ has no member named ‘is_open’
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: ‘zend_oci_globals’ has no member named ‘in_call’
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: ‘dvoid’ undeclared (first use in this function)
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: expected expression before ‘)’ token
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: invalid operands to binary * (have ‘const struct zend_ini_entry *’ and ‘const struct zend_ini_entry *’)
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: called object ‘<erroneous-expression>’ is not a function
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: ‘zend_ini_entry’ has no member named ‘server’
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: ‘OCI_HTYPE_SERVER’ undeclared (first use in this function)
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: ‘serverStatus’ undeclared (first use in this function)
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: invalid operands to binary & (have ‘const struct zend_ini_entry *’ and ‘const struct zend_ini_entry *’)
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: expected expression before ‘)’ token
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: invalid operands to binary * (have ‘const struct zend_ini_entry *’ and ‘const struct zend_ini_entry *’)
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: ‘zend_oci_globals’ has no member named ‘in_call’
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: ‘OCI_SERVER_NORMAL’ undeclared (first use in this function)
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: ‘php_oci_connection’ has no member named ‘is_open’
/var/www/src/php-5.6.13/ext/oci8/oci8.c:2486: error: ‘php_oci_connection’ has no member named ‘err
.................
这样的好多东西,是我的什么配置没对吗?
谢谢!!
...全文
282 8 打赏 收藏 举报
写回复
8 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
yizhixiaozhu 2015-09-25
谢谢楼上的,我弄好了,我在编译php的时候不加入oci8的支持,等编译好了,我在重新加入对oci8的支持,这样就不是报错了。 谢谢了。
  • 打赏
  • 举报
回复
引用 6 楼 yizhixiaozhu 的回复:
真的很奇怪,我以前也是这样弄的,但是没有问题,只是用的那个oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64这个几个文件的版本不一样之前用的是11.2的,这次重新下了个新的版本。搞不懂了
可能问题就出在版本上了吧,你可以在oracle版块或者Linux版块发帖求助下。。
  • 打赏
  • 举报
回复
yizhixiaozhu 2015-09-24
真的很奇怪,我以前也是这样弄的,但是没有问题,只是用的那个oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64这个几个文件的版本不一样之前用的是11.2的,这次重新下了个新的版本。搞不懂了
  • 打赏
  • 举报
回复
百度了良久,找不到对应的解决办法啊。。既然说oci8/php_oci8_int.h没有找到,那就去pecl.php.net去下载一个,然后tar解压到你的php目录里试试。命令 wget http://pecl.php.net/get/oci8-2.0.8.tgz。然后解压
  • 打赏
  • 举报
回复
yizhixiaozhu 2015-09-24
我改了,没用,我吧那个出错的时候第一个错误,找了出来: [root@dn-1 php-5.6.13]# make /bin/sh /var/www/src/php-5.6.13/libtool --silent --preserve-dup-deps --mode=compile /var/www/src/php-5.6.13/meta_ccld -Iext/oci8/ -I/var/www/src/php-5.6.13/ext/oci8/ -DPHP_ATOM_INC -I/var/www/src/php-5.6.13/include -I/var/www/src/php-5.6.13/main -I/var/www/src/php-5.6.13 -I/var/www/src/php-5.6.13/ext/date/lib -I/var/www/src/php-5.6.13/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/freetype2 -I/var/www/src/php-5.6.13/ext/mbstring/oniguruma -I/var/www/src/php-5.6.13/ext/mbstring/libmbfl -I/var/www/src/php-5.6.13/ext/mbstring/libmbfl/mbfl -I/usr/local/include -I/var/www/src/php-5.6.13/ext/sqlite3/libsqlite -I/var/www/src/php-5.6.13/ext/zip/lib -I/var/www/src/php-5.6.13/TSRM -I/var/www/src/php-5.6.13/Zend -D_REENTRANT -DTHREAD=1 -I/usr/include -g -O2 -fvisibility=hidden -pthread -DZTS -c /var/www/src/php-5.6.13/ext/oci8/oci8.c -o ext/oci8/oci8.lo In file included from /var/www/src/php-5.6.13/ext/oci8/oci8.c:46: /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:60:17: error: oci.h: No such file or directory In file included from /var/www/src/php-5.6.13/ext/oci8/oci8.c:46: /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:124: error: expected specifier-qualifier-list before ‘OCIEnv’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:136: error: expected specifier-qualifier-list before ‘OCIEnv’ In file included from /var/www/src/php-5.6.13/ext/oci8/oci8.c:46: /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:170: error: expected specifier-qualifier-list before ‘dvoid’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:185: error: expected specifier-qualifier-list before ‘ub4’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:194: error: expected specifier-qualifier-list before ‘OCIType’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:206: error: expected specifier-qualifier-list before ‘text’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:217: error: expected specifier-qualifier-list before ‘ub4’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:239: error: expected specifier-qualifier-list before ‘OCIBind’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:264: error: expected specifier-qualifier-list before ‘OCIDefine’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:406: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘php_oci_error’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:407: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘php_oci_fetch_errmsg’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:408: error: expected declaration specifiers or ‘...’ before ‘text’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:408: error: expected declaration specifiers or ‘...’ before ‘ub2’ In file included from /var/www/src/php-5.6.13/ext/oci8/oci8.c:46: /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:419: error: expected declaration specifiers or ‘...’ before ‘sb4’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:419: error: expected declaration specifiers or ‘...’ before ‘ub4’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:426: error: expected declaration specifiers or ‘...’ before ‘ub4’ /var/www/src/php-5.6.13/ext/oci8/php_oci8_int.h:427: error: expected declaration specifiers or ‘...’ before ‘ub4 说什么没有那个oci.h的文件,怎么回事? 那个php的这个压缩包里面本来就没有这个文件啊,
  • 打赏
  • 举报
回复
引用 2 楼 yizhixiaozhu 的回复:
开始make后大概可以make几分钟,然后到编译oci的时候就出这个问题了,跳出好多这样的提示,然后就停了。 我刚date了一下,比标准时间大概慢了3分钟
把时间改标准之后,重新编译试试如何。
  • 打赏
  • 举报
回复
yizhixiaozhu 2015-09-24
开始make后大概可以make几分钟,然后到编译oci的时候就出这个问题了,跳出好多这样的提示,然后就停了。 我刚date了一下,比标准时间大概慢了3分钟
  • 打赏
  • 举报
回复
是不是一直在编译??我记得这个问题有可能是你Linux的时间日期导致的,你用date命令看看,如果时间不对,你改一下时间,最后用clock -w命令将时间写入cmos。
  • 打赏
  • 举报
回复
相关推荐
发帖
PHP

2.0w+

社区成员

“超文本预处理器”,是在服务器端执行的脚本语言,尤其适用于Web开发并可嵌入HTML中。PHP语法利用了C、Java和Perl,该语言的主要目标是允许web开发人员快速编写动态网页。
phpphpstorm 技术论坛(原bbs)
社区管理员
  • 开源资源社区
  • phpstory
  • xuzuning
加入社区
帖子事件
创建了帖子
2015-09-24 07:15
社区公告
暂无公告