Using php form the command line

Serg B. sergicles at
Mon Jan 15 08:15:20 UTC 2007

The package that you have installed is most likely an apache module...

What you need is a package called php5_cli. After installation it will
be located in the directory: /usr/bin/php

To find out the exact name (incase I am incorrect) you can try this:
apt-cache search php5 | grep cli


On 15/01/07, Dotan Cohen <dotancohen at> wrote:
> I installed php5 via apt-get, but when I try to find the path I cannot find it:
> $ which php
> $ which php5
> $
> Why is php not accessible from the command line? I have used php in
> Fedora from the command line. In Fedora, I can call php at
> /usr/bin/php. How can I enable it in Ubuntu as well? Thanks in
> adavnce.
> Dotan Cohen
> --
> ubuntu-users mailing list
> ubuntu-users at
> Modify settings or unsubscribe at:


More information about the ubuntu-users mailing list