GÜNCEL: PHP ldap_connect Apache Dişli () Çağrı

0 Cevap php

Ben komut satırında aşağıdaki PHP kodu çalıştırırsanız ben beklenen sonuç almak:

php -r 'var_dump(ldap_connect("ldaps://ldaps.example.com", 636));'
resource(4) of type (ldap link)

Ben bir PHP komut dosyası bu koymak ancak eğer

<?php ldap_connect("ldaps://ldaps.example.com", 636); ?>

Apache, bağlantıyı keser Örneğin bu ben komut satırından komut vurmak döner Curl budur:

curl http://example.com/ldap_test.php
curl: (52) Empty reply from server

Apache erisim.log bu sayfaya isabet gösterir ve asla hatalar.log boştur.

Ben LDAP sunucusu Ben diğer iki sunucularda bu test gibi çalışma olduğunu biliyorum. PHP 5.2.9 ve Apache çalışan bir Joyent hızlandırıcı üzerinde çalışıyorum. Apache bu boğulma neden herkes biliyor musun?

Update:

Bugün sorun, komut dosyası çalışırken GDB kullanarak Apache ayıklanmış. Komut ldap_connect () satırı çarptığında ben GDB şu olsun:

Program received signal SIGSEGV, Segmentation fault.
0xfe94b8bb in _free_unlocked () from /lib/libc.so.1

Ben henüz segfault neden olduğunu emin değilim, ama en azından ben Apache aslında çökmesini olduğunu biliyoruz.

İşte tam backtrace olduğunu:

Breakpoint 1, 0x08094417 in ap_process_request ()
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0xfe94b8bb in _free_unlocked () from /lib/libc.so.1
(gdb) where
#0  0xfe94b8bb in _free_unlocked () from /lib/libc.so.1
#1  0xfe94b86f in free () from /lib/libc.so.1
#2  0xfde2d7e8 in ldap_x_free () from /usr/lib/libldap.so.5
#3  0xfde3f78b in ldap_free_urldesc () from /usr/lib/libldap.so.5
#4  0xfd0943d9 in ldap_free_urllist () from /opt/local/lib/libldap-2.4.so.2
#5  0xfd087191 in ldap_ld_free () from /opt/local/lib/libldap-2.4.so.2
#6  0xfd07ce8f in ldap_initialize () from /opt/local/lib/libldap-2.4.so.2
#7  0xfd3831a1 in zif_ldap_connect () from /opt/local/lib/php/20040412/ldap.so
#8  0xfcbda874 in zend_do_fcall_common_helper_SPEC ()
   from /opt/local/lib/httpd/mod_php5.so
#9  0xfcbe1a23 in ZEND_DO_FCALL_SPEC_CONST_HANDLER ()
   from /opt/local/lib/httpd/mod_php5.so
#10 0xfcbd9e99 in execute () from /opt/local/lib/httpd/mod_php5.so
#11 0xfcbda985 in zend_do_fcall_common_helper_SPEC ()
   from /opt/local/lib/httpd/mod_php5.so
#12 0xfcbdad65 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
   from /opt/local/lib/httpd/mod_php5.so
#13 0xfcbd9e99 in execute () from /opt/local/lib/httpd/mod_php5.so
#14 0xfcbda985 in zend_do_fcall_common_helper_SPEC ()
   from /opt/local/lib/httpd/mod_php5.so
#15 0xfcbdad65 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
   from /opt/local/lib/httpd/mod_php5.so
#16 0xfcbd9e99 in execute () from /opt/local/lib/httpd/mod_php5.so
---Type <return> to continue, or q <return> to quit---
#17 0xfcbda985 in zend_do_fcall_common_helper_SPEC ()
   from /opt/local/lib/httpd/mod_php5.so
#18 0xfcbdad65 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
   from /opt/local/lib/httpd/mod_php5.so
#19 0xfcbd9e99 in execute () from /opt/local/lib/httpd/mod_php5.so
#20 0xfcbda985 in zend_do_fcall_common_helper_SPEC ()
   from /opt/local/lib/httpd/mod_php5.so
#21 0xfcbdad65 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
   from /opt/local/lib/httpd/mod_php5.so
#22 0xfcbd9e99 in execute () from /opt/local/lib/httpd/mod_php5.so
#23 0xfcbda985 in zend_do_fcall_common_helper_SPEC ()
   from /opt/local/lib/httpd/mod_php5.so
#24 0xfcbdad65 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
   from /opt/local/lib/httpd/mod_php5.so
#25 0xfcbd9e99 in execute () from /opt/local/lib/httpd/mod_php5.so
#26 0xfcbda985 in zend_do_fcall_common_helper_SPEC ()
   from /opt/local/lib/httpd/mod_php5.so
#27 0xfcbdad65 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
   from /opt/local/lib/httpd/mod_php5.so
#28 0xfcbd9e99 in execute () from /opt/local/lib/httpd/mod_php5.so
#29 0xfcbda985 in zend_do_fcall_common_helper_SPEC ()
   from /opt/local/lib/httpd/mod_php5.so
#30 0xfcbdad65 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
---Type <return> to continue, or q <return> to quit---
   from /opt/local/lib/httpd/mod_php5.so
#31 0xfcbd9e99 in execute () from /opt/local/lib/httpd/mod_php5.so
#32 0xfcbda985 in zend_do_fcall_common_helper_SPEC ()
   from /opt/local/lib/httpd/mod_php5.so
#33 0xfcbdad65 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
   from /opt/local/lib/httpd/mod_php5.so
#34 0xfcbd9e99 in execute () from /opt/local/lib/httpd/mod_php5.so
#35 0xfcbda985 in zend_do_fcall_common_helper_SPEC ()
   from /opt/local/lib/httpd/mod_php5.so
#36 0xfcbdad65 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
   from /opt/local/lib/httpd/mod_php5.so
#37 0xfcbd9e99 in execute () from /opt/local/lib/httpd/mod_php5.so
#38 0xfcbbebaa in zend_execute_scripts () from /opt/local/lib/httpd/mod_php5.so
#39 0xfcb7f40e in php_execute_script () from /opt/local/lib/httpd/mod_php5.so
#40 0xfcc509ca in php_handler () from /opt/local/lib/httpd/mod_php5.so
#41 0x08085c2a in ap_run_handler ()
#42 0x0808638e in ap_invoke_handler ()
#43 0x08094ca7 in ap_internal_redirect ()
#44 0xfe48c232 in handler_redirect () from /opt/local/lib/httpd/mod_rewrite.so
#45 0x08085c2a in ap_run_handler ()
#46 0x0808638e in ap_invoke_handler ()
#47 0x08094471 in ap_process_request ()
#48 0x0809177c in ap_process_http_connection ()
---Type <return> to continue, or q <return> to quit---
#49 0x0808d426 in ap_run_process_connection ()
#50 0x0808d858 in ap_process_connection ()
#51 0x08099e89 in child_main ()
#52 0x08099f65 in make_child ()
#53 0x0809a472 in ap_mpm_run ()
#54 0x080709ab in main ()
(gdb) 

Update 2:

Ben sorun bu iki işlev çağrıları başlar ne söyleyebilirim:

#3  0xfde3f78b in ldap_free_urldesc () from /usr/lib/libldap.so.5
#4  0xfd0943d9 in ldap_free_urllist () from /opt/local/lib/libldap-2.4.so.2

# 4 (ldap_free_urllist) in fonksiyonu / opt/local/lib/libldap-2.4.so.2 bir kütüphane denir ve # 3 / usr/lib/libldap.so.5 bir kütüphane denir. Bunun normal olup olmadığını söylemek için yeterince bilmiyorum, ama ben değil varsayılabilir. Yani bir şekilde bu LDAP kütüphanelerin hem yüklü alıyorsanız.

0 Cevap