wings@volkan-di
03-12-2008, 11:54 AM
Hi Guys,
I recently moved from a host, and I am having trouble with GD. I have a simple script:
<?
//GET COMMON FUNCTIONS
include_once("../common.php");
header("Content-type: image/jpeg");
session_start();
// create an array to hold directory list
$results = array();
// create a handler for the directory
$handler = opendir("../images/ver/");
$picture = $_GET[pictureid];
$decoded = base64_decode($picture);
$split = explode(" ", $decoded);
$_SESSION[session_actual_veri_image] = $split[0];
$im = @imagecreatefromjpeg("http://www.****.co.uk/images/ver/$split[0].jpg");
imagejpeg($im);
imagedestroy($im);
?>
Running on PHP 5.2.5 with GD 2.0.34, and it outputs the errors:
<br />
<b>Warning</b>: imagejpeg(): supplied argument is not a valid Image resource in <b>/home/sites/*****/public_html/cp/randomimage.php</b> on line <b>18</b><br />
<br />
<b>Warning</b>: imagedestroy(): supplied argument is not a valid Image resource in <b>/home/sites/*****/public_html/cp/randomimage.php</b> on line <b>19</b><br />
I looked though pages and pages on google but couldnt find what was causing the problem... Any ideas?
Any help would be GREATLY appreciated
V
I recently moved from a host, and I am having trouble with GD. I have a simple script:
<?
//GET COMMON FUNCTIONS
include_once("../common.php");
header("Content-type: image/jpeg");
session_start();
// create an array to hold directory list
$results = array();
// create a handler for the directory
$handler = opendir("../images/ver/");
$picture = $_GET[pictureid];
$decoded = base64_decode($picture);
$split = explode(" ", $decoded);
$_SESSION[session_actual_veri_image] = $split[0];
$im = @imagecreatefromjpeg("http://www.****.co.uk/images/ver/$split[0].jpg");
imagejpeg($im);
imagedestroy($im);
?>
Running on PHP 5.2.5 with GD 2.0.34, and it outputs the errors:
<br />
<b>Warning</b>: imagejpeg(): supplied argument is not a valid Image resource in <b>/home/sites/*****/public_html/cp/randomimage.php</b> on line <b>18</b><br />
<br />
<b>Warning</b>: imagedestroy(): supplied argument is not a valid Image resource in <b>/home/sites/*****/public_html/cp/randomimage.php</b> on line <b>19</b><br />
I looked though pages and pages on google but couldnt find what was causing the problem... Any ideas?
Any help would be GREATLY appreciated
V