[extension] Image issue

Hi, everyone.

I’m trying to resize sample image and save it, using Image extension with ImageMagick, platform WINXP

here is resize code:

config code:

While executing resize action, i

get PHP error

Temp file with name “k2img–b73cbdf48c46ec2cbde88b5c3715f7ee09babf10.JPG” exists on disk C… Kinda weird it can’t remove it…

Any advise ?

As you haven’t included any path information regarding temp folder or temp file parent folder, I suspect that ImageMagick wants to find the temporary image in the wrong place.

As i know there is no config parameter like ‘temp folder’, unlink function is called by php, not ImageMagick.

Temporary image created in the same folder, where original image is.

Please rewrite the corresponding unlink call, so that it uses absolute path.

It is highly likely that ImageMagick uses wrong path information and tries to remove temporary files from the folder where entry script (probably index.php) is.

I can’t think of anything else, as Windowses are totally comfortable with php’s unlink function.

I tried to debug, and find out that exec() calls to ImageMagick don’t work, but parameters (path to IM, image files) seems to be correct. It works ok from command line, but sucks in exec().

Unlink() doesn’t work, because such file wasn’t created by ImageMagick convert.exe.

Is ImageMagick.php only a wrapper for the extension? I wasn’t familiar with that, sorry. I thought PHP has built-in functions to manipulate images with IM.

Are you sure exec() is allowed in your scripts? I’d check that in the first place. I don’t think this is the reason though.

Yep. ImageMagick.php is only a wrapper for command line tools.

I don’t know the reason why exec() can be disallowed :rolleyes:

Switched to GD2 temporary, it works…

But still wait for some advise :blink: