For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > March 2006 > PHP Apache Question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PHP Apache Question
Steff

2006-03-27, 7:56 am

I would to understand what does apache do after all. I mean to set up PHP we
need to have an apache server working as well. Why's that?

I can display the result of some HTML code in my browser without apache
though...



David Haynes

2006-03-27, 7:56 am

Steff wrote:
> I would to understand what does apache do after all. I mean to set up PHP we
> need to have an apache server working as well. Why's that?
>
> I can display the result of some HTML code in my browser without apache
> though...


Apache is responsible for having the conversation with your browser.

It goes like this (very rough outline):

Your browser uses the URL you supply to send an HTTP request to Apache.
Apache sees that the request is for a PHP page.
Apache uses the php module to run the PHP page code and accepts the
output from PHP as HTML code.
Apache then uses the HTTP protocol to send the HTML code to your browser.
Your browser interprets the HTML code and displays the page.

You *can* run PHP without apache but only if you don't want to view the
resulting HTML over a network with a browser.

-david-

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com