Installation problems between php and website django apache ssl

I just purchased a vps and set it up with Ubuntu 16.04, install apache, Virtualenv Django and PostgreSQL. After that, I built a website creating the apache configuration in sites-available and everything worked very well. In addition, I have installed letsencrypt and I have created the SSL certificate for my site, the domain is everything worked fine with the certificate, until I decided to install Php using the following commands:

sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository -y ppa: ondrej/php
sudo apt-get update

sudo apt-get install php7.2 php7.2-cli php7.2-common

After installing Php I created the configuration to present a simple phpinfo() and all the domain of the Php site is

But unfortunately the site no longer works and presents me with this message

This page does not work has not sent any data.

After that I uninstalled the Php and the page works again, I would think there is a problem with Php 7.2 and the version of apache 2.4.18.

I decided to buy a new vps since I have one where I have Ubuntu 18.04 in which I had the two websites that are in Django and Php, but after doing an update of Ubuntu the Django site stopped working: sudo apt-get update && sudo apt-get upgrade.

Then I would just think that Php has some conflict with Apache. Please, if someone has an idea or has already seen that problem and knows how to solve it, I ask you to please help me.

Thanks for the help.

4 Replies

sudo add-apt-repository -y ppa: ondrej/php

You used a ppa for PHP?

Thank you very much for answering, that's exactly one of the commands I've used.

sudo apt-get install software-properties-common python-software-properties

sudo add-apt-repository -y ppa:ondrej/php

sudo apt-get update

sudo apt-get install php7.2 php7.2-cli php7.2-common

You might want to use PHP in Ubuntu’s repository instead of that PPA repository.

I already uninstalled it ppa: ondrej / php but the problem persists, when I try to install or uninstall I get the following message:

add-apt-repository --remove ppa:ondrej/php

Co-installable PHP versions: PHP 5.6, PHP 7.x and most requested extensions are included. Only Supported Versions of PHP ( for Supported Ubuntu Releases ( are provided. Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided.

Debian oldstable and stable packages are provided as well:

You can get more information about the packages at

BUGS&FEATURES: This PPA now has a issue tracker:


  1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman
  2. If you are using apache2, you are advised to add ppa:ondrej/apache2
  3. If you are using nginx, you are advise to add ppa:ondrej/nginx-mainline
    or ppa:ondrej/nginx

PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly:

WARNING: add-apt-repository is broken with non-UTF-8 locales, see for workaround:

LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php More info:


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct