ShivaGupta Posted September 8, 2013 Share Posted September 8, 2013 I know on most servers the path to php is /usr/bin/php or /usr/local/bin/php or something like that, however I was wondering, is there a simple way to find out precisely the path to php by running a script or similar?All answers appreciated. Link to comment https://forums.phpfreaks.com/topic/281980-path-to-php/ Share on other sites More sharing options...
Andy-H Posted September 8, 2013 Share Posted September 8, 2013 You can use PHP info: <?php php_info(); ?> Or run this in terminal: which php You should really just use Google to find this stuff... Link to comment https://forums.phpfreaks.com/topic/281980-path-to-php/#findComment-1448721 Share on other sites More sharing options...
trq Posted September 9, 2013 Share Posted September 9, 2013 /usr/bin/env php Should can generally be relied upon. Link to comment https://forums.phpfreaks.com/topic/281980-path-to-php/#findComment-1448787 Share on other sites More sharing options...
madhuvishwakarma Posted September 11, 2013 Share Posted September 11, 2013 Run the php in this path C:\xampp\htdocs Link to comment https://forums.phpfreaks.com/topic/281980-path-to-php/#findComment-1449104 Share on other sites More sharing options...
madhuvishwakarma Posted September 11, 2013 Share Posted September 11, 2013 php path run on enternet explorer browser. localhost/filename.php Link to comment https://forums.phpfreaks.com/topic/281980-path-to-php/#findComment-1449106 Share on other sites More sharing options...
priyankagound Posted September 11, 2013 Share Posted September 11, 2013 Installing WAMP Server to run PATH TO PHP: Goto www.wampserver.com and download WAMP Server. Just install it like other softwares by just clicking next next... Now go to START menu of windows and start wampserver. Generally, the path is Start -> WapmServer -> start WampServer Open your web browser and type http://localhost (or http://127.0.0.1 ) If you see a default WampServer home page, you installation is success. Now put your php code in www folder in your wamp installation directory. Usually this is C:\wamp\www Now type http://localhost/filename.php in your browser. (where filename is your php file name) It will execute your php code.. Thats it... Link to comment https://forums.phpfreaks.com/topic/281980-path-to-php/#findComment-1449111 Share on other sites More sharing options...
trq Posted September 11, 2013 Share Posted September 11, 2013 The last three replies have been useless and completely off topic. Thanks. Closing in case more appear. Link to comment https://forums.phpfreaks.com/topic/281980-path-to-php/#findComment-1449113 Share on other sites More sharing options...
Recommended Posts