[PHP] calling imagemagick from php
Hello, I am trying to call imagemagick directly from php and am using this code: http://sniptools.com/vault/dynamic-thumbnailing-with-imagemagick-in-php.htm problem is, nothing happens, I simply get the returned error that the thumbnail wasn't created. I have talked to my isp and imagemagick is installedhow can I debug this?? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] calling imagemagick from php
I have actually changed my code to this for debug purposes system('convert -geometry 200 x 200 image.JPG theThumb.gif', $retval) and if I cut out string between the single quotes and just run it at a command prompt, it works greatwhen I run this php script, I get syntax errorswhat is wrong? Thanks, Eddie -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 29, 2004 10:14 AM To: Php-General Subject: [PHP] calling imagemagick from php Hello, I am trying to call imagemagick directly from php and am using this code: http://sniptools.com/vault/dynamic-thumbnailing-with-imagemagick-in-php.htm problem is, nothing happens, I simply get the returned error that the thumbnail wasn't created. I have talked to my isp and imagemagick is installedhow can I debug this?? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] calling imagemagick from php
I have actually changed my code to this for debug purposes system('convert -geometry 200 x 200 image.JPG theThumb.gif', $retval) and if I cut out string between the single quotes and just run it at a command prompt, it works greatwhen I run this php script, I get syntax errorswhat is wrong? Perhaps convert is not in your path? Also, I'm not sure that the -geometry argument is going to behave how you expect - typically, geometry is expressed as WxH, not W x H, in command-line arguments to imagemagick. In the former case, you will set the size of your output image to W width and H height. In the latter case, I believe that the 'x H' is ignored, and you implicitly set the size of your output image to W width and W height. Big difference for any aspect ratio besides 1:1. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] calling imagemagick from php
I can go into the directory cut out the code between the single quotes and execute it and it works fine. It just doesn't seem to work running from the system or exec function. The $retval is 1. When I try to run the php script from the command line I get syntax error near unexpected token 'theThumb.gif',$retvalue)' Thanks, Eddie -Original Message- From: Michal Migurski [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 29, 2004 11:09 AM To: Edward Peloke Cc: Php-General Subject: RE: [PHP] calling imagemagick from php I have actually changed my code to this for debug purposes system('convert -geometry 200 x 200 image.JPG theThumb.gif', $retval) and if I cut out string between the single quotes and just run it at a command prompt, it works greatwhen I run this php script, I get syntax errorswhat is wrong? Perhaps convert is not in your path? Also, I'm not sure that the -geometry argument is going to behave how you expect - typically, geometry is expressed as WxH, not W x H, in command-line arguments to imagemagick. In the former case, you will set the size of your output image to W width and H height. In the latter case, I believe that the 'x H' is ignored, and you implicitly set the size of your output image to W width and W height. Big difference for any aspect ratio besides 1:1. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] calling imagemagick from php
I changed 200 x 200 to 200x200 and it still doesn't work. I also checked and safe_mode is OFF. Thanks, Eddie -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 29, 2004 11:36 AM To: Michal Migurski Cc: Php-General Subject: RE: [PHP] calling imagemagick from php I can go into the directory cut out the code between the single quotes and execute it and it works fine. It just doesn't seem to work running from the system or exec function. The $retval is 1. When I try to run the php script from the command line I get syntax error near unexpected token 'theThumb.gif',$retvalue)' Thanks, Eddie -Original Message- From: Michal Migurski [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 29, 2004 11:09 AM To: Edward Peloke Cc: Php-General Subject: RE: [PHP] calling imagemagick from php I have actually changed my code to this for debug purposes system('convert -geometry 200 x 200 image.JPG theThumb.gif', $retval) and if I cut out string between the single quotes and just run it at a command prompt, it works greatwhen I run this php script, I get syntax errorswhat is wrong? Perhaps convert is not in your path? Also, I'm not sure that the -geometry argument is going to behave how you expect - typically, geometry is expressed as WxH, not W x H, in command-line arguments to imagemagick. In the former case, you will set the size of your output image to W width and H height. In the latter case, I believe that the 'x H' is ignored, and you implicitly set the size of your output image to W width and W height. Big difference for any aspect ratio besides 1:1. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] calling imagemagick from php
I seem to remember having similar problems with ImageMagick. Have you checked the permissions on the directory this PHP file is running in? You'll probably need to give group write permissions, and make sure the directory is in the same group that PHP is running under so that it has permission to create files in the directory. You may also need to specify a full path in the command (ie, something like /usr/bin/convert or whatever it is) On Tue, 29 Jun 2004 11:40:47 -0400, Edward Peloke [EMAIL PROTECTED] wrote: I changed 200 x 200 to 200x200 and it still doesn't work. I also checked and safe_mode is OFF. Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php