Code:
$newfilename = $name . "_1" . $ext;
$ss1path = "/home/***/public_html/screenshots/";
$res = move_uploaded_file($_FILES['ss1']['tmp_name'], $ss1path . $newfilename);
if (!$res)
{
$errorimage = "There was a problem while trying to upload your image.";
echo $errorimage;
exit;
}
$ss1original = "/home/***/public_html/screenshots/$newfilename";
$ss1imagesize = getimagesize($ss1original);
$ss1oldwidth = $ss1imagesize[0];
$ss1oldheight = $ss1imagesize[1];
$ss1path_thumb = "/home/***/public_html/screenshots/thumbs/";
$ss1thumbname = $newfilename;
$ss1newthumb = '/home/***/public_html/screenshots/thumbs/' . $ss1thumbname;
if (!copy($ss1original, $ss1newthumb)){
echo "There was a problem while trying to upload your image.";
exit;
}
if ($ss1oldwidth > $ss1oldheight){
$ss1thumbwidth = "150";
$ss1pct = $ss1thumbwidth / $ss1oldwidth;
$ss1thumbheight = round($ss1pct * $ss1oldheight);
}else{
$ss1thumbheight = "150";
$ss1pct = $thumbheight / $oldheight;
$ss1thumbwidth = round($pct*$oldwidth);
}
$ss1 = "$newfilename";
$make_magick = system("convert -sample $ss1thumbwidth x $ss1thumbheight $ss1original $ss1newthumb", $retval);
Ok, for some reason, my system command is not working, can anyone see a issue concerning this problem. *** is edited out site specifics. Thanks in advanced.