You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Toni Pizà <se...@gmail.com> on 2006/11/13 17:43:09 UTC

How the PHP works?

Hello world!

I know that the question isn't simple, but .. how works the php
integration in Apache? Do you have implemented an php interpreter, or
simply use an existent interpreter? Which files/functions do this
work?

As you can see, I am lost, and I don't know where to search. Excuse me
if my question is an stupid question :P

-- 
"Two of the most famous products of Berkeley are LSD and Unix. I don't
think that this is a coincidence."
http://servomac.blogspot.com

Re: How the PHP works?

Posted by Sander Temme <sc...@apache.org>.
On Nov 13, 2006, at 8:43 AM, Toni Pizà wrote:

> As you can see, I am lost, and I don't know where to search. Excuse me
> if my question is an stupid question :P

Yes, you are lost. Please download PHP from http://www.php.net/ and  
follow the instructions in the INSTALL document contained in their  
distribution.

This mailinglist is a forum for the discussion of development issues  
concerning the Apache HTTP Server. For discussions about using  
Apache, please refer to users@httpd.apache.org. For discussion on  
issues specific to PHP, you will find the correct venue at www.php.net.

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Re: How the PHP works?

Posted by Aaron Bannert <aa...@clove.org>.
On Mon, Nov 20, 2006 at 09:51:44PM +0000, Andy Armstrong wrote:
> On 13 Nov 2006, at 17:09, Andy Armstrong wrote:
> >Toni - this isn't really the right list for your question - this  
> >list is concerned with the development of Apache itself.
> >
> >The majority of the PHP code is not Apache specific and then  
> >there's an Apache loadable module that interfaces with the PHP engine.
> 
> Better a week late than never. I wonder where that's been.

In the moderator queue, sorry for the delay.

-aaron

Re: How the PHP works?

Posted by Andy Armstrong <an...@hexten.net>.
On 13 Nov 2006, at 17:09, Andy Armstrong wrote:
> Toni - this isn't really the right list for your question - this  
> list is concerned with the development of Apache itself.
>
> The majority of the PHP code is not Apache specific and then  
> there's an Apache loadable module that interfaces with the PHP engine.

Better a week late than never. I wonder where that's been.

-- 
Andy Armstrong, hexten.net


Re: [info@ch2o.info] Re: How the PHP works?

Posted by Mathieu CARBONNEAUX <in...@ch2o.info>.
oups the dev docs link is: http://httpd.apache.org/docs/2.0/developer/

  _____  

From: Andy Armstrong [mailto:andy@hexten.net]
To: dev@httpd.apache.org
Sent: Mon, 13 Nov 2006 18:09:56 +0100
Subject: [info@ch2o.info] Re: How the PHP works?

Toni - this isn't really the right list for your question - this list  
is concerned with the development of Apache itself.

The majority of the PHP code is not Apache specific and then there's  
an Apache loadable module that interfaces with the PHP engine.

On 13 Nov 2006, at 16:43, Toni Pizà wrote:

> Hello world!
>
> I know that the question isn't simple, but .. how works the php
> integration in Apache? Do you have implemented an php interpreter, or
> simply use an existent interpreter? Which files/functions do this
> work?
>
> As you can see, I am lost, and I don't know where to search. Excuse me
> if my question is an stupid question :P
>
> -- 
> "Two of the most famous products of Berkeley are LSD and Unix. I don't
> think that this is a coincidence."
> http://servomac.blogspot.com
>

-- 
Andy Armstrong, hexten.net

  

Re: [info@ch2o.info] Re: How the PHP works?

Posted by Mathieu CARBONNEAUX <in...@ch2o.info>.
php is an interpreter that can be embedable in many web server(and other thing) and can be usable a command line interpreter...

and is the php team that make the embedading of php in each server...

each embeding is named sapi, and go in sapi (Serveur API) directory of PHP, and you while see some implementation for differente serveur possible with php interpreter...

the sapi for apache are:


* apache   => apache v1 implementation

* apache2filter => apache v2 implementation as filter (see filter implementation of apache module in apache dev docs)

* apache2handler => apache v2 implementation as handler (see handler implementation of apache module in apache dev docs)

* apache_hooks => experimental implémentation like mod_perl, that can be abale to hook programaticly in php all hookable hook of apache!!


all php apache implementation use hook to handler or filter to apache.

all intepreter use handler or filter hook to embed in apache...

use hook in general to make module for apache....

to know how php integration work you must anderstand how to make module in apache, and for this go to apache dev docs...to anderstand how filter and handler hook work...

http://httpd.apache.org/docs/2.0/developer/documenting.html


Regards,
Mathieu

  _____  

From: Andy Armstrong [mailto:andy@hexten.net]
To: dev@httpd.apache.org
Sent: Mon, 13 Nov 2006 18:09:56 +0100
Subject: [info@ch2o.info] Re: How the PHP works?

Toni - this isn't really the right list for your question - this list  
is concerned with the development of Apache itself.

The majority of the PHP code is not Apache specific and then there's  
an Apache loadable module that interfaces with the PHP engine.

On 13 Nov 2006, at 16:43, Toni Pizà wrote:

> Hello world!
>
> I know that the question isn't simple, but .. how works the php
> integration in Apache? Do you have implemented an php interpreter, or
> simply use an existent interpreter? Which files/functions do this
> work?
>
> As you can see, I am lost, and I don't know where to search. Excuse me
> if my question is an stupid question :P
>
> -- 
> "Two of the most famous products of Berkeley are LSD and Unix. I don't
> think that this is a coincidence."
> http://servomac.blogspot.com
>

-- 
Andy Armstrong, hexten.net

  

Re: How the PHP works?

Posted by Andy Armstrong <an...@hexten.net>.
Toni - this isn't really the right list for your question - this list  
is concerned with the development of Apache itself.

The majority of the PHP code is not Apache specific and then there's  
an Apache loadable module that interfaces with the PHP engine.

On 13 Nov 2006, at 16:43, Toni Pizà wrote:

> Hello world!
>
> I know that the question isn't simple, but .. how works the php
> integration in Apache? Do you have implemented an php interpreter, or
> simply use an existent interpreter? Which files/functions do this
> work?
>
> As you can see, I am lost, and I don't know where to search. Excuse me
> if my question is an stupid question :P
>
> -- 
> "Two of the most famous products of Berkeley are LSD and Unix. I don't
> think that this is a coincidence."
> http://servomac.blogspot.com
>

-- 
Andy Armstrong, hexten.net


Re: How the PHP works?

Posted by Guy Hulbert <gw...@eol.ca>.
On Mon, 2006-13-11 at 22:54 +0100, Joachim Zobel wrote:
> Am Montag, den 13.11.2006, 21:39 +0100 schrieb Toni Pizà:
> > I will try to read the code of mod_php in ordrer to understand how the
> > CGI relates the server web and the php interpreter!
> 
> If you want to look at a webservers source code to understand what a
> webserver does, apache is too complex. Try a simple one:
> 
> http://sites.inka.de/sites/bigred/sw/tinyhttpd.html

Though:
        Note: Please stop using TinyHTTPD. [...] when you need a
        lightweight HTTP server for actual use, try Boa. This is better
        suited even for the purpose for which TinyHTTPD was originally
        intended. For a better web server in perl, look at Plexus or
        HTTPi.

I suggested (off-list) he look at:
	http://docs.python.org/lib/module-CGIHTTPServer.html
and
	http://docs.python.org/lib/module-BaseHTTPServer.html
both of which are used quite a bit for development and since the first
of these should be able to execute php as cgi out-of-the-box ... I'm now
trying to persuade him to give up programming it in C :-).

> 
> Sincerely,
> Joachim
> 
> 

-- 
--gh



Re: [info@ch2o.info] Re: How the PHP works?

Posted by Mathieu CARBONNEAUX <in...@ch2o.info>.
and libneon also: http://www.webdav.org/neon/

Mathieu
  _____  

From: Joachim Zobel [mailto:jzobel@heute-morgen.de]
To: dev@httpd.apache.org
Sent: Mon, 13 Nov 2006 22:54:35 +0100
Subject: [info@ch2o.info] Re: How the PHP works?

Am Montag, den 13.11.2006, 21:39 +0100 schrieb Toni Pizà:
> I will try to read the code of mod_php in ordrer to understand how the
> CGI relates the server web and the php interpreter!

If you want to look at a webservers source code to understand what a
webserver does, apache is too complex. Try a simple one:

http://sites.inka.de/sites/bigred/sw/tinyhttpd.html

Sincerely,
Joachim


  

Re: How the PHP works?

Posted by Joachim Zobel <jz...@heute-morgen.de>.
Am Montag, den 13.11.2006, 21:39 +0100 schrieb Toni Pizà:
> I will try to read the code of mod_php in ordrer to understand how the
> CGI relates the server web and the php interpreter!

If you want to look at a webservers source code to understand what a
webserver does, apache is too complex. Try a simple one:

http://sites.inka.de/sites/bigred/sw/tinyhttpd.html

Sincerely,
Joachim



Re: How the PHP works?

Posted by Toni Pizà <se...@gmail.com>.
Thank you. I'm asking this because I'm writing a little web server, in
order to improve my little programing skills, and I want to add a php
interpreter to them. But, as you can see, I need a lot of basics
knowledges about the web servers structure.

I will try to read the code of mod_php in ordrer to understand how the
CGI relates the server web and the php interpreter!

-- 
"Two of the most famous products of Berkeley are LSD and Unix. I don't
think that this is a coincidence."
http://servomac.blogspot.com