Location of PHP

David david at kenpro.com.au
Sun Jul 3 23:54:59 UTC 2005


On Sun, Jul 03, 2005 at 11:37:05PM +0200, Dennis Kaarsemaker wrote:
> On zo, 2005-07-03 at 15:51 -0400, karigna wrote:
> > Actually a better term or what I really meant is the location of the
> > interpreter... I know it's installed since I can run the phpinfo()
> > function
> > from a test page and get the correct page shown in a browser pointed
> > to
> > localhost.
> 
> /usr/lib/apache2/modules/libphp4.so
> 
> If you want a command-line interpreter, install the php4-cli package

generically, if I'm looking for some file/package/whatever, I use the 
"locate" cli command. In a terminal, do:

$locate php | less

Typically you will get a few pages of files including what you are 
looking for. Sometimes this can be a bit messy, but what you are looking 
for is nearly always there, and you get the added benefit of seeing where 
lots of interesting things are hiding, such as documentation files.

One caveat though: if you have just installed something it won't yet be in 
your "locate" database, so you have to first (in a root terminal) do:

#updatedb
or
$sudo updatedb

which will then bring "locate" database fully up to date. I think this 
database is updated by cron on a daily basis, but updatedb will do it for 
you safely at any time.

"locate" is great for those times when you have that file that you created 
4 years ago and you are sure you kept it somewhere but can't remember 
where ;-)




More information about the ubuntu-users mailing list