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
phpsh requires the php5-cli package to be installed on Ubuntu. I
should have thought of that.
-Anson
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