strange works on PHP5.2.5 Apache 2.0.63 but dont on PHP....
Posted: Tue Jan 20, 2009 1:59 pm
hello,
my problem is in php script which is loading pictures from mysql database.
This script perfectly works on PHP version 5.2.5 and Apache 2.0.63
But on PHP version 5.2.8 and Apache 2.0.8 it dont works. Anyone knows why?
Thx. for any ideas.
my problem is in php script which is loading pictures from mysql database.
This script perfectly works on PHP version 5.2.5 and Apache 2.0.63
But on PHP version 5.2.8 and Apache 2.0.8 it dont works. Anyone knows why?
Thx. for any ideas.
Code: Select all
<?php
echo "START";
$connection = mysqli_connect("localhost", "user", "password", "db_name");
echo "START spojenia";
$order = $connection->prepare("SELECT data FROM pictures WHERE picture_name = 11232457367");
$order->bind_param("i", $_GET['id']);
$order->execute();
$data = null;
$order->bind_result($data);
if(!$order->fetch())
{
die ("error");
}
header("Content-type: image/jpeg");
print $data;
?>