README

1WHAT IS THIS?
23 This module exploits the layered I/O support in Apache 2.0.
45HOW DOES IT WORK?
67 In Apache 2.0, you have handlers which generate content (like
8 reading a script from disk). The content goes then through
9 a chain of filters. PHP can be such a filter, so that it processes
10 your script and hands the output to the next filter (which will
11 usually cause a write to the network).
1213DOES IT WORK?
1415 Currently the issues with the module are:
16 * Thread safety of external PHP modules
17 * The lack of re-entrancy of PHP. due to this I have disabled the 'virtual'
18 function, and tried to stop any method where a php script can run another php
19 script while it is being run.
202122HOW TO INSTALL
2324 This SAPI module is known to work with Apache 2.0.44.
2526 $ cd apache-2.x27 $ cd src
28 $ ./configure --enable-so
29 $ make install
3031 For testing purposes, you might want to use --with-mpm=prefork.
32 (Albeit PHP also works with threaded MPMs. See Thread Safety note above)
3334 Configure PHP 4:
3536 $ cd php-4.x37 $ ./configure --with-apxs2=/path/to/apache-2.0/bin/apxs38 $ make install
3940 At the end of conf/httpd.conf, add:
4142 AddType application/x-httpd-php .php
4344 If you would like to enable source code highlighting functionality add:
4546 AddType application/x-httpd-php-source .phps
4748 That's it. Now start bin/httpd.
4950HOW TO CONFIGURE
5152 The Apache 2.0 PHP module supports a new configuration directive that
53 allows an admin to override the php.ini search path. For example,
54 place your php.ini file in Apache's ServerRoot/conf directory and
55 add this to your httpd.conf file:
5657 PHPINIDir "conf"
5859DEBUGGING APACHE AND PHP
6061 To debug Apache, we recommend:
6263 1. Use the Prefork MPM (Apache 1.3-like process model) by
64 configuring Apache with '--with-mpm=prefork'.
65 2. Start httpd using -DONE_PROCESS (e.g. (gdb) r -DONE_PROCESS).
6667 If you want to debug a part of the PHP startup procedure, set a
68 breakpoint on 'load_module'. Step through it until apr_dso_load() is
69 done. Then you can set a breakpoint on any PHP-related symbol.
7071TODO
7273 PHP functions like apache_sub_req (see php_functions.c)
74 Source Code Highlighting
75 Protocol handlers
7677