Jump to content

Web Server


The Little Guy

Recommended Posts

Another question.

 

When Apache requests a PHP page, how does it say "Run the PHP parser on this file"? The way I assumed that it does it, is it runs the PHP command, in a shell or command line environment, such as an execute function or something of that nature.

 

Would this be a fair assumption or not? To me, I feel that it may be extra work for it, but maybe I am wrong.

 

Any ideas?

Link to comment
Share on other sites

TLG, the way you just described it is essentially running PHP in CGI mode.

 

 

When it's loaded as an extension, it has a certain API that Apache uses to tell it "hey, do something with this file."

 

Modules are usually always loaded, so they are usually a bit faster than initiating an executable.

Link to comment
Share on other sites

You want to make your web server compatible with the PHP module for Apache?

 

No, I would like to make my server compatible with PHP, so I can run php with my web server.

 

Its the same thing. Good luck.

Link to comment
Share on other sites

You want to make your web server compatible with the PHP module for Apache?

 

No, I would like to make my server compatible with PHP, so I can run php with my web server.

 

So.. If Apache is forwarding the PHP to the parser/interpreter, how would it do that, and how would It get the information back?

 

 

In CGI mode, mod_cgi handles it.  In extension mode, the PHP Apache extension is coded around the Apache module API.

 

 

I'm not quite sure how PHP in CGI mode works.

 

 

I know that CGI applications take in POST data on stdin and other stuff is in environmental variables, but I don't know if PHP follows the CGI specs.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.