ma-100140 @ ウィキ Rad Hat Linux release 2.6.18-194.el5

※上記の広告は60日以上更新のないWIKIに表示されています。更新することで広告が下部へ移動します。

64ビットマシーンからリモートでDB2に接続する設定をしましたが、うまくいきません。結局PHP5.2系列はダメなようです。

PHP unixODBC 結果
5.2.10 2.3.0 ×
5.2.10 2.3.1 ×
5.2.10 2.2.12 ×
5.2.17 2.2.12 ×
5.3.21 2.2.12
5.3.21 2.3.1

接続できた時の情報

[admin@xxxx ~]$ db2 -a connect to xxxxx  user xxxxx using xxxxx

   データベース接続情報 

 データベース・サーバー                                   = DB2/AIX64 9.7.6
 SQL 許可 ID                                              = xxxxx
 ローカル・データベース別名                               = xxxxx


SQLCA 情報

 sqlcaid : SQLCA     sqlcabc: 136   sqlcode: 0   sqlerrml: 54
 sqlerrmc: 81943xxxxx xxxxxQDB2/AIX64548975489709541
 sqlerrp : SQL09076
 sqlerrd : (1) -1               (2) 2                (3) 0
           (4) 1                (5) 0                (6) 0
 sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)
           (7)      (8)      (9)      (10)       (11)
 sqlstate: 00000
[admin@xxxxx ~]$ /usr/local/bin/odbcinst -j
unixODBC 2.3.1
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /home/admin/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

仕方ないので、以下の手順でgdbで落ちているところをみました。

[root@xxxx bin]# ./apachectl stop
./apachectl stop: httpd stopped

[root@xxxx bin]# gdb httpd
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /www/bin/httpd...(no debugging symbols found)...done.
(gdb) run -X
Starting program: /www/bin/httpd -X
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x0000003169e7c2ca in memcpy () from /lib64/libc.so.6
(gdb) where
#0  0x0000003169e7c2ca in memcpy () from /lib64/libc.so.6
#1  0x00002aaaaadb67b8 in _estrndup (s=0x6b1c70 "`\034k", length=<value optimized out>)
    at /home/admin/src/php-5.2.10/Zend/zend_alloc.c:2444
#2  0x00002aaaaac5f03e in php_odbc_fetch_hash (ht=<value optimized out>,
    return_value=0x6b21c0, return_value_ptr=<value optimized out>,
    this_ptr=<value optimized out>, return_value_used=<value optimized out>,
    result_type=2) at /home/admin/src/php-5.2.10/ext/odbc/php_odbc.c:1511
#3  0x00002aaaaadfc202 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffffffba00)
    at /home/admin/src/php-5.2.10/Zend/zend_vm_execute.h:200
#4  0x00002aaaaadefd0c in execute (op_array=0x6aee28)
    at /home/admin/src/php-5.2.10/Zend/zend_vm_execute.h:92
#5  0x00002aaaaadd06fd in zend_execute_scripts (type=8, retval=<value optimized out>,
    file_count=3) at /home/admin/src/php-5.2.10/Zend/zend.c:1134
#6  0x00002aaaaad8dd3b in php_execute_script (primary_file=0x7fffffffded0)
    at /home/admin/src/php-5.2.10/main/main.c:2025
#7  0x00002aaaaae53267 in apache_php_module_main (r=<value optimized out>,
    display_source_mode=0) at /home/admin/src/php-5.2.10/sapi/apache/sapi_apache.c:53
#8  0x00002aaaaae5424e in send_php (r=0x835110, display_source_mode=0, filename=0x0)
    at /home/admin/src/php-5.2.10/sapi/apache/mod_php5.c:664
#9  0x00002aaaaae544a3 in send_parsed_php (r=0xdebf88)
    at /home/admin/src/php-5.2.10/sapi/apache/mod_php5.c:679
#10 0x0000000000422018 in ap_invoke_handler ()
#11 0x00000000004360fe in process_request_internal ()
#12 0x000000000043624d in ap_process_request ()
#13 0x000000000042c1c9 in child_main ()
#14 0x000000000042c810 in make_child ()
#15 0x000000000042ddfd in standalone_main ()
#16 0x000000000042ec03 in main ()

しかし、5,2→5.3にすると色々警告がでます。

find . -name "*.php" | xargs grep "ereg_"

これで修正箇所を探しました。