1

使用以下配置语句:

./configure --prefix=/home/a2r/www/PHP-5.5.0 --with-apxs2=/home/a2r/apache/bin/apxs --enable-ftp --with-curl --with-zlib --with-gd --with-ldap --with-mm --with-pgsql --with-jpeg-dir=/home/a2r/www --with-png-dir=/home/a2r/www  --with-imap=/home/a2r/www/imap-2007f --with-imap-ssl --with-oci8=instantclient,/home/a2r/www/oracle/instantclient --enable-opcache=no

./configure 运行成功,但是当我运行 make 时出现以下错误:

In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:96:1: warning: "LBER_ERROR" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:53:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:97:1: warning: "LBER_DEFAULT" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:54:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:100:1: warning: "LBER_BOOLEAN" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:72:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:101:1: warning: "LBER_INTEGER" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:73:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:102:1: warning: "LBER_BITSTRING" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:74:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:103:1: warning: "LBER_OCTETSTRING" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:75:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:104:1: warning: "LBER_NULL" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:76:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:105:1: warning: "LBER_ENUMERATED" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:77:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:106:1: warning: "LBER_SEQUENCE" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:78:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:107:1: warning: "LBER_SET" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:79:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:145:1: warning: "NULLBER" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:96:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
             from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:

/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:191: error: redefinition of `struct berval'
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1011: error: conflicting types for 'ber_init'
/usr/include/lber.h:174: error: previous declaration of 'ber_init' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1011: error: conflicting types for 'ber_init'
/usr/include/lber.h:174: error: previous declaration of 'ber_init' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1012: error: conflicting types for 'ber_peek_tag'
/usr/include/lber.h:150: error: previous declaration of 'ber_peek_tag' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1012: error: conflicting types for 'ber_peek_tag'
/usr/include/lber.h:150: error: previous declaration of 'ber_peek_tag' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1013: error: conflicting types for 'ber_skip_tag'
/usr/include/lber.h:148: error: previous declaration of 'ber_skip_tag' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1013: error: conflicting types for 'ber_skip_tag'
/usr/include/lber.h:148: error: previous declaration of 'ber_skip_tag' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1014: error: conflicting types for 'ber_scanf'
/usr/include/lber.h:168: error: previous declaration of 'ber_scanf' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1014: error: conflicting types for 'ber_scanf'
/usr/include/lber.h:168: error: previous declaration of 'ber_scanf' was here
make: *** [ext/ldap/ldap.lo] Error 1

如果我从配置命令中删除了 Instantclient 部分(最后 2 个),./configure、make 和 make install 似乎运行正常。

从我对此进行的研究来看,ldap 和 OCI8 不能很好地协同工作似乎是一个已知的“问题”: https ://forums.oracle.com/thread/2368820

如果这是我的问题,它似乎是,我如何在没有 oci8 的情况下运行 configure 并稍后将其添加为动态 .so 模块?目前,似乎根本不存在 php.ini 文件。提前致谢。

4

1 回答 1

0

似乎最好的解决方案是动态配置 oci8 模块。为此,我必须复制 php.ini-development 文件:

cp php.ini-development /usr/local/lib/php.ini

然后,我在 php.ini 中添加了以下行,以便动态运行 oci8:

Extension=oci8.so

PHP / Apache 指南也是一个有用的资源: http: //php.net/manual/en/install.unix.apache2.php

于 2013-07-15T20:55:18.697 回答