Tomislav Posted November 26, 2013 Share Posted November 26, 2013 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); } Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted November 26, 2013 Share Posted November 26, 2013 This is not PHP GD or a PHP version problem. The code you posted is using exec to run a an ImageMagick command to convert the images. For this code to work you need to have ImageMagick installed on the server. If you cant do this then you need to recode it to use the PHP GD image library instead. Quote Link to comment Share on other sites More sharing options...
Tomislav Posted November 26, 2013 Author Share Posted November 26, 2013 This is not PHP GD or a PHP version problem. The code you posted is using exec to run a an ImageMagick command to convert the images. For this code to work you need to have ImageMagick installed on the server. If you cant do this then you need to recode it to use the PHP GD image library instead. It is not working, so i assume that ImageMagick is not installed on server. And that is the reason i have asked for some help here, because I',m not a programmer but I would like to solve that problem myself. So, can someone help me recode it to use PHP GD image functions. Thanks. Quote Link to comment Share on other sites More sharing options...
Barand Posted November 26, 2013 Share Posted November 26, 2013 That is why we have a freelance forum where you can hire someone to do the conversion for you Quote Link to comment Share on other sites More sharing options...
Tomislav Posted November 26, 2013 Author Share Posted November 26, 2013 That is why we have a freelance forum where you can hire someone to do the conversion for you But as I see, no one there replies to posts. Quote Link to comment Share on other sites More sharing options...
Barand Posted November 26, 2013 Share Posted November 26, 2013 It's more of a "notice board" than a forum. People contact you direct (PM, email, skype) with their replies Quote Link to comment Share on other sites More sharing options...
.josh Posted November 26, 2013 Share Posted November 26, 2013 To be more clear, nobody replies because replies have been disabled in that forum; read the stickies there for info about the rules/procedure for posting there. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.