The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Have you disabled the PHP image libraries? I've used them in the past on some of my sites hosted with you. It's an extremely handy feature, and I can't think of a reason why you would take it away.
Cheers,
monkey_man
image_.jpg
And I assume thats supposed to be:
image_1.jpg
Or something similar. As the functions are sending back the error that they cannot open the stream rather then the function not being recognised. Have you checked to ensure that you are referencing your image_id as $_GET['image_id'] rather then $image_id.
> Also, just using the PHP file in the browser doesn't appear to
> work:
> [URL]http://www.p***etmonkey.co.uk/berlin/load_thumb.php?image_id=4[/URL]
Surely it doesnt work on its own because you dont have your few lines of code to declare everything in $_GET and $_POST as variables? (I assume its done in index.php) as theres no register globals on.
The error is
getimagesize(images/image_.jpg): failed to open stream: No such file or directory in...
Meaning that $image_id hasnt been declared.
Probably irrelevant to your origin problem but still. :P
The format for the images goes like "images/image_4.jpg", all off the "berlin/" directory.
I've never had any trouble with this before, so it's probably an error I've made elsewhere, but I can't find any.
The load_thumb.php file:
<?php
$imgdir = "images/image_";
$imgformat = ".jpg";
$imgfile = "$imgdir$image_id$imgformat";
header("Content-type: image/jpeg");
list($width_orig, $height_orig) = getimagesize($imgfile);
$width = 70;
$height = 53;
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($imgfile);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
imagejpeg($image_p, null, 65);
imagedestroy($image_p);
?>
EDIT: It's still a banned word :(
I tested it by loading the image files instead of the PHP file, and it found the path, which is why I thought you may have disabled the GD libs.
Have you disabled the PHP image libraries? I've used them in the past on some of my sites hosted with you. It's an extremely handy feature, and I can't think of a reason why you would take it away.
Cheers,
monkey_man