Installing PHP on Arch Linux

Draft (work in progress) -- AWAITING PEER REVIEW

PHP is a server side scripting language that is widely use to build dynamic webpages. Druapl is written in PHP


1. To install PHP, run the following command
sudo pacman -S php php-apache

2. Add php module to the apache config file -
Open the apache config file by sudo nano /etc/httpd/conf/httpd.conf
Paste this text block within the config.
# Use for PHP 5.x:
LoadModule php5_module modules/
AddHandler php5-script php
Include conf/extra/php5_module.conf

3. Check whether php is installed correctly. To do this,
Create a blank file by sudo nano /srv/http/info.php
Add this line to the file - <?php phpinfo(); ?> and then save an exit.
Restart the webserver by sudo systemctl restart httpd
Go the the http://localhost/info.php and the page should look like

4. Install some of the php modules required to run drupal
sudo pacman -S php5-gd php5-curl php5-mcrypt

5. Restart apache
sudo systemctl restart httpd