php not found?

442 views
Skip to first unread message

Anson Mackeracher

unread,
Mar 3, 2010, 10:35:01 PM3/3/10
to phpsh
Hello all,

I am trying to run phpsh on my machine but I get an error saying:
-----------------------------------------
$ phpsh
Starting php

/bin/sh: php: not found

phpsh failed to initialize PHP.
Fix the problem and hit enter to reload or ctrl-C to quit.
-----------------------------------------

I am running Ubuntu 9.10, I have the php5 package installed, as well
as readline and pysqlite.
Any idea what I'm doing wrong?

Thanks
Anson MacKeracher

Anson Mackeracher

unread,
Mar 3, 2010, 10:40:31 PM3/3/10
to phpsh
Okay, I figured it out.

phpsh requires the php5-cli package to be installed on Ubuntu. I
should have thought of that.

-Anson

dan corson

unread,
Mar 3, 2010, 10:40:50 PM3/3/10
to ph...@googlegroups.com
Firstly, make sure you also have the php5-cli package installed.

Secondly, it's possible even that package only has a
/usr/bin/php5 (and no /usr/bin/php), based on this:
http://packages.ubuntu.com/karmic/i386/php5-cli/filelist
Though my expectation is that a /usr/bin/php symlink would still get
created by the post-install hook.

So, I would recommend:
- make sure php5-cli is installed too
- see if "which php" finds anything, like "/usr/bin/php"
- if it doesn't do "sudo ln -s /usr/bin/php5 /usr/bin/php"
- then "phpsh" should work fine

Let us know if that doesn't work. Sorry I don't have rapid access
to an Ubuntu test box right now. --dcorson

Reply all
Reply to author
Forward
0 new messages