ID: 26409 User updated by: pyrox_pro at hotmail dot com Reported By: pyrox_pro at hotmail dot com -Status: Feedback +Status: Open Bug Type: LDAP related Operating System: RedHat Linux 7.3 PHP Version: 4.3.4 New Comment:
Here you go: Configure options: ./configure' '--prefix=/usr/local/apache' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mod_charset' '--enable-force-cgi-redirect' '--enable-discard-path' '--with-config-file-path=/usr/local/apache/conf' '--enable-safe-mode' '--with-openssl' '--enable-bcmath' '--with-bz2' '--enable-calendar' '--enable-ctype' '--with-gdbm' '--enable-dbase' '--enable-ftp' '--with-gd' '--with-ttf' '--enable-gd-native-ttf' '--enable-gd-imgstrttf' '--with-jpeg-dir=/usr/local' '--enable-gd-imgstrttf' '--with-gmp' '--with-mysql' '--with-xml=shared' '--enable-shmop' '--enable-sockets' '--with-regex=php' '--enable-sysvsem' '--enable-sysvshm' '--enable-yp' '--enable-memory-limit' '--enable-shared' '--with-zlib' '--with-sybase-ct=/usr/local/freetds' '--enable-yp' '--with-xml=shared' '--with-curl' '--with-ldap' Result: [Wed Nov 26 09:43:25 2003] [notice] child pid 29410 exit signal Segmentation fault (11) Program received signal SIGSEGV, Segmentation fault. gdb backtrace: [EMAIL PROTECTED] php-4.3.4]# gdb /usr/local/apache/bin/php GNU gdb Red Hat Linux (5.2-2) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"... (gdb) run /usr/docroot/dev/ldap2 Starting program: /usr/local/apache/bin/php /usr/docroot/dev/ldap2 Program received signal SIGSEGV, Segmentation fault. 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () #1 0x400a20b4 in ldap_pvt_tls_check_hostname () from /usr/lib/libldap.so.2 #2 0x400a274f in ldap_int_tls_start () from /usr/lib/libldap.so.2 #3 0x40088ff1 in ldap_int_open_connection () from /usr/lib/libldap.so.2 #4 0x40097593 in ldap_new_connection () from /usr/lib/libldap.so.2 #5 0x40088a9a in ldap_open_defconn () from /usr/lib/libldap.so.2 #6 0x4009722f in ldap_send_initial_request () from /usr/lib/libldap.so.2 #7 0x40090be1 in ldap_sasl_bind () from /usr/lib/libldap.so.2 #8 0x40090c9a in ldap_sasl_bind_s () from /usr/lib/libldap.so.2 #9 0x4009138c in ldap_simple_bind_s () from /usr/lib/libldap.so.2 #10 0x40088a49 in ldap_bind_s () from /usr/lib/libldap.so.2 #11 0x080c62a2 in zif_ldap_bind (ht=3, return_value=0x8348ac4, this_ptr=0x0, return_value_used=1) at /root/php-4.3.4/ext/ldap/ldap.c:460 #12 0x081aa480 in execute (op_array=0x8339924) at /root/php-4.3.4/Zend/zend_execute.c:1616 #13 0x08197ecc in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php-4.3.4/Zend/zend.c:884 #14 0x08170a14 in php_execute_script (primary_file=0xbffffaa0) at /root/php-4.3.4/main/main.c:1729 #15 0x081b2984 in main (argc=2, argv=0xbffffb44) at /root/php-4.3.4/sapi/cli/php_cli.c:819 #16 0x401da1c4 in __libc_start_main () from /lib/libc.so.6 (gdb) frame 12 #12 0x081aa480 in execute (op_array=0x8339924) at /root/php-4.3.4/Zend/zend_execute.c:1616 1616 ((zend_internal_function *) EX(function_state).function)->handler(EX(opline)->extended_value, EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object).ptr, return_value_used TSRMLS_CC); (gdb) print (char A parse error in expression, near `'. (gdb) print (char*)(executor_globals.function_state_ptr->function)->common.function_name $1 = 0x823857c "ldap_bind" (gdb) RESULT: $1 = 0x823857c "ldap_bind" No Oracle support in this buildp, up to date ldap libs. Same Result. Previous Comments: ------------------------------------------------------------------------ [2003-11-25 19:38:48] [EMAIL PROTECTED] Try compile PHP without --with-oci8 altogether. And use the openldap libs intstead for --with-ldap so we know for sure this really is caused by oracle.. ------------------------------------------------------------------------ [2003-11-25 16:52:21] pyrox_pro at hotmail dot com I did as requested, added my Oracle libs and built php with the configure line pointing ldap to them. Now I am getting: Warning: ldap_error(): supplied argument is not a valid ldap link resource in /usr/docroot/dev/ldap.php on line 14 Warning: ldap_bind() expects parameter 1 to be resource, boolean given in /usr/docroot/dev/ldap.php on line 15 $ds=ldap_connect("ldaps://myhostnameishere/"); echo ldap_error($ds); $r=ldap_bind($ds,$ldap['user'],$ldap['pass']); Still not functional. This kind of problem defies logic. Should it not return either: A) A link ref B) False ?? The code in the manual is not function now either. ------------------------------------------------------------------------ [2003-11-25 15:48:49] pyrox_pro at hotmail dot com Here you go: [EMAIL PROTECTED] php-4.3.4]# gdb /usr/local/apache/bin/php GNU gdb Red Hat Linux (5.2-2) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"... (gdb) run /usr/docroot/dev/ldap2 Starting program: /usr/local/apache/bin/php /usr/docroot/dev/ldap2 [New Thread 1024 (LWP 19522)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (LWP 19522)] 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () #1 0x400a20b4 in ldap_pvt_tls_check_hostname () from /usr/lib/libldap.so.2 #2 0x400a274f in ldap_int_tls_start () from /usr/lib/libldap.so.2 #3 0x40088ff1 in ldap_int_open_connection () from /usr/lib/libldap.so.2 #4 0x40097593 in ldap_new_connection () from /usr/lib/libldap.so.2 #5 0x40088a9a in ldap_open_defconn () from /usr/lib/libldap.so.2 #6 0x4009722f in ldap_send_initial_request () from /usr/lib/libldap.so.2 #7 0x40090be1 in ldap_sasl_bind () from /usr/lib/libldap.so.2 #8 0x40090c9a in ldap_sasl_bind_s () from /usr/lib/libldap.so.2 #9 0x4009138c in ldap_simple_bind_s () from /usr/lib/libldap.so.2 #10 0x40088a49 in ldap_bind_s () from /usr/lib/libldap.so.2 #11 0x080c7872 in zif_ldap_bind (ht=3, return_value=0x8366d14, this_ptr=0x0, return_value_used=1) at /root/php-4.3.4/ext/ldap/ldap.c:460 #12 0x081b49c4 in execute (op_array=0x8357b74) at /root/php-4.3.4/Zend/zend_execute.c:1616 #13 0x081a2410 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php-4.3.4/Zend/zend.c:884 #14 0x0817af58 in php_execute_script (primary_file=0xbffffaa0) at /root/php-4.3.4/main/main.c:1729 #15 0x081bcec8 in main (argc=2, argv=0xbffffb44) at /root/php-4.3.4/sapi/cli/php_cli.c:819 #16 0x407401c4 in __libc_start_main () from /lib/libc.so.6 (gdb) frame 1024 #0 0x00000000 in ?? () (gdb) frame 3 #3 0x40088ff1 in ldap_int_open_connection () from /usr/lib/libldap.so.2 (gdb) frame 16 #16 0x407401c4 in __libc_start_main () from /lib/libc.so.6 (gdb) bt #0 0x00000000 in ?? () #1 0x400a20b4 in ldap_pvt_tls_check_hostname () from /usr/lib/libldap.so.2 #2 0x400a274f in ldap_int_tls_start () from /usr/lib/libldap.so.2 #3 0x40088ff1 in ldap_int_open_connection () from /usr/lib/libldap.so.2 #4 0x40097593 in ldap_new_connection () from /usr/lib/libldap.so.2 #5 0x40088a9a in ldap_open_defconn () from /usr/lib/libldap.so.2 #6 0x4009722f in ldap_send_initial_request () from /usr/lib/libldap.so.2 #7 0x40090be1 in ldap_sasl_bind () from /usr/lib/libldap.so.2 #8 0x40090c9a in ldap_sasl_bind_s () from /usr/lib/libldap.so.2 #9 0x4009138c in ldap_simple_bind_s () from /usr/lib/libldap.so.2 #10 0x40088a49 in ldap_bind_s () from /usr/lib/libldap.so.2 #11 0x080c7872 in zif_ldap_bind (ht=3, return_value=0x8366d14, this_ptr=0x0, return_value_used=1) at /root/php-4.3.4/ext/ldap/ldap.c:460 #12 0x081b49c4 in execute (op_array=0x8357b74) at /root/php-4.3.4/Zend/zend_execute.c:1616 #13 0x081a2410 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php-4.3.4/Zend/zend.c:884 #14 0x0817af58 in php_execute_script (primary_file=0xbffffaa0) at /root/php-4.3.4/main/main.c:1729 #15 0x081bcec8 in main (argc=2, argv=0xbffffb44) at /root/php-4.3.4/sapi/cli/php_cli.c:819 #16 0x407401c4 in __libc_start_main () from /lib/libc.so.6 (gdb) frame 12 #12 0x081b49c4 in execute (op_array=0x8357b74) at /root/php-4.3.4/Zend/zend_execute.c:1616 1616 ((zend_internal_function *) EX(function_state).function)->handler(EX(opline)->extended_value, EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object).ptr, return_value_used TSRMLS_CC); (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $1 = 0x8242abc "ldap_bind" $1 = 0x8242abc "ldap_bind" About the Oci libs note: OCI8 Support enabled Revision $Revision: 1.183.2.5 $ Oracle Version 8.1 Compile-time ORACLE_HOME /u01/app/oracle/product/8.1.6 Libraries Used no value I cannot point the ldap path there as there is no ldap libs in this oracle setup. Oracle is funcitoning fine. Note also it works with version 4.3.2-RC with the exact same buildpath. ------------------------------------------------------------------------ [2003-11-25 15:40:29] [EMAIL PROTECTED] Actually..when using Oracle with PHP, you should point --with-ldap to that too..they're nice people and have put their own ldap functions into their libs. This conflicts with the openldap functions and causes this kind of problems. Not PHP bug per se. ------------------------------------------------------------------------ [2003-11-25 15:31:13] pyrox_pro at hotmail dot com If I must submit a backtrace it will be next week before I can get to that, this is important to me so I def. want to help. I got the code running again by going back to verion PHP Version 4.3.2-RC (php4-STABLE-200303141430) and manually updating PEAR. Here is my configure: ./configure' '--with-oci8' '--prefix=/usr/local/apache' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mod_charset' '--enable-force-cgi-redirect' '--enable-discard-path' '--with-config-file-path=/usr/local/apache/conf' '--enable-safe-mode' '--with-openssl' '--enable-bcmath' '--with-bz2' '--enable-calendar' '--enable-ctype' '--with-gdbm' '--enable-dbase' '--enable-ftp' '--with-gd' '--with-ttf' '--enable-gd-native-ttf' '--enable-gd-imgstrttf' '--with-jpeg-dir=/usr/local' '--enable-gd-imgstrttf' '--with-gmp' '--with-mysql' '--with-xml=shared' '--enable-shmop' '--enable-sockets' '--with-regex=php' '--enable-sysvsem' '--enable-sysvshm' '--enable-yp' '--enable-memory-limit' '--enable-shared' '--with-zlib' '--with-sybase-ct=/usr/local/freetds' '--with-ldap' '--enable-yp' '--with-xml=shared' '--with-curl' Is there any other method of getting you the info you need, for example: bash# strace /path/to/php /path/to/script.php Thanks for looking into this. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/26409 -- Edit this bug report at http://bugs.php.net/?id=26409&edit=1