3

I installed phppgadmin using this tutorial. How to Install PostgreSQL and phpPgAdmin on Ubuntu 18.04

The index.html file is showing fine that comes already installed.

But when I made a php file to display phpinfo();, it shows blank page.

This is the output of root@pan0xxx:/# tail -f /var/log/apache2/error.log

root@pan0138:/# tail -f /var/log/apache2/error.log
[Mon Oct 08 00:08:14.178971 2018] [mpm_event:notice] [pid 31651:tid 140420410256320] AH00489: Apache/2.4.29 (Ubuntu) con    figured -- resuming normal operations
[Mon Oct 08 00:08:14.178994 2018] [core:notice] [pid 31651:tid 140420410256320] AH00094: Command line: '/usr/sbin/apache    2'

EDIT

Output of /# tail -f /var/log/apache2/error.log after installing php separately.

root@panxxx:/# tail -f /var/log/apache2/error.log
[Tue Oct 09 00:06:22.406750 2018] [mpm_event:notice] [pid 31651:tid 140420410256320] AH00489: Apache/2.4.29 (Ubuntu) configu     red -- resuming normal operations
[Tue Oct 09 00:06:22.406777 2018] [core:notice] [pid 31651:tid 140420410256320] AH00094: Command line: '/usr/sbin/apache2'
[Tue Oct 09 12:05:47.122881 2018] [mpm_event:notice] [pid 31651:tid 140420410256320] AH00491: caught SIGTERM, shutting down
[Tue Oct 09 12:05:47.188994 2018] [mpm_event:notice] [pid 4685:tid 140256460741568] AH00489: Apache/2.4.29 (Ubuntu) configur     ed -- resuming normal operations
[Tue Oct 09 12:05:47.189114 2018] [core:notice] [pid 4685:tid 140256460741568] AH00094: Command line: '/usr/sbin/apache2'
XCeptable
  • 153
  • 3
  • 10

3 Answers3

2

What I did is something like this:

sudo a2enmod php7.2

If you get an error message showing conflicts, such as in my case I had: mpm_event error, you do this:

sudo a2dismod mpm_event  

you'll get messages like "apache2 crashed!" or something. Don't worry. Do the same a2dismod for all errors. Once done, execute:

systemctl restart apache2
sudo a2enmod php7.2
systemctl restart apache2 

And that should do the trick! Good luck!

grooveplex
  • 2,486
  • 3
  • 25
  • 35
0

For me, under Ubuntu 20.04, it was

sudo apt install libapache2-mod-php
sudo service apache2 restart

That fixed the phpinfo() being empty.

lolesque
  • 471
  • 4
  • 12
-1

Hello U might be not installed php You judt install apache2 server. In this case apache2 supports html pages but for php you need to install php For this you may run below command... $sudo apt-get update $sudo apt-get install php7.0*

Mayur Bhandare
  • 4,665
  • 1
  • 9
  • 9
  • From the tutorial I followed, link above, I used this command: sudo apt -y install postgresql postgresql-contrib phppgadmin Do you think it will not have installed php ? – XCeptable Oct 08 '18 at 14:50
  • 1
    No it will only install following additional packages will be installed: postgresql-9.5 postgresql-client-9.5 postgresql-client-common postgresql-common postgresql-contrib-9.5 sysstat – Mayur Bhandare Oct 09 '18 at 05:03
  • you need to install php seperatly – Mayur Bhandare Oct 09 '18 at 05:04
  • I installed and restart the apache but it still shows blank page. The output of # tail -f /var/log/apache2/error.log now I added to OP. – XCeptable Oct 09 '18 at 09:09