php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35383 can't open the page autoshow.php
Submitted: 2005-11-25 08:40 UTC Modified: 2005-12-03 01:00 UTC
From: kismet at 56 dot com Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 6CVS-2005-11-25 (snap) OS: windows xp sp2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kismet at 56 dot com
New email:
PHP Version: OS:

 

 [2005-11-25 08:40 UTC] kismet at 56 dot com
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-25 11:11 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.


 [2005-12-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 08:01:30 2025 UTC