|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56593 Can't insert/read binary data
Submitted: 2005-10-12 03:37 UTC Modified: 2006-02-27 07:35 UTC
From: pandrzejczak at mac dot use dot pl Assigned:
Status: No Feedback Package: PDO_SQLITE (PECL)
PHP Version: 5.0.3 OS: MacOSX
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-10-12 03:37 UTC] pandrzejczak at mac dot use dot pl
<form enctype="multipart/form-data" action="display.php?
tryb=1" method="post">
    <input type="hidden" name="MAX_FILE_SIZE" 
value="10000000000000000" />
    Choose a file to upload: <input name="userfile" 
type="file" />
    <input type="submit" value="Upload File" />

if ($_GET['tryb']==1) 
$fp = fopen($_FILES['userfile']['tmp_name'], 'rb');
echo $_FILES['userfile']['error'];

$pdo = new PDO("sqlite:/sqlite3.sdb");  
$stmt = $pdo->prepare("insert into zdjecia (lp_zdjecia, 
zdjecie, polozenie) values (?, ?, ?)");

$id = 1; // some function to allocate a new ID
// assume that we are running as part of a file upload form
// You can find more information in the PHP documentation

$stmt->bindParam(1, $id);
$stmt->bindParam(2, $fp, PDO_PARAM_LOB);
$stmt->bindParam(3, $tekst);



Expected result:
It should insert image into db.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-12 11:47 UTC]
Try a PHP 5.1 snapshot from
 [2006-02-27 07:35 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 23 20:01:30 2024 UTC