pdo_oci make不起作用

mar*_*rob 5 php pdo oracle-call-interface opensuse

最近我将opensuse 12.3更新为更新的13.1

不幸的是,我无法编译所需的pdo_oci.so.使用本指南,y可以在12.3上编译extnention:

http://forums.opensuse.org/english/other-forums/development/programming-scripting/418966-installing-pdo_oci-php.html

但不幸的是,在实际版本上我很难找到解决方案.目前我正在尝试执行make,但是你得到以下错误:

/home/temp/PDO_OCI-1.0/pdo_oci.c:34:1: error: unknown type name 'function_entry'
 function_entry pdo_oci_functions[] = {
 ^
/home/temp/PDO_OCI-1.0/pdo_oci.c:35:2: warning: braces around scalar initializer [enabled by default]
  {NULL, NULL, NULL}
  ^
/home/temp/PDO_OCI-1.0/pdo_oci.c:35:2: warning: (near initialization for 'pdo_oci_functions[0]') [enabled by default]
/home/temp/PDO_OCI-1.0/pdo_oci.c:35:2: warning: initialization makes integer from pointer without a cast [enabled by default]
/home/temp/PDO_OCI-1.0/pdo_oci.c:35:2: warning: (near initialization for 'pdo_oci_functions[0]') [enabled by default]
/home/temp/PDO_OCI-1.0/pdo_oci.c:35:2: warning: excess elements in scalar initializer [enabled by default]
/home/temp/PDO_OCI-1.0/pdo_oci.c:35:2: warning: (near initialization for 'pdo_oci_functions[0]') [enabled by default]
/home/temp/PDO_OCI-1.0/pdo_oci.c:35:2: warning: excess elements in scalar initializer [enabled by default]
/home/temp/PDO_OCI-1.0/pdo_oci.c:35:2: warning: (near initialization for 'pdo_oci_functions[0]') [enabled by default]
/home/temp/PDO_OCI-1.0/pdo_oci.c:56:2: warning: initialization from incompatible pointer type [enabled by default]
  pdo_oci_functions,
  ^
/home/temp/PDO_OCI-1.0/pdo_oci.c:56:2: warning: (near initialization for 'pdo_oci_module_entry.functions') [enabled by default]
Run Code Online (Sandbox Code Playgroud)

make:* [pdo_oci.lo]错误1

谁知道发生了什么?

McQ*_*ack 6

hefengxian他的解决方案对我有用,但我还不能发表评论所以这就是我所做的.

编辑文件pdo_oci.c,在第34行附近搜索:

/* {{{ pdo_oci_functions[] */
function_entry pdo_oci_functions[] = {
    {NULL, NULL, NULL}
};
/* }}} */
Run Code Online (Sandbox Code Playgroud)

用...来代替

/* {{{ pdo_oci_functions[] */
zend_function_entry pdo_oci_functions[] = {
    {NULL, NULL, NULL}
};
/* }}} */
Run Code Online (Sandbox Code Playgroud)

再次运行make.


小智 0

这意味着编译时缺少“pdo_oci.lo”。简单的解决方案是将 oci lib 从 Oracle-Instant-Client lib 复制到编译路径,如下所示:

cp -f /usr/include/oracle/10.2.0.3/client64/* include/
Run Code Online (Sandbox Code Playgroud)

我希望它可以帮助你!

您可以通过以下链接找到更多详细信息: http://www.indiangnu.org/2010/how-to-install-pdo_oci-extension-for-php-5/