lmagick works from command line but not from php script, sh: convert: command not found

Working with something that needs a shell access, like working with awesome imagick function and stuck with sh: convert: command not found

The thing is it works when the same command that run from php script is run on the command line.
It is a path issue.

exec("convert soruce.ext converted.ext", $report);

Here the report would tell how it goes and it will get back with the news

sh: convert: command not found

Now do

which convert

To get the full path of the command and use it

exec("full-path-to-convert source.ext converted.ext", report);

The above would work for any command that creates related problems.

symfony production path not working but works on dev environment

If you are working on the symfony and testing the changes, and you want to look at how it looks on the production env by just changing the url.. and if you are not seeing your current changes – most probably it is caching issue:
do the following being in your symfony project..

php app/console cache:clear --env=prod --no-debug

That is it