PHP works on almost all Unix platforms and with Microsoft Windows 32-bit environments. In Unix environments, PHP can be used to develop three different types of software:
PHP can be used as an alternative to Perl, Tcl, shell scripts, and other scripting languages.
With the PHP-GTK extension, PHP can be used to develop window-based applications.
PHP can be used to process scripts that are requested with a web browser
PHP was designed for the third alternative. To use it in this environment, a web server is required. We focus on integrating MySQL with the web environment in this chapter.
PHP can be used for web scripting by integrating it as a module of a supported web server such as Apache, Microsoft Internet Information Server (IIS), or iPlanet. For web servers that do not support module integration—those that do not support SAPI or ISAPI direct module interfacing—the PHP executable can be used as a CGI processor. The Common Gateway Interface (CGI) allows a web server to run any executable, but this is a much slower method of running the PHP engine than integrating it as a server module. In either case, to use PHP to access the MySQL DBMS, it must be compiled with MySQL support.