Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get php installation path [closed]

Tags:

php

How can you find out what the PHP installation path is on a server?

like image 625
Oto Shavadze Avatar asked May 13 '14 20:05

Oto Shavadze


People also ask

How do I find where PHP is installed?

On Windows the default path for the php. ini file is the Windows directory. If you're using the Apache webserver, php. ini is first searched in the Apaches install directory, e.g. c:\program files\apache group\apache .

Where is PHP installed on Ubuntu?

/usr/bin/php. /usr/bin/php7. 0. /usr/bin/php7.

How do I know if PHP is installed on Windows?

1. Type the following command, replacing [location] with the path to your PHP installation. 2. Typing php -v now shows the PHP version installed on your Windows system.


2 Answers

In your terminal run the following:

which php

http://unixhelp.ed.ac.uk/CGI/man-cgi?which

Running PHP's https://php.net/phpinfo should tell you more about the PHP that's currently running your scripts.

<?php phpinfo(); 

put this line into a file and run it on a browser.

like image 104
tester Avatar answered Sep 29 '22 17:09

tester


In a command prompt, type

which php

whereis php

like image 45
Abhilash Muthuraj Avatar answered Sep 29 '22 15:09

Abhilash Muthuraj