I have not heard of a browser that would execute embedded PHP. PHP is basically a server-side language like Perl. Even though I run PHP under Windows for some local programming I have not seen a browser addon for this. Of course, on the server, a normal .PHP program would execute and not deliver PHP code (this delivery sometimes happens when there is a coding error). There might be a way to print the code as a string and have it delivered to the browser, or maybe embedding it in a .html page. Hmmm.
Hmm, I think might have stated my problem wrong. I don't want to execute the PHP scripts in the browser.
All I want to able to do is visit the page in my browser, test.php and it work, like a normal PHP script.
I mean it works great at the command line as a PHP CGI binary. But I know there is a way to get it to run in the browser. Do I just have to install as PHP apache module as well? Or is there another way?
Ok, I think I should probably restate my problem, as I think I that was source of my larger problem.
What I want do is the following: run php code through the web server (Apache) and serve this to webpages & also run php code from the command line in Linux.
Is there a way I can be happy with both? Do I install PHP as a apache module or CGI binary to accomplish this? If Apache module, what do I have to do t get scripts to run at the command line? Or is it just php ScriptName ?
You can run php as CGI in apache, the module is not required. Check out php.net for details on doing this. I'd recommend using both the module and runtime if you're planning on a large system with command-line scripts as apache's php module executes php code faster than when parsed through cgi.