What I showed you is a shell command.
If you don't have access to ssh,
you can create php script like this:
<?php
system("which mogrify");
?>
upload this into your server, and access it.
If this shows /usr/local/bin/mogrify then your path is /usr/local/bin.