I am trying to execute a simple ImageMagick convert command from a php script, i can convert the same files and achieve the results via command prompt but in php i am unable to execute the same command by any means , the code is :
exec('convert -density 350 '.__DIR__ . DIRECTORY_SEPARATOR .'test.pdf '. __DIR__ . DIRECTORY_SEPARATOR . 'image.png');
and this error is thrown by php
convert.exe: no decode delegate for this image format 'C:\XAMPP\htdocs\test.pdf' @ error/constitute.c/ReadImage/532. convert.exe: missing an image filename 'C:\XAMPP\htdocs\image.png' @ error/convert.c/ConvertImageCommand/3016.
With same configuration on a Windows 7 x64 i can execute and achieve the result, but on windows 2008 R2 i am unable, what could be the cause for this?