|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-25 11:11 UTC] tony2001@php.net
[2005-12-03 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 12:00:01 2025 UTC |
Description: ------------ apache.exe application error "0x0076cc6a" instruction referenced memory "0x45532730" can not be readed. Reproduce code: --------------- <? ob_start(); $dsn = 'sqlite:view.db'; try { $dbh = new PDO($dsn, $user, $password); $dbh->beginTransaction(); $sqlno = 'SELECT max(serial) FROM picture'; $sthno = $dbh->prepare($sqlno); $sthno->execute(); $res = $sthno->fetch(); $maxnum = $res[0]; } catch (PDOException $e) { echo 'Connection failed: ' . $e->getMessage(); } if (!$num) { $num = 1; try { $dbh = new PDO($dsn, $user, $password); $dbh->beginTransaction(); $sql = 'SELECT length,code FROM picture where serial ='.$num; $sth = $dbh->prepare($sql); $sth->execute(); $result = $sth->fetch(); $dsn=null; } catch (PDOException $e) { echo 'Connection failed: ' . $e->getMessage(); $dsn=null; } header("Content-type: image/jpeg"); header("Refresh:2;URL=autoshow.php"); echo base64_decode($result[1]); setcookie("num",$num+1); } elseif($num <= $maxnum) { $num=$_COOKIE["num"]; try { $dbh = new PDO($dsn, $user, $password); $dbh->beginTransaction(); $sql = 'SELECT length,code FROM picture where serial ='.$num; $sth = $dbh->prepare($sql); $sth->execute(); $result = $sth->fetch(); $dsn=null; } catch (PDOException $e) { echo 'Connection failed: ' . $e->getMessage(); $dsn=null; } header("Content-type: image/jpeg"); header("Refresh:2;URL=autoshow.php"); echo base64_decode($result[1]); setcookie("num",$num+1); } else { print "<script language=\"javascript\">"; print "alert (\"ȫ??ͼƬ??ʾ????\");"; print "window.close();"; print "</script>"; } ?> Expected result: ---------------- the page refreshed every 2 second to show anther picture Actual result: -------------- just show the first picture then it core down.