To install mod_mysql_include, do the following:

 - unpack the tarball 
 - in your Apache source tree create a subdirectory src/modules/mysql ( you can call in
  something else, but you will have to change it also in sample-configure )
 - copy mod_mysql_include.c and Makefile.tmpl to the newly created directory
 - if you plan to hack mod_mysql_include,, also copy mod_mysql_include.l to the same 
  directory
 - copy sample-configure to the root of the Apache source tree renaming to something more
 decents, such as my-site-configure
 - edit my-site-configure , make sure that it configures your Apache the way you want,
  especially make sure APACHE_DIR points to your Apache installation directory.
 - cd to the apache source root and run ./my-site-configure
 - if everything is OK, now run make
 - wait a while for Apache to compile
 - when the compilation is done, if you are brave, type make install, if not so brave,
   just backup your old apache binary and copy src/httpd over it ( shut down Apache first
    to avoid "text file busy" error
 - Add the following configuration directives to your httpd.conf

MySQLIncludeUser "your-mysql-user"
MySQLIncludePass "your-mysql-password"
MySQLIncludeHost "the-host-where-mysqld-is-running"
MySQLIncludeDB "default-mysql-database"

 - add the following to your httpd.conf (on a newer Apache) or srm.conf

  AddType text/html .myhtml
  AddHandler mysql-include-parsed .myhtml

  if you want all your HTML hits to go through mod_mysql_include 
   (makes things a slower for files that do not have mod_mysql_include directives)

  AddType text/html .html
  AddHandler mysql-include-parsed .html

 - start your Apache
 - to test if you are running the correct binary:
    
    telnet your-site 80
    Trying ...
    Connected to ...
    HEAD / HTTP/1.0

    ( Make sure to hit Return twice after the HEAD line)

    Apache will come back with something like this:

    HTTP/1.1 200 OK
    Date: Fri, 31 Dec 1999 19:21:02 GMT
    Server: Apache/1.3.9 (Unix) mod_mysql_include/1.0 PHP/3.0.12
    Connection: close
    Content-Type: text/html

   
    Look at the Server: line and see if it has mod_mysql_include in it -- if it does
    everything is cool.

    If you experience problems, e-mail me at sasha@mysql.com


