5

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?

Darin Kolev
  • 3,401
  • 13
  • 31
  • 46
marc.grob
  • 51
  • 1
  • 2
  • Found a solution I'm not quite sure why but it work's Replace function_entry with zend_function_entry in pdo_oci.c at line 36 – marc.grob Jan 02 '14 at 02:59

3 Answers3

7

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.

McQuack
  • 393
  • 2
  • 15
  • Your suggestion made `make` and `make install` to continue. But it gives loading error, `pdo_oci.so: undefined symbol: php_pdo_stmt_delref in Unknown on line 0` (My environment: Ubuntu 14.04 64bit; Oracle Instant Client 12.1.0.2.0; PDO_OCI 1.0) – Amil Waduwawara Jul 18 '15 at 04:48
  • Unfortunately I don't know the solution for this. It worked for me, but I ended up installing the extension more easily with the command "pecl install pdo_oci". – McQuack Jul 19 '15 at 16:07
  • Loading generic pdo, and then loading pdo_oci solved my problem. – Amil Waduwawara Aug 07 '15 at 10:46
1

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

Frank He
  • 637
  • 4
  • 9
0

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/

Yuny Chan
  • 1
  • 1