I know, I know. Its an old one with tonnes of stuff all over the net about where uploading blobs goes wrong and why you shouldn't do it, but hey, I can't fix this so any advice is appreciated.
The thing that catches my attention is when the image is uploaded via my internet based site I get the following error:
[function.fopen]: failed to create stream: No such file or directory in /home/aftersho/v3/thumbs/event_handler.php on line 16
blah blah
Warning: fread(): supplied argument is not a valid stream resource in /home/aftersho/v3/thumbs/event_handler.php on line 16
Yet when I use exactly the same file, but hosted on my home computer, whilst still uploading to the internet hosted database, the image uploads fine.
All the rest of the information uploads ok, its just the image.
So I know the script is fine and I know the database is fine. I guess its permissions or something, but can't figure it at all.
<?
$table = 'bevents';
$image_data = addslashes(fread(fopen($image_data, "rb"), filesize($image_data)));
$query = "insert into $table values(id,'$artist','$type','$venue','$date','$flash','$ticketline','$details','$css','$format','$city','$extra','$image_data')";
print ("The ".$artist." event has been added to the database. Thank you.");
$result = mysql_db_query("as_photo", $query);
}
?>
thanks