Tuesday, July 10, 2007

PHP Installation on Ubuntu--Easy Way


In Linux, Apache, MySQL, PHP (LAMP) server, PHP is consider to be programming language of the server. PHP is a reflective programming language originally designed for producing dynamic web pages. PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. PHP generally runs on a web server, taking PHP code as its input and creating Web pages as output, however 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. The PHP Group also provides the complete source code for users to build, customize and extend for their own use.
Before installing PHP to the Linux operating system, there are certain system packages that have to be installed. After successfully acquiring the packages needed, the Apache web server software was installed in order to run and operate PHP safely. The latest version of PHP (PHP 5.2.3) was then downloaded and obtained from http://www.php.net/ . The software package of the PHP 5.2.3 was unzipped and extract to another folder once found on the computer. PHP had to be installing through the command line terminal of the Linux operating system.
In the command terminal a series of command had to enter to install PHP. The first command the must be enter is $ sudo apt-get install php5. This will run a series of test to make sure the computer have all the packages it need. The next command is & sudo apt-get install libapache2-mod-php5. This is an apache library that also needs to be installed for the proper running of the software. The following command should be $ sudo /etc/init.d/apache2 restart in order to restart apache. After the installation, the PHP need to be test by using the command $ . Once tested, the recommended PHP modules XSLT, GD and PEAR should be installed by use of the command $sudo apt-get install php5-xsl php5-gd php-pear. Once the modules are install issue a restart to Apache for all changes to take effect.
The image over top is a test screen for Apache web server and PHP