Difference between revisions of "EWEB2"

From Klaus' wiki
Jump to: navigation, search
(Created page with '==Install PHP== In order to use PHP in the web server, you have to install PHP. As root perform: <source lang="bash"> $ yum install php $ service httpd restart </source> The …')
 
(Install PHP)
Line 11: Line 11:
  
 
The last line is to restart the Apache server loading the newly installed module.
 
The last line is to restart the Apache server loading the newly installed module.
 +
 +
===Test the PHP installation===
 +
 +
In the web-server root (typical /var/www/html) create a file '''info.php''' with this content:
 +
 +
<source lang="php">
 +
<?php
 +
phpinfo();
 +
?>
 +
</source>
 +
 +
Next test that your web-server and PHP is running as expected by entering in your web-browser the IP-address of your virtual server and /info.php like:
 +
 +
<source lang="text">
 +
10.1.18.104/info.php
 +
</source>

Revision as of 12:40, 14 January 2014

Install PHP

In order to use PHP in the web server, you have to install PHP.

As root perform:

$ yum install php
$ service httpd restart

The last line is to restart the Apache server loading the newly installed module.

Test the PHP installation

In the web-server root (typical /var/www/html) create a file info.php with this content:

<?php
phpinfo();
?>

Next test that your web-server and PHP is running as expected by entering in your web-browser the IP-address of your virtual server and /info.php like:

10.1.18.104/info.php