How to enable php on Apache2 in Xubuntu 16.04

15,484

The package you need is libapache2-mod-php7.0 (or more importantly, use libapache2-mod-php, as this will link to the latest PHP version automatically from the repos)

This will install the PHP module and dependencies for it into Apache and your system. Make sure you have the latest repository data too (sudo apt-get update in the terminal) and any relevant security updates.

Share:
15,484

Related videos on Youtube

jcubic
Author by

jcubic

My name is Jakub T. Jankiewicz, I'm coding mostly in JavaScript. I love Lisp Macros, jQuery library, ReactJS, CSS3, HTML5, SVG, GNU/Linux, GNU Emacs and Inkscape. Working with JavaScript and R for Roche/Genentech via Astek Poland. my english blog - In Code We Trust my polish blog - Głównie JavaScript (ang. Mostly JavaScript) Usefull Links Other links Yet another links Few of my JavaScript Open Source projects: jQuery Terminal: JavaScript library for Web based Terminal Emulator LIPS - Powerful Scheme based lisp interpreter written in JavaScript sysend.js: Library for sending messages between Windows and Tabs Gaiman Programming Language and Text based Game engine GIT Web Terminal Posts: EchoJS News, EchoJS News (2), HackerNews

Updated on September 18, 2022

Comments

  • jcubic
    jcubic over 1 year

    I've just updated the OS to version 16.04 and now php scripts don't get executed, I've just got the source code back. How can I enable php on 16.04?

    I've try to call this command:

    sudo a2enmod php7.0
    

    but got error:

    ERROR: Module php7.0 does not exist!
    

    And I can't find php7 in synaptics, I can run php from command line and it's version PHP 7.0.4-7ubuntu2

    • Admin
      Admin about 8 years
      Hi, do you have the package libapache2-mod-php7.0 installed in Synaptic (or other package manager)?
    • jcubic
      jcubic about 8 years
      No I didn't, I've just found that module.