HTML/CGI Web Server Interface

Chapter Updated 2/1/99

The main objective of this chapter is to provide information regarding the basic concepts of utlilizing the HTML/CGI interface with Xbase.


The HTML/CGI interface is designed to work with web server technologies such as the Apache Web Server. The HTML class is a user interface included with Xbase DBMS.

Utilizing this technolgy leverages on the ability to generate code which is useable on a wide variety of client platforms. Any platform which runs a browser program can access Xbase DBMS applications running on a web server.

Before using this class, it would be helpful to have an understanding of how HTML works, which is beyond the scope of this chapter.

Internal Functioning

The HTML class is relatively simple. When the class initializes, the class constructor creates an internal two dimensional array with field names and data. The array is accessed by the GetData, GetArraryNo and GetDataForField methods.


There is one sample form testhtml.html and one sample program testhtml.cpp which demonstrate the use of the HTML class.

Run Samples

Apache Install Hints

To run cgi scripts with apache, the recommended approach is to compile programs with a .cgi extension. If the executable programs are not kept int the cgi-bin directory, then you will need to add a handler to your Apache configuration script. Addtionally, in the Directory stanzas, add ExecCGI to the Options clause.


Additional handler statement:
AddHandler cgi-script .cgi

Directory Stanza:
< Directory /usr/local/myproject >
Options ExecCGI Indexes
AllowOverride None
Order allow,deny
allow from all
< /Directory >

Send me mail -

(c)1997 StarTech