Quite often, when you are installing an application on your host, it asks for the full path to a program. Galleries for example, will need the full path to the convert executable of ImageMagick, some e-commerce scripts need the full path to the curl binary, etc. Of course you can always contact your host and ask them for these details, but there is a much faster way :) By using the PHP script below, you can find the path to any executable on your server.
NB: The script uses the PHP exec function, so you might want to check if it is enabled on your server beforehand. If it is available, you can use this simple script to locate an executable:
<?php
print exec(’which convert‘);
?>
Place this in a empty file and name it locate.php (or anything else you like as long as it has the .php extension). Then simply access it via your browser and it will report the full path to the convert executable. If you are searching for something else (e.g mogrify, curl, etc), simply replace convert with the one you need :)