Re: [PHP4BETA] repeat: database problem with php-4.0b3
| From: | Derek Harding | Date: | Wed, 17 Nov 1999 01:03:10 +0000 |
| Subject: | Re: [PHP4BETA] repeat: database problem with php-4.0b3 | ||
| References: | 1 2 3 4 5 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-6341@lists.php.net to get a copy of this message | ||
Derek Harding wrote:
>
> Sascha Schumann wrote:
> >
> > > I'm not sure how to run apache under gdb since it forks off child
> > > processes to actually handle requests.
> >
> > $ gdb ./httpd
> > ...
> > <gdb> run -X
> >
> Ah, thanks. I'd tried to set it to follow forks but that didn't help. :)
> I'm sure I look like a total newbie, and in some ways I am since I've
> not worked much with Apache.
>
> I found the problem with the ODBC connections.
>
> I was using a DSN of: DSN=dsn_name which was required to get it to work
> under php3. However that causes a SEGV in the openlink lib. Using just
> dsn_name works just fine. This will mean some rework on some of my
> scripts. :-)
>
Looks like I spoke too soon. (Mix up between servers). I can avoid the
segv with odbc but can't actually get any useful results. All
odbc_exec's fail. As does an odbc_prepare() followed by an
odbc_execute().
Here's the backtrace when I use a DSN with dsn=xxx.
Program received signal SIGSEGV, Segmentation fault.
0x406e9049 in main_arena () from /lib/libc.so.6
(gdb) backtrace
#0 0x406e9049 in main_arena () from /lib/libc.so.6
#1 0x40645712 in buffered_vfprintf (s=0x406e8fc0,
format=0x407dbe5b "OpenLink: %s\n", args=0xbfffdffc) at
vfprintf.c:1767
#2 0x40640f66 in _IO_vfprintf (s=0x406e8fc0,
format=0x407dbe5b "OpenLink: %s\n", ap=0xbfffdffc) at
vfprintf.c:1029
#3 0x40648f47 in fprintf (stream=0x406e8fc0,
format=0x407dbe5b "OpenLink: %s\n") at fprintf.c:32
#4 0x407d3c04 in show_comm_error () from
/usr/local/openlink/lib/oplodbc.so.1
#5 0x407d4259 in RPC_Connect () from
/usr/local/openlink/lib/oplodbc.so.1
#6 0x407bc026 in ConnOpen () from /usr/local/openlink/lib/oplodbc.so.1
#7 0x407c2806 in _SQLDriverConnect ()
from /usr/local/openlink/lib/oplodbc.so.1
#8 0x407c17ed in CallSQLDriverConnect ()
from /usr/local/openlink/lib/oplodbc.so.1
#9 0x407c1960 in _SQLConnect () from
/usr/local/openlink/lib/oplodbc.so.1
#10 0x407c0679 in CallODBC () from /usr/local/openlink/lib/oplodbc.so.1
#11 0x407c19ad in SQLConnect () from
/usr/local/openlink/lib/oplodbc.so.1
#12 0x400e1988 in SQLConnect (hdbc=0x81b9ef8,
szDSN=0x81bac70 "dsn=onetoone_list", cbDSN=-3, szUID=0x81bacb8 "sa",
cbUID=-3, szAuthStr=0x818cb78 "xxxx", cbAuthStr=-3) at connect.c:710
#13 0x807c1d9 in odbc_sqlconnect (conn=0xbfffe940,
db=0x81bac70 "dsn=onetoone_list", uid=0x81bacb8 "sa",
pwd=0x818cb78 "xxxxx", cur_opt=2, persistent=0) at php_odbc.c:1619
#14 0x807c7fd in odbc_do_connect (ht=3, return_value=0xbfffea04,
list=0x81655c4, plist=0x81655f0, this_ptr=0x0, persistent=0)
at php_odbc.c:1786
#15 0x807c105 in php3_odbc_connect (ht=3, return_value=0xbfffea04,
list=0x81655c4, plist=0x81655f0, this_ptr=0x0) at php_odbc.c:1547
#16 0x80cd3c6 in execute (op_array=0x81b56b0) at zend_execute.c:1471
#17 0x805fab6 in php_execute_script (primary_file=0xbffffa7c) at
main.c:1199
#18 0x8075a29 in apache_php_module_main (r=0x819ffec, fd=21,
display_source_mode=0) at sapi_apache.c:87
#19 0x805e4b8 in send_php (r=0x819ffec, display_source_mode=0,
filename=0x81a0a5c "/home/httpd/dev2/tmp/odbc.php") at
mod_php4.c:332
#20 0x805e4eb in send_parsed_php (r=0x819ffec) at mod_php4.c:344
#21 0x80d8e13 in ap_invoke_handler ()
#22 0x80ec109 in process_request_internal ()
#23 0x80ec16c in ap_process_request ()
#24 0x80e3b2e in child_main ()
#25 0x80e3cbc in make_child ()
#26 0x80e3e19 in startup_children ()
#27 0x80e4446 in standalone_main ()
#28 0x80e4bc3 in main ()
#29 0x406141eb in __libc_start_main (main=0x80e488c <main>, argc=2,
argv=0xbffffc34, init=0x805c92c <_init>, fini=0x811889c <_fini>,
rtld_fini=0x4000a610 <_dl_fini>, stack_end=0xbffffc2c)
at ../sysdeps/generic/libc-start.c:90
(gdb)
Derek
--
Derek Harding
CTO Innovyx
http://www.innovyx.com/~derek/
-------------------------------------------------------------------
"Are you a philosopher? Where's your sponge?"
-- (Terry Pratchett, Small Gods)