Jump to content

PHP and Command Line ImageMagick


wintallo

Recommended Posts

Hi,

 

I'm having some trouble with ImageMagick and PHP. I'm not using the extension. What I did was use the command line interface of the ImageMagick package. This is my problem. When I try use php to run command line commands, such as "mkdir testfolder" (I'm on Windows), it works great. But when I put in commands in such as "convert wallpaper.bmp wallpaper.jpg," nothing happens. This is all the different attempts I've made.

 

<?php

system("mkdir test"); 					// This works great!
system("convert wallpaper.bmp wallpaper.jpg"); 		// This doesn't work...
exec("convert wallpaper.bmp wallpaper.jpg"); 		// This doesn't work...
shell_exec("convert wallpaper.bmp wallpaper.jpg"); 	// This doesn't work...
escapeshellcmd("convert wallpaper.bmp wallpaper.jpg"); 	// This doesn't work...
`convert wallpaper.bmp wallpaper.jpg` 			// This doesn't work...

?> 

 

What am I doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/97363-php-and-command-line-imagemagick/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.