How to Install PHP5 on Ubuntu 11.10. Web programming languages most in demand is PHP. Currently php has reached version 5. For those of you who like the PHP-based web programming, would first have to install php on local server. Before doing Installing PHP 5, of course, you've read How to Install Apache2 on Ubuntu 11.10 and How to Install MySQL Server on Ubuntu 11.10.
Install PHP5 on Ubuntu 11.10 requires two steps:
A. Installing PHP5
To install php 5 please type the following command in the terminal:
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo apt-get install php5-mysql
or can be written:
sudo apt-get install php5 libapache2-mod-php5 php5-mysql
Before testing php5 in Ubuntu 11.10, make a phpinfo file first, by the way:
1. Go to the directory /var/www.
2. Create a info.php file by typing:
sudo vi info.php
3. Type the following script into the file info.php:
<? php
phpinfo ();
?>
4. Save the file by typing: wq then enter.
5. Php restart service with the command:
sudo / etc/init.d/apache2 restart
6. Open a web browser and type the url http://localhost/info.php. The result will look like the image below:
Install PHP5 on Ubuntu 11.10 requires two steps:
A. Installing PHP5
To install php 5 please type the following command in the terminal:
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo apt-get install php5-mysql
or can be written:
sudo apt-get install php5 libapache2-mod-php5 php5-mysql
B. Testing PHP5
1. Go to the directory /var/www.
2. Create a info.php file by typing:
sudo vi info.php
3. Type the following script into the file info.php:
<? php
phpinfo ();
?>
4. Save the file by typing: wq then enter.
5. Php restart service with the command:
sudo / etc/init.d/apache2 restart
6. Open a web browser and type the url http://localhost/info.php. The result will look like the image below:
0 comments:
Post a Comment