netConsole: PHP3 and PHP4 Hypertext Preprocessors
PHP is a server-side HTML embedded scripting language similar to Microsoft Active Server Pages (ASP), and Netscape/SUN Microsystems Java Server Pages (JSP).
The goal of this document is not to teach PHP as a programming language. This document is meant to instruct you how to install and configure the PHP module available through your netConsole.
If you are new to PHP and would like to learn how to build PHP-driven dynamic websites, you may start with the introductory tutorial on the PHP website.
Using PHPWhen installing PHP via the netConsole, the files php and php.ini are copied to the cgi-bin directory. Also, the .htaccess file in /webshare is modified such that files with .php, .php3, or .php4 as extensions are processed by the php CGI.
Please note that on our systems PHP is actually run as a CGI and not as an Apache module. We realize that some PHP scripts may require PHP to run as an Apache module; however, running PHP as a CGI on your hosting account should not cause any problems for scripts with such a requirement. We have made special modifications to the php CGI so it mimics the behavior of PHP as an Apache module.
php.ini - The PHP Configuration File
Once you've installed PHP through your netConsole there will be a php.ini in your cgi-bin. This configuration file contains some options you can set to affect how PHP behaves. By default, the configuration looks like this:
This alters the behavior of PHP so that it acts more like PHP3 and PHP4 prior to version 4.2.0 - it is a security risk and makes writing safe PHP scripts more difficult. Nevertheless, many PHP scripts available require this setting.
This is discussed in more detail on the Using Register Globals page from PHP.net
These allow you to use the shortened <? PHP start/end tags. They are NOT xml-compliant, so PHP ships with them disabled by default.
By default, magic_quotes_gpc is set to 1. This causes variables loaded from the query string, cookies and and POST-submitted form to be quoted automatically. Setting this value to 0 disables this and may be necessary for some scripts. It can be a security risk to change this setting.
Things to Remember
If PHP stops functioning due to editing your .htaccess file, remove all PHP-related lines from it and reinstall PHP from your netConsole.Because this package modifies the .htaccess file in your webshare directory, modifying the PHP-related lines in this file may "break" PHP on your account.
If you have problems with the PHP processor, try reinstalling it -- none of your scripts will be removed while you do this.
- Free On-line Dictionary of Computing's definition of PHP
- Free On-line Dictionary of Computing's definition of recursive acronym
- PHP Scripts and Programs from HotScripts.com
- Introductory Tutorial from PHP.net
- Annotated PHP Manual from PHP.net
- Filesystem Security from PHP.net
- Links to PHP-related websites from PHP.net
- The PHP Resource Index - scripts, docs, PHP community etc.
- Zend.com "Where PHP meets eBusiness"