Philipp, On Wed, Mar 30, 2005 at 09:40:51AM +0200, Philipp Kern wrote: > Hi there Adam,
> On 30 Mar 2005, at 04:31, Adam Conrad wrote:
> >Philipp Kern said:
> >>Apache still segfaults when mysql_fetch_field() is called from within
> >>PHPMyAdmin:
> >>[notice] child pid 31234 exit signal Segmentation fault (11)
> >Can you reduce this to a useful testcase? I've tried to reproduce this
> >bug, and have failed miserably. mysql_fetch_field() always works just
> >fine for me.
> I did a 1:1 copy from the PHPMyAdmin code to reproduce this, and indeed
> it works:
> <?php
> mysql_connect(<server>, <user>, <pass>);
> $result = mysql_query("SELECT * FROM mysql.user");
> $fields = array();
> $num_fields = mysql_num_fields($result);
> for($i = 0; $i < $num_fields; $i++) {
> $fields[] = mysql_fetch_field($result, $i);
> }
> ?>
Substituting in my server info and a table I'm allowed to read, I've
tested this snippet with the cli, apache1.3, and apache2. No segfaults
whatsoever with php4 4.3.10-10. You're sure you've restarted apache
after upgrading php4?
--
Steve Langasek
postmodern programmer
signature.asc
Description: Digital signature

