Re: [PHP4BETA] php4/phplib discoveries...

From: Date: Tue, 12 Oct 1999 19:49:22 +0000
Subject: Re: [PHP4BETA] php4/phplib discoveries...
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-5524@lists.php.net to get a copy of this message
See my other message on the way, I managed to get a backtrace. The box is running the cvs as of a few days ago... I'm updating my home machine now to see what happens on linux... Andi Gutmans wrote: > > What version of PHP 4.0 are you using? Beta 2 or the latest CVS's of Zend, > TSRM, and PHP 4.0 > > Andi > > At 02:47 PM 10/12/99 -0400, Chad wrote: > > >Wish I had good news! Maybe someone can offer some analysis... I've > >narrowed the immediate problem down. > > > >First thing was that on line 36 in db_mysql.inc there was a dollar sign > >that needed escaped, which got rid of the parse error. > > > >The next problem which other have observed is that hitting the pages > >produces an empty query error. What I've tracked this down to is the > >constructor for db_mysql.inc, which looks like: > > > > /* public: constructor */ > > function DB_Sql($query = "") { > > $this->query($query); > > } > > > >basically it just executes a query if there is an argument. So what > >happens is that the ct_sql.inc class calls on the database class to > >create a new database object with the line > > > >$this->db = new $name; > > > >where $name is the database class. When it does this, it appears that > >the constructor get's called and passed an empty query, which phplib > >then tries to execute, resulting in the error. Now why PHP4 does this > >and not PHP3 is something I haven't played around enough to discover, > >maybe someone else knows offhand. Anyway, my quickie solution was to > >modify the constructor so it looks like: > > > > /* public: constructor */ > > function DB_Sql($query = "") { > > if ($query != "") { > > $this->query($query); > > } > > } > > > > > >Problem solved? Nope, now comes the real work! Fixing this got rid of > >the empty SQL error, but now the server core dumps... And this is now > >the task at hand. So maybe some of the knowledgable PHP4 folks can > >suggest a course to proceed as the logs and a backtrace don't say much > >at all. The error log shows: > > > >[Tue Oct 12 14:22:01 1999] [notice] child pid 13683 exit signal > >Arithmetic Excep > >tion (8) > >[Tue Oct 12 14:23:13 1999] [notice] child pid 13706 exit signal > >Segmentation Fau > >lt (11) > >[Tue Oct 12 14:23:19 1999] [notice] child pid 13685 exit signal > >Segmentation Fau > >lt (11) > > > >and dbx says: > > > >terminating signal 8 SIGFPE > > > >Which has to be the least helpfull error I've ever seen. That's all it > >says, nothing else! Now maybe dbx is screwey, I'll try and get gdb > >installed this afternoon and see what happens. > > > >But, if anyone has any other suggestions on tracking this down, I'd > >appreciate it! > > > > > >-- > > > >Chad Cunningham > >ccunning@math.ohio-state.edu > > > >Physicists think the real world models equations. > >Engineers think equations model the real world. > >Mathematicians fail to make the connection. > > > >-- > >PHP 4 Beta > > --- > Andi Gutmans <andi@zend.com> > http://www.zend.com/ > > -- > PHP 4 Beta -- Chad Cunningham ccunning@math.ohio-state.edu Physicists think the real world models equations. Engineers think equations model the real world. Mathematicians fail to make the connection.

« previous php.version4 (#5524) next »