I need to have the executable path of my php, because I want to run php file on eclipse php. Obviously there is no exe file, so which file do I have to search to?
Asked
Active
Viewed 4.5k times
1 Answers
14
The default executable can be found with:
which php
which, on my system, results in /etc/bin/php
. However, if I list this file, it turns out that it is a symbolic link to /etc/alternatives/php
:
$ ls -l /usr/bin/php
lrwxrwxrwx 1 root root 21 mei 10 2016 /usr/bin/php -> /etc/alternatives/php
This, in turn, is (on my system) a symbolic link to /etc/bin/php7.2
:
$ ls -l /etc/alternatives/php
lrwxrwxrwx 1 root root 15 jun 20 2018 /etc/alternatives/php -> /usr/bin/php7.2
And this is the actual executable:
$ file /usr/bin/php7.2
/usr/bin/php7.2: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=1b669fd85cfcca25b9733cacf7e7ebaafc0ce17e, stripped

Jos
- 29,224