strange works on PHP5.2.5 Apache 2.0.63 but dont on PHP....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
FreeAngel
Forum Newbie
Posts: 4
Joined: Tue Jan 15, 2008 5:46 am

strange works on PHP5.2.5 Apache 2.0.63 but dont on PHP....

Post by FreeAngel »

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.

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;
 
?>
 
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: strange works on PHP5.2.5 Apache 2.0.63 but dont on PHP....

Post by Mark Baker »

An indication of any error message, or some diagnostic messages from your SQL might help identify the problem.

However, what are you binding to?
Post Reply