Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
If I run this from console It works great, even if I call the PHP file from the console it also works fine, other thing is that if instead of a PDF I send an JPG or PNG file it works fine too.
It could be your PHP config? There was a recent problem reported that was probably due to PHP configured in safe mode or something like that. Search the archives an see if you can find that or check your PHP configuration.
Also
try a simple IM command rather than your script.
In PHP all your convert and other such commands within your script probably need to have the full path to them specified.
Converting from pdf requires ghostscript (as I understand it). So you need to install the ghostscript delegate and then recompile IM. But PHP also needs to know about ghostscript and that may or may not work automatically.