in PHP

Finding PHP Executable without contacting Host Provider

Came across a interesting issue with running a script via a CRON job.   I needed to find out what the path is to the PHP executable.   I could make a educated guess and attempt to try /usr/bin/php, but I find a few ways this could be done.

  1. Use the System function and execute the ls command to find the binary
  2. Use SSH access and action the command whereis php

References:

http://uk3.php.net/system

  • Related Content by Tag