If you compile dev-lang/php with USE="oci8 ldap", when accessing a database from a PHP script, php crashes with and the following appears in the Apache error_log: apache2: getentry.c:35: ldap_first_entry: Assertion `( (ld)->ld_options.ldo_vali d == 0x2 )' failed. [Wed May 30 08:07:55 2007] [notice] child pid 13451 exit signal Aborted (6) Reproducible: Always Steps to Reproduce: 1. Compile dev-lang/php with USE="oci8 ldap" 2. Run a php script that accesses an oracle database Actual Results: A blank page is returned to the browser and the apache error log shows: apache2: getentry.c:35: ldap_first_entry: Assertion `( (ld)->ld_options.ldo_vali d == 0x2 )' failed. [Wed May 30 08:07:55 2007] [notice] child pid 13451 exit signal Aborted (6) Expected Results: The page is generated properly This is because the Oracle client has built-in LDAP libraries but the PHP eclass just uses the OpenLDAP libraries and therefore a conflict results. This can be resolved by specifying the path for the LDAP libraries to be the ORACLE_HOME. A possible fix to to change /usr/portage/eclass/php5_2-sapi.class lines 508 - 511 to something similar to if use ldap || phpconfutils_usecheck ldap ; then if use oci8 ; then phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}" else phpconfutils_extension_with "ldap" "ldap" 1 phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0 fi fi This has been tested using the oci8 and ldap use flags with the Oracle 10.2.0.3 client (not instant client) and confirmed to work but has not been tested in other configurations.
Hmmm, USE="oci8" is unsupported, since we can't test it at all. Tobias, ideas about this?
(In reply to comment #0) > A possible fix to to change /usr/portage/eclass/php5_2-sapi.class > lines 508 - 511 to something similar to > > if use ldap || phpconfutils_usecheck ldap ; then > if use oci8 ; then > phpconfutils_extension_with "ldap" "ldap" 1 > "${ORACLE_HOME}" > else > phpconfutils_extension_with "ldap" "ldap" 1 > phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0 > fi > fi Looks like a correct solution for this mess according to upstream, e.g. http://bugs.php.net/bug.php?id=4698 http://bugs.php.net/bug.php?id=16005 Tobias, please verify and apply this to eclasses, thanks.
Created attachment 128355 [details, diff] php5_2-sapi.eclass.diff Here's a more complete fix, also avoids bogus dependency on openldap w/ USE=oci8 and bails out when USE="ldap-sasl oci8" are both set, as that's not supported w/ LDAP libs provided by Oracle (correct me if I'm wrong).
Should be fixed in CVS for php-4.4 and php-5.2, please resync in an hour or two and test. Note that we are not touching php-5.1 since it's unmaintained and going to be package.masked soon.
I re-compiled PHP 5.2 after this change was applied and it is working for me. Thanks.
Cool! Thanks for reporting back.
*** Bug 193517 has been marked as a duplicate of this bug. ***