About MartNet MartNet Technical Support
Home Services Support Members Software Contact
Search Support
MartNet WebMail

MartNet WebAdmin

Dialup Access

Domain Name

MartNet News /
  Status Info

NOC / System Status

Support Topics:
 MartNet WebAdmin
 Virtual Hosting
 Web Site Construction
 Unix / Linux
 Internet Chat
 Game Server Services
 Misc. Stuff
 Policies / Legal

MartNet Ad

 MartNet WebAdmin
 Virtual Hosting
 Game Server Services
 Misc. FAQ's

 Privacy and Security
 Web Development
 Unix / Linux
 Game Server Services
 Misc. Support Links

MartNet Policies
Billing Dept.

Check Domain

PHP read me file.
PHP began life as a simple little cgi wrapper written in Perl. I wrote it in an afternoon during a period between contracts when I needed a quick tool to get an idea of who was reading my online resume. It was never intended to go beyond my own private use. The web server where I had my resume was extremely overloaded and had
constant problems forking processes. I rewrote the Perl wrapper in C to get rid of the considerable overhead of having to fork Perl each time my resume was accessed.

Eventually other people on the same web server came across my wrapper and asked if they could use it. Then, as inevitably happens, they started asking for more features. I added more features and finally put together a semi-complete distribution along with documentation, a mailing-list and a FAQ. The name of this first package was Personal Home Page Tools, which later became Personal Home Page Construction Kit.

At the same time I started playing with databases and wrote a tool to easily embed SQL queries into web pages. It was basically another CGI wrapper that parsed SQL queries and made it easy to create forms and tables based on these queries. This tool was named FI (Form Interpreter).

PHP/FI version 2.0 is a complete rewrite of these two packages combined into a single program. It has now evolved to the point where it is a simple programming language embedded inside HTML files. The original acronym, PHP, has stuck. It isn't really appropriate any longer. PHP/FI is used more for entire web sites today than for small Personal Home Page setups. By whatever name, it eliminates the need for numerous small Perl cgi programs by allowing you to place simple scripts directly in your
HTML files. This speeds up the overall performance of your web pages since the overhead of forking Perl several times has been eliminated. It also makes it easier to manage large web sites by placing all components of a web page in a single html file. By including support for various databases, it also makes it trivial to develop database enabled web pages. Many people find the embedded nature much easier to deal with than trying to create separate HTML and CGI files.

Throughout this documentation any references to PHP, FI or PHP/FI all refer to the same thing. The difference between PHP and FI is only a conceptual one. Both are built from the same source distribution. When I build the package without any access logging or access restriction support, I call my binary FI. When I build with these options, I call it PHP.


So, what can I do with PHP/FI?

The first thing you will notice if you run a page through PHP/FI is that it adds a footer with information about the number of times your page has been accessed (if you have compiled access logging into the binary). This is just a very small part of what PHP/FI can do for you. It serves another very important role as a form interpreter cgi, hence the FI part of the name. For example, if you create a form on one of your web pages, you need something to process the information on that form. Even if you just want to pass the information to another web page, you will have to have a cgi program do this for you. PHP/FI makes it extremely easy to take form data and do things with it.

A simple example

Suppose you have a form:

Your display.html file could then contain something like:


It's that simple! PHP/FI automatically creates a variable for each form input field in your form. You can then use these variables in the ACTION URL file.

The next step once you have figured out how to use variables is to start playing with some logical flow tags in your pages. For example, if you wanted to display different messages based on something the user inputs, you would use if/else logic. In our above example, we can display different things based on the age the user entered by changing our display.html to:

echo "Hi $name, you are ancient!

echo "Hi $name, you are very old!

echo "Hi $name.";

PHP/FI provides a very powerful scripting language which will do much more than what the above simple example demonstrates. See the section on the PHP/FI Script Language for more information.

You can also use PHP/FI to configure who is allowed to access your pages. This is done using a built-in configuration screen. With this you could for example specify that only people from certain domains would be allowed to see your pages, or you could create a rule which would password protect certain pages. See the Access Control section for more details.

PHP/FI is also capable of receiving file uploads from any RFC-1867 compliant web browser. This feature lets people upload both text and binary files. With PHP/FI's access control and logical functions, you have full control over who is allowed to upload and what is to be done with the file once it has been uploaded. See the File Upload section for more details.

PHP/FI has support for a database package called mSQL. This allows you to put information into a database and access this information through simple embedded SQL queries right in your .HTML files. Adding a database back-end to a web page has never been easier. See the section on mSQL Support for more information.

PHP/FI has support for the Postgres95 database package. It supports embedded SQL queries in your .HTML files. See the section on Postgres95 Support for more information.

PHP/FI also has support for the mysql database package. It supports embedded SQL queries in your .HTML files. See the section on mysql Support for more information.

PHP/FI is a server-side html-embedded scripting language. It lets you write simple scripts right in your .HTML files much like JavaScript does, except, unlike JavaScript PHP/FI is not browser-dependant. JavaScript is a client-side html-embedded language while PHP/FI is a server-side language. It was developed by Rasmus Lerdorf.

PHP began life as a simple CGI wrapper to allow authors to embed commands in their pages to do useful things and was called
"Personal Home Page Tools" hence the "PHP" part of the acronym.

The author then added Form processing utilities to the package along with the ability to embed SQL database queries. This added the "FI" or "Form Interpreter" part of the acronym.

PHP/FI eliminates the need for numerous small CGI programs on the server and speeds up the overall performance of your web pages.

There are many useful things you can do with PHP. It is a scripting language so you take information from forms, have access to the field values within a HTML page and thus do much more interactive pages. You can test for the browser software being used and serve up different pages depending on the browser version. You can display different content, depending on the location of the person browsing.

One of the most useful features of PHP/FI is the ability to quickly develop pages which allow the contents of databases to be
searched/displayed and to use Web forms to add and edit data in these databases.

See the PHP/FI Home Page for more information. There is a local copy of the PHP/FI (Ver 2.0) documentation pages for performance

This Web Site is proudly built upon an Open Source foundation:
Assembled with PHP Powered by Debian Linux Fueled by MySQL
Served by Apache

Home | Services | Support | Members | Software | Contact

MartNet - PO Box 42472 Philadelphia, PA 19101
Copyright 1996 - 2015 MartNet Communications LLC. All Rights Reserved.