1WHAT IS THIS? 2 3 This module exploits the layered I/O support in Apache 2.0. 4 5HOW DOES IT WORK? 6 7 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). 12 13DOES IT WORK? 14 15 It is experimental as interfaces in Apache 2.0 might change in the 16 future. 17 18HOW TO INSTALL 19 20 This SAPI module is known to work with Apache 2.0.40. 21 22 $ cd apache-2.x 23 $ cd src 24 $ ./configure --enable-so 25 $ make install 26 27 For testing purposes, you might want to use --with-mpm=prefork. 28 (Albeit PHP also works with threaded MPMs.) 29 30 Configure PHP 4: 31 32 $ cd php-4.x 33 $ ./configure --with-apxs2=/path/to/apache-2.0/bin/apxs 34 $ make install 35 36 At the end of conf/httpd.conf, add: 37 38 AddType application/x-httpd-php .php 39 40 If you would like to enable source code highlighting functionality add: 41 42 AddType application/x-httpd-php-source .phps 43 44 That's it. Now start bin/httpd. 45 46HOW TO CONFIGURE 47 48 The Apache 2.0 PHP module supports a new configuration directive that 49 allows an admin to override the php.ini search path. For example, 50 place your php.ini file in Apache's ServerRoot/conf directory and 51 add this to your httpd.conf file: 52 53 PHPINIDir "conf" 54 55DEBUGGING APACHE AND PHP 56 57 To debug Apache, we recommened: 58 59 1. Use the Prefork MPM (Apache 1.3-like process model) by 60 configuring Apache with '--with-mpm=prefork'. 61 2. Start httpd using -DONE_PROCESS (e.g. (gdb) r -DONE_PROCESS). 62 63 If you want to debug a part of the PHP startup procedure, set a 64 breakpoint on 'load_module'. Step through it until apr_dso_load() is 65 done. Then you can set a breakpoint on any PHP-related symbol. 66 67TODO 68 69 PHP functions like apache_sub_req (see php_functions.c) 70 Protocol handlers 71 Passing script data to engine without temporary file 72