Re: [PHP4BETA] MySQL not fully supported?

From: Date: Sun, 26 Mar 2000 02:05:42 +0000
Subject: Re: [PHP4BETA] MySQL not fully supported?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-12612@lists.php.net to get a copy of this message
I fixed a problem in PHP 4's implementation of mysql_result(), which would have prevented your script from working. I don't think it's related to the crash you're seeing, but it might be, who knows. Can you please update to the latest CVS and see if it solves, or helps solving the problem? Even if the script works, please do look at the errorlog to see if there are any crashes. Thanks, Zeev At 22:57 25/03/2000 , Mikael Grave wrote:
Christophe Long wrote: On Thu, 23 Mar 2000, Sascha Schumann wrote:
On Wed, Mar 22, 2000 at 08:05:49PM -0500, Mikael Grave wrote:
Here is two equivalent scripts that run perfectly under PHP3 on our server. Script 1 is not working under PHP4. Unfortunately, it seems that parts of PHPLIB rely on features of script 1.
Could you please try a snapshot and let us know whether it still happens? http://snaps.php.net/
Yes it still happens http://wml.webmotion.net:8080/citroen3/occasions/index.phtml and there is always this error message in apache's logs : [Thu Mar 23 10:41:45 2000] Script: '/home/httpd/html/wml/citroen3/occasions/index.phtml' --------------------------------------- php_mysql.c(197) : Block 0x08146900 status:
Beginning:      OK (allocated on php_mysql.c:525, 432 bytes)
      End:      Overflown (magic=0x00000000 instead of 0x2A8FCC84)
                At least 4 bytes overflown
--------------------------------------- php_mysql.c(525) : Freeing 0x08146924 (432 bytes), script=/home/httpd/html/wml/citroen3/occasions/index.pht ml [Thu Mar 23 10:41:46 2000] [notice] child pid 16876 exit signal Segmentation fault (11) I confirm it also still occurs with script1 (which was extracted from the above URL). Would Christophe and I help you by sending you 'gdb' stuff after making the crash occurs with Apache running in standalone mode? We are also ready to try to force PHP4 to compile with our MySQL libraries (3.22.10) if this becomes possible. Let them know, we would be very happy to help solving this problem :) Here is script1 again (if any of you is interested by having the SQL tables used by this script, I can send you a dump): <? mysql_connect("localhost","root","xxxxxx"); $sql_query_string="select annonces.id,annonces.code,marques.nom,annonces.modele,annonces.annee,annonc es.km,annonces.prix,annonces.photo from annonces,marques where annonces.marque_id=marques.id order by marques.nom ASC, annonces.modele"; $result=mysql("citroen",$sql_query_string); $num=mysql_num_rows($result); if ($num==0) {
    echo( "No vehicule found.<BR>" );
} else {
    for ($i=0; $i < $num; $i++) {
      $id=     mysql_result($result,$i,"annonces.id");
      $code=   mysql_result($result,$i,"annonces.code");
      $marque= mysql_result($result,$i,"marques.nom");
      $modele= StripSlashes(mysql_result($result,$i,"annonces.modele"));
      $annee=  mysql_result($result,$i,"annonces.annee");
      $km=     mysql_result($result,$i,"annonces.km");
      $prix=   mysql_result($result,$i,"annonces.prix");
      $photo=  intval(mysql_result($result,$i,"annonces.photo"));
      echo( "$id, $code, $marque, $modele, $annee, $km, $prix<BR>\n" );
    }
} ?> Cordially, Mikael --
Mikael Grave     Tel. (613) 731-4046      http://www.webmotion.com
Webmotion Inc.   Fax. (613) 260-9545    mikael.grave@webmotion.com
`----------------------------------------------------------------' -- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net
-- Zeev Suraski <zeev@zend.com> http://www.zend.com/

« previous php.version4 (#12612) next »