10
4
I have installed Apache and PHP. I know PHP works as I have tested a simple PHP file on an Apache server.
I'm writing a simple webserver which should be able to process PHP files. So once I get a request for a PHP file, I want to do something like 'exec php test.php' and get the output and pass it to the client.
As I'm not much into Ubuntu, I don't know where the PHP executable is (should be in \bin right?) to do it. But there is no PHP file inside \bin or \usr\bin.
When I run 'which php' it shows nothing. How do I do this?
1What happened is most likely that you got php in apache as php module (technically - a library not an executable binary that gets called externally), that's why you couldn't find the binary. This comment is meant to complete the answer, which tells you what needs to be done to get the php binary in your system but doesn't provide any reasons why it was missing. – AnonymousLurker – 2012-11-03T09:32:05.967
If you are really running Ubuntu 8.10 like your tags suggest, you should understand Ubuntu 8.10 is extremely out of date. You really should upgrade ASAP. There is no security support for that release. – Zoredache – 2012-11-03T09:49:08.460
@Zoredache yeah I know it's very old. But I'm not a Ubuntu user. I had the CD and I installed it, just for my assignment! :D – samsamara – 2012-11-03T11:16:38.603