PHP: Hypertext Preprocessor is an extensively used, universal scripting language that was created for web development, in order to produce creative web pages. A PHP code is set into the HTML source document and read by a web server with a PHP processor module, which creates the web page document. It can be utilized to function as a graphical application. PHP is available as a processor for most contemporary web servers and as a separate interpreter on most operating systems and computing platforms.
Installation of PHP engine
To take advantage of the facilities of PHP, one has to install the PHP engine on the computer.
Following are the steps to be followed for installing PHP engine:
- The primary step is that your computer should have a Windows operating system installed.
- Now to use PHP conveniently for your activities, you have to download the software on your desktop. A website namely www.php.net should be visited to download the PHP Windows Binaries. Once located, you have to upload PHP 5.2.9 installer along with the zip package having a similar name.
- After the download is complete, a PHP icon will automatically appear on your desktop. To use it, you have to install PHP in your system following a standard procedure used to install any software. Brief details of this procedure is given as follows:
– Click the PHP icon twice. Now press “Next” on the window.
– Agree to the terms mentioned in the window.
– Now, after clicking “Advanced” and “Next” the PHP will be saved in the server directory.
– If you wish to store it anywhere else, then click “Browse”.
– Now select the folder where you plan to store PHP.
– Once a folder is selected press “Next” on the following four windows.
- An email address can also be stored in the PHP mail system.
- Click “Next” where you are questioned of displaying all error warnings and notices.
- Select “Apache” from the list of the web server software, visible on the screen.
- Now click on the small empty box besides “php” followed by “Next”.
- At this stage if all the instructions are followed well, a window stating- “Windows is ready to install” will appear. The installation will start after clicking “Next” (any messages asking for retaining of php.ini. file, should be rejected by clicking “No”)
- After successful installation of PHP, some editing in the Apache settings is required.
- Open “httpd.conf” file in “My Computer” section.
- Type Alias /php “c:/server/php/” followed by application/x-httpd-php .php and application/x-httpd-php “/php/php-cgi.exe” at the bottom of the page.
All the text from this page should be copied to httpd.conf, leaving one blank line at the end of the page.
- If PHP is in the directory “C:\Server\php”, it makes editing easier. For this to happen, “C:\Windows” in “MY Computer” is to be opened. After this, Php.ini has to be cut from windows directory and pasted in “C:\Server\php”.
- At the time of installing PHP, there was another file php-5.2.9-win32.zip saved on the desktop. This file has to be opened. One line stating extension_dir = “./” has to be edited to extension_dir = “C:\Server\php\ext”.
- Open the file “libmysql.dll” in the directory and paste a copy of it in “C drive, Windows in System32″.
Restart the Apache server.
- Open notepad to paste <?php phpinfo(); ?> in a new document and save it as “phpinfo.php”.
- The installation of PHP is complete; to verify this, type http://localhost/phpinfo.php in browser. Opening of this file will indicate successful installation of PHP.