简体   繁体   中英

pdo_oci make does not work

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?

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.

只需在pdo_oci中将函数'function_entry'更改为'zend_function_entry'即可。

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM