pdo_oci make does not work

2019-06-22 15:56发布

Recently I updated my opensuse 12.3 to the newer 13.1

Unfortunately, I'm not able to compile the pdo_oci.so needed. Using this guide, y could compile the extnention on 12.3:

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

But unfortunately on the actual version i'm struggling to find a solution. At the moment i'm trying to execute the make, but y get the following error:

/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]

make: * [pdo_oci.lo] Error 1

Anyone knows what's happening?

3条回答
狗以群分
2楼-- · 2019-06-22 15:57

hefengxian he 's solution worked for me but I can't make comments yet so here's what I did.

Edit the file pdo_oci.c, around line 34 search for :

/* {{{ pdo_oci_functions[] */
function_entry pdo_oci_functions[] = {
    {NULL, NULL, NULL}
};
/* }}} */

replace with

/* {{{ pdo_oci_functions[] */
zend_function_entry pdo_oci_functions[] = {
    {NULL, NULL, NULL}
};
/* }}} */

run make again.

查看更多
Melony?
3楼-- · 2019-06-22 16:01

just change the function 'function_entry' name to 'zend_function_entry' in pdo_oci.

查看更多
戒情不戒烟
4楼-- · 2019-06-22 16:14

It means that 'pdo_oci.lo' is missing when it's compiling. The easy solution is to copy the oci lib from your Oracle-Instant-Client lib to compiled path like this:

cp -f /usr/include/oracle/10.2.0.3/client64/* include/

I hope it can help you!

you can find more detail with follow link: http://www.indiangnu.org/2010/how-to-install-pdo_oci-extension-for-php-5/

查看更多
登录 后发表回答