update ubuntu 14.04 to 16.04 and php does not work

June 16, 2019 1.2k views
PHP Ubuntu 16.04

update ubuntu 14.04 to 16.04 and php does not work, the wordpress sites is ok, but phpinfo and others sites not works.

Phpinfo shows the containts of the file and do not execute.

In mod-enabled only shows php 7.0

any ideas? thanks a lot!

  • Are you using short tags <? or long tags <?php to run PHP within the webpages (phpinfo etc)?

  • I tried both ways. I do not understand why wordpress works and the rest is not

  • @juan it is very odd that wordpress is working fine. Are there any noticeable differences in the apache config for your wordpress site and other sites that aren’t working?

  • it’s in the same place that it works I added the phpinfo …

3 Answers

Hi @juan,

I suggest taking a look at our tutorial on installing the LAMP stack, specifically the section on installing PHP correctly, to ensure that PHP is installed and running on your system: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04#step-3-install-php

Let us know how it goes and please do say if you need further help with this!

- Matt.

by Brennen Bearnes
A "LAMP" stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the Apache web server. The site data is...

I just made these steps, but it still does not work

I still have the same problem, if anyone knows that I can prove it is appreciated!

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!