Reply to Script stops without errors

Script stops without errors new!
by Robert, 12 years, 6 months ago
For some reason a script stops doing anything half way through. If you look at the following code you can see how I'm trying to see what is causing the stop.

// save uploaded image with a new name
$foo->file_new_name_body = $image_name;
$foo->Process($save_directory);
echo 'hi 1';
if ($foo->processed) {
  echo 'original image copied 1';
} else {
  echo 'error 1: ' . $foo->error;
}

/*
// save uploaded image with a new name,
// resized to 100px wide
$foo->file_new_name_body = $image_name . '_thumb';
$foo->image_resize = true;
$foo->image_convert = gif;
$foo->image_x = 138;
$foo->image_ratio_y = true;
$foo->file_overwrite = true;
$foo->Process($save_directory);
echo 'hi 2';
*/
          
// resized to 100px wide
echo '1';
$foo->file_new_name_body = $image_name . '_medium';
echo '2';
$foo->image_resize = true;
echo '3';
$foo->image_convert = jpg;
echo '4';
$foo->image_x = 300;
echo '5';
$foo->image_ratio_y = true;
echo '6';
$foo->file_overwrite = true;
echo '7';
$foo->Process($save_directory);
echo '8';
 
if ($foo->processed) {
  echo 'original image copied';
} else {
  echo 'error 2: ' . $foo->error;
}

Running the above code, the last thing I see is '7' printed to screen. The last $foo->Process doesn't run. I don't get '8' and that final error does nothing.

What would be causing this kind of behaviour?Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important