PHP/FI                                                                   README
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Legal Stuff
-----------

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

  See the file, COPYING, for the complete terms of the GPL.


Before You Begin
----------------

If you have absolutely no Unix experience, you may want to ask around
for someone with a little bit of Unix knowledge to help you through 
this installation.  Every attempt has been made to make it as simple
as possible, but since the software is quite involved and relies on a
number of different components, it is not realistic to assume it will
go smoothly on all systems.  You will probably need someone around who
knows the particulars of the destination system well.


Things You Need To Know Before Installing
-----------------------------------------

- Can you run both get and post method cgi programs on your server?

  If not, you can not use this package.  On many public ISP's CGI
  programs are either disallowed or severely restricted.  If this is
  the case on your system, talk to your system administrator and ask
  him/her to have a look at this package and see if they will install
  it for you.

- If you have mSQL installed on your system, you need to know the
  base directory of this installation.

- You need an ANSI-C compatible C compiler (gcc is fine).

- If you are going to be using this with mSQL, you need to install
  mSQL before you install PHP/FI.

- If you are going to be using gdbm, install gdbm before installing
  PHP.

- If you are going to be using GD, install GD before installing PHP/FI.


FI Notes
---------

FI is a subset of the PHP distribution.  Throughout the documentation
PHP and FI will be used interchangeably or together.  They refer to
the same thing.  On my system here the difference between FI and PHP
is that the FI binary is compiled without the access logging and
access restriction code thus producing a faster parser for doing simple
database-enabled web pages.


Installation Instructions
-------------------------

If you do not have gcc installed on your system, make sure you turn 
on any compiler switches you need to make your compiler as ANSI 
compliant as possible.  The package is known to compile without
problems on the following systems.  If you manage to compile the
package on a system not listed here, please send me some e-mail
at: rasmus@io.org with the name of your OS and the version number
and any other details I should know.

Solaris 2.4
SunOS 1.4.2
Linux 1.3.32
BSDi 2.0
OSF1
FreeBSD
Irix

Step 1.

  Run the install program: ./install

  You will be asked a number of questions.  If you do not understand
  what is being asked, simply hit return.  The default choice should
  be safe on most systems.

Step 2.

  Go into the src directory: cd src

Step 3.

  type: make

  This will create the actual executable program file named php.cgi
  by default.  Copy this file to your cgi-bin directory or any
  directory from which the http daemon can execute cgi programs.

Step 4.
  
  Copy the php.cgi binary to your system's cgi-bin directory.  If you
  do not have access to do this and wish to install it in your own
  personal directory, you may do so, but you should set the setuid
  bit on the executable with: chmod u+s /path/php.cgi
  Setting the setuid bit is not crucial.  The benefit is that any files
  created by php will be owned by you.  This means that you can edit
  and delete such files directly.  Without the setuid bit set these
  files will be owned by the httpd user id.
 
Step 5.

  Copy the doc/doc.html file to somewhere in your web document tree
  and read it using your favourite browser.  This file is the overall
  documentation for the package.


Testing the software
--------------------

  Once installed you can test to see if your executable works by 
  entering a URL similar to the following in your browser:

  http://your.site.domain/cgi-bin/php.cgi

  This should show you a page which contains the version number along
  with various other useful information. 


Using the software
------------------

  To actually use the software on an existing HTML file, you can 
  simply append the path to your file to the above URL.  ie.

  http://your.site.domain/cgi-bin/php.cgi/path/file.html

  There are ways to automatically run your files through PHP.  These
  methods are discussed in detail in the documentation.

  Have a look in the examples directory for some examples of web pages
  developed using PHP.

  Documentation, such that it is, can be found in the doc directory.


Troubleshooting
---------------

  There is a PHP mailing-list available for general discussion about
  the PHP tools.  If you are having difficulties, this is probably
  the best place to ask.  To sign up, send a message to:

  majordomo@holli.com

  and in the body of your message put:

  subscribe php-list <your email address (without the brackets)>

  A FAQ will be available as well.  Check http://www.io.org/~rasmus
  from time to time to see what new things/versions are available.

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
