Arty Ziff Posted April 29, 2011 Share Posted April 29, 2011 How do I find the location of the php executable? Running CentOS, and it's not at /usr/local/bin/php... Quote Link to comment https://forums.phpfreaks.com/topic/235062-location-of-php-executable/ Share on other sites More sharing options...
QuickOldCar Posted April 29, 2011 Share Posted April 29, 2011 Look in /usr/bin It's been a while since I used centos you can make yourself a phpinfo file to see the locations place this code into a php file and name it like myinfo.php , then visit http://mysite.com/myinfo.php to see the locations. Use your server name of course. <?php phpinfo(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/235062-location-of-php-executable/#findComment-1208041 Share on other sites More sharing options...
requinix Posted April 29, 2011 Share Posted April 29, 2011 In a shell, $ which php Quote Link to comment https://forums.phpfreaks.com/topic/235062-location-of-php-executable/#findComment-1208042 Share on other sites More sharing options...
Arty Ziff Posted April 29, 2011 Author Share Posted April 29, 2011 Thanks, I didn't see the location in phpinfo, but I could be blind... "which" works. Yes, /usr/bin is where CentOS (and I suppose RHEL) puts it. I'm running code from cron outside the web root, thus I can't use lynx ... Quote Link to comment https://forums.phpfreaks.com/topic/235062-location-of-php-executable/#findComment-1208309 Share on other sites More sharing options...
M4verick Posted April 29, 2011 Share Posted April 29, 2011 If I'm not mistaken you can use the 'locate' command as well. I think 'which' shows you which one the system is currently using, and 'locate' shows you all the locations it can be found at, but includes all instances of the word being located (like directories, files with the word as part of the name, etc). Quote Link to comment https://forums.phpfreaks.com/topic/235062-location-of-php-executable/#findComment-1208327 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.