The PHP: Hypertext Preprocessor (PHP) can be used to create dynamic web pages using server-side scripting. PHP generally runs on a web server, taking PHP code as its input and creating Web pages as output. It can also be used for command-line scripting and client-side GUI applications. PHP can be deployed on most web servers and on almost every operating system and platform free of charge. In the details provided here, PHP has been deployed on an Apache web-server running on Linux. The PHP Group also provides the complete source code for users to build, customize and extend for their own use.
For a general definition see: http://en.wikipedia.org/wiki/PHP, but more comprehensive information is available from the offical site at http://www.php.net/.
MySQL was required in order to support the ZoneMinder application so that remote management and control of a suite of WebCams from the Linux server could be carried out. For details about the installation and configuration of ZoneMinder to use this, and other Webcams, see: ZoneMinder on the Linux Web-server.
The following guidance might be useful in helping to configure PHP on an Apache Web-server running on Linux.
Essentially the default /etc/php.ini configuration file was retained as is.
The /etc/httpd/conf/httpd.conf configuration file was adjusted to ensure .php files were picked and used before .html files.
The /etc/httpd/conf.d/php.conf configuration file was adjusted to:
# # PHP is an HTML-embedded scripting language which attempts to make it # easy for developers to write dynamically generated webpages. # LoadModule php5_module modules/libphp5.so # # Cause the PHP interpreter to handle files with a .php extension. # AddHandler php5-script .php AddType text/html .php # # Add index.php to the list of files that will be served as directory # indexes. # DirectoryIndex index.php # # Uncomment the following line to allow PHP to pretty-print .phps # files as PHP source code: # #AddType application/x-httpd-php-source .phps
Web pages [filename].php are served up by the PHP processor in the web-server as HTML to the client browser. Many of the web-pages on this site are examples.
For general links to useful references when setting up PHP see: Apache resources on the Internet.
The following general links are useful references when setting up PHP: