php-src/sapi/tux
Rasmus Lerdorf 3c0411c496 Fix for bug #32263
This adds proto_num to request_info.  It is defaulted to HTTP 1.0 (1000)
such that it has a valid value even if the underlying sapi doesn't set it
correctly.  It is then used to determine if a 302 or a 303 should be sent
on a Location redirect.  Any non GET/HEAD HTTP 1.1 redirect will get a 303
instead of a 302 to be compatible with the HTTP spec.
2005-03-14 19:25:39 +00:00
..
config.m4 - Renamed all *php4* files to *php5*, changed all php4/PHP4 to php5/PHP5 2004-01-17 13:00:38 +00:00
CREDITS
php_tux.c Fix for bug #32263 2005-03-14 19:25:39 +00:00
php.sym
README - Renamed all *php4* files to *php5*, changed all php4/PHP4 to php5/PHP5 2004-01-17 13:00:38 +00:00

README FOR THE TUX MODULE (by Sascha Schumann)        
($Date$)

    This is a SAPI module for the TUX web-server by Ingo Molnar.

    The special thing about TUX is that it is integrated into the Linux
    kernel and thus provides high-speed serving of static files.

    The web-server provides a user-space API which allows arbitrary 
    plug-ins to be made available. 

    All requests to the PHP userspace module are currently serialized.

    This module is of alpha quality.  Due to incomplete APIs, HTTP
    authentication and handling of POST requests has not been
    implemented yet.
 
    SECURITY NOTE: PHP will happily run everything under the
    web-root through the parser; so be careful what you put
    there.

    Note that requests are served in a chroot'ed environment.
    The initialization of PHP does not take place in the chroot'ed
    environment, so that e.g. /usr/local/lib/php.ini is treated
    as usual.

REQUIRED DOWNLOADS

    1. TUX

       http://people.redhat.com/~mingo/TUX-patches/QuickStart-TUX.txt
       
    2. PHP 4.0.x
       
       Download:
       http://www.php.net/
       
       Snapshots from CVS:
       http://snaps.php.net/


BUILD INSTRUCTIONS

    1. Install TUX as outlined in the QuickStart text.
       Create /tux-modules where modules will reside.
    
    2. Prepare PHP

       $ cd php-*
       $ ./configure \
            --with-tux=/tux-modules \
    		<further PHP options>
       # make install
    
       You can see the list of valid PHP options by executing

       $ ./configure --help

    3. Touch a file in your web-root 'php5.tux'.  This will
       cause requests to '/php5.tux' to be redirected to the
       userspace module php5.tux.

    4. Start TUX with something like

       # tux -d -t 8 -r /www -m /tux-modules php5.tux
      
       (daemon mode, eight threads, web-root /www, modules in
        /tux-modules, load php5.tux)

       BEFORE running this command, the kernel side of TUX has to
       be properly setup.
       
    5. Try to access

           http://yourserver/php5.tux?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000

       It should display the PHP credits page.

       To access a script /foo/bar.php, use

           http://yourserver/php5.tux?/foo/bar.php

       Parameters can be appended:
       
           http://yourserver/php5.tux?/foo/bar.php&var=value