Anyone knows how to change the code posted above to work on server wit PHP 5.3. ?
elseif (isset($_POST['todoaction']) && $_POST['todoaction'] == 'save')
{
$original = 'o_'.$_POST['slika'];
$path = getenv('DOCUMENT_ROOT').'/images/content/';
$v = exec("convert ".$path.$original." -crop ".$_POST['width']."x".$_POST['height']."+".$_POST['x1']."+".$_POST['y1']." ".$path.$_POST['slika']);
list($width, $height) = getimagesize($path.$_POST['slika']);
if (isset($_POST['h']) && $_POST['h'] != '')
{
$v = @exec("convert ".$path.$_POST['slika']." -resize ".$_POST['w']."x".$_POST['h']." ".$path.$_POST['slika']);
}
else
{
$v = @exec("convert ".$path.$_POST['slika']." -resize ".$_POST['w']."x225 ".$path.$_POST['slika']);
}
unset ($slika);
}