Install PHP


On Windows

  1. If you do not have PHP already installed on your computer, download the latest version of PHP for Windows.
  2. PHP has very detailed and at the same time easy-to-grasp documentation.
  3. Once PHP is installed, make sure you have restarted your Apache Web server.

On Linux

  1. Install PHP by typing the following command in the terminal.
    sudo apt-get install php5
    The default PHP 5.3.2-lubuntu4.2 will be installed from the Ubuntu Repository. When you install PHP, it will automatically set up, (or enable), libapache2-mod-php5 module necessary to marry Apache and PHP, and restart the Apache Web server for you. So you do not have to worry about other modules or libraries.
  2. If needed, you can also refer to the following link which provides a thorough explanation of PHP Installation on Linux with Apache.
    PHP Installation Guide for Linux users

Test PHP

  1. Create a test.php or phpinfo.php file with the following contents.
    <?php phpinfo(); ?>
  2. The following screen should appear if the installation was successful.
    Php-installation.png 

Please login to leave your comment.

Page info
viewed 81 times
translations en
Author
posted last month by
CUBRID
Contributors
updated last month by
View revisions
Actions on this page
Edit Recreate cache
tagged
Share this article