Configuring php7 on Arch Linux


After the last update upgrade in arch linux, php7 was installed along with other updated packages, now you need to reconfigure it to work smoothly and here is what you need to do:


  1. backup "/etc/httpd/conf/httpd.conf" and "/etc/php/php.ini"
  2. move or Remove the above files
  3. reinstall these packages again to bring new config files, just run this command:
    • sudo pacman -S apache php php-apache
  4. Edit the http Config File as follow:
  5. Open the file: 
    • sudo nano /etc/httpd/conf/httpd.conf
  6. comment this line:
    • LoadModule mpm_event_module modules/mod_mpm_event.so
  7. uncomment this line:
    • LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
  8. add this line @ the end of the LoadModule Code Block:
    • LoadModule php7_module modules/libphp7.so
  9. add this line @ the end of the Include Block
    • Include conf/extra/php7_module.conf
  10. save and close the file
  11. restart the http service
    • sudo systemctl restart httpd.service
  12. Check the Status
    • sudo systemctl status httpd.service

Finally, make sure to revisit the old configuration to do any needed applying of old configuration

Comments

Popular Posts