Please Help Me!
Running
Windows Server 2003
PHP 5.2.2
ImageMagick 6.3.4-10 Q16 Windows Static - Installed to c:\ImageMagick
Gave IUSR account read/execute permissions on c:\ImageMagick
Gave IUSR account read/execute permissions to c:\php\cmd.exe (
I copied c:\windows\system32\cmd.exe to c:\php)
php script (resize.php)
<?php
$cmd = "mogrify -geometry 80x60 C:\Inetpub\intranet\photos\logo.jpg";
exec($cmd);
?>
When the script is executed from the browser the image does not change size. If I call mogrify from the command line with the same parameters it resizes logo.jpg. If I call php from the command line to run resize.php it WILL resize logo.jpg
fyi - I do have php set to display errors and I am not getting any.
I have done many google searches for the past two days in attempts to find what I am missing to no avail.
Bill
installation problem windows 2003 and php 5
Re: installation problem windows 2003 and php 5
I do not know how it is working from the command line but as I see it you do not have an input image and -geometry is not for resizing. I do not Use mogrify so I can not be sure but try:
Code: Select all
<?php
$cmd = "mogrify input.jpg -resize 80x60 C:\Inetpub\intranet\photos\logo.jpg";
exec($cmd);
?>
Re: installation problem windows 2003 and php 5
The syntax for mogrify is correct, I just confirmed on the imagemagick website.
http://www.imagemagick.com/www/mogrify.html
http://www.imagemagick.com/www/mogrify.html
Re: installation problem windows 2003 and php 5
OK but I think you still need -resize not -geometry.
Re: installation problem windows 2003 and php 5
I changed my script to use the resize option rather than the geometry option. still no difference unfortunately.
$cmd = "mogrify -resize 80x60 C:\Inetpub\intranet\photos\logo.jpg";
exec($cmd);
I have a feeling its an issue between iis, php, and windows. I just dont know what I am missing. Has anyone else used this combination of software at these version levels?
$cmd = "mogrify -resize 80x60 C:\Inetpub\intranet\photos\logo.jpg";
exec($cmd);
I have a feeling its an issue between iis, php, and windows. I just dont know what I am missing. Has anyone else used this combination of software at these version levels?
Re: installation problem windows 2003 and php 5
As you say both -resize and -geometry work - I would not have thought they would
Anyway using a relative path to the image with php5 on my XAMMP server will work so as you say it looks like something to do with windows?
Anyway using a relative path to the image with php5 on my XAMMP server will work so as you say it looks like something to do with windows?
Re: installation problem windows 2003 and php 5
I am betting the problem is a windows permission issue but I have granted what I believe all the proper permissions. Is there anyone out there that can please help me?