Php not loading: white page

I have a fresh ubuntu 16.04 64 bit vps. I installed virtualmin and I did not install an alternative repo.(so far as I know.) When I visit a php page I just get a white page. I don’t know how to fix this.

My /etc/apache2/mods-enabled/php7.0.conf looks like this. I restarted apache several times that doesn’t seem to help.

<FilesMatch “.+.ph(p[3457]?|t|tml)$”>
#SetHandler application/x-httpd-php

<FilesMatch “.+.phps$”>
#SetHandler application/x-httpd-php-source
# Deny access to raw php sources by default
# To re-enable it’s recommended to enable access to the files
# only in specific virtual host or directory
Require all denied

Deny access to files without filename (e.g. ‘.php’)

<FilesMatch “^.ph(p[3457]?|t|tml|ps)$”>
Require all denied

Running PHP scripts in user directories is disabled by default

To re-enable PHP in user directories comment the following lines

(from <IfModule …> to .) Do NOT set it to On as it

prevents .htaccess files from disabling it.

php_admin_flag engine Off

My apache error log looks like this:

[Thu Aug 25 22:05:03.407868 2016] [mpm_prefork:notice] [pid 2524] AH00163: Apache/2.4.18 (Ubuntu) SVN/1.9.3 mod_fcgid/2.3.9 OpenSSL/1.0.2g-fips configured – resuming normal operations
[Thu Aug 25 22:05:03.407889 2016] [core:notice] [pid 2524] AH00094: Command line: ‘/usr/sbin/apache2’
PHP Warning: Module ‘mcrypt’ already loaded in Unknown on line 0
[Thu Aug 25 22:14:30.570266 2016] [mpm_prefork:notice] [pid 2524] AH00169: caught SIGTERM, shutting down
[Thu Aug 25 22:14:32.737420 2016] [suexec:notice] [pid 10525] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Aug 25 22:14:32.741291 2016] [so:warn] [pid 10525] AH01574: module dav_module is already loaded, skipping
[Thu Aug 25 22:14:32.789029 2016] [mpm_prefork:notice] [pid 10526] AH00163: Apache/2.4.18 (Ubuntu) SVN/1.9.3 mod_fcgid/2.3.9 OpenSSL/1.0.2g-fips configured – resuming normal operations
[Thu Aug 25 22:14:32.789059 2016] [core:notice] [pid 10526] AH00094: Command line: ‘/usr/sbin/apache2’
PHP Warning: Module ‘mcrypt’ already loaded in Unknown on line 0
[Thu Aug 25 22:22:42.625093 2016] [mpm_prefork:notice] [pid 10526] AH00169: caught SIGTERM, shutting down
[Thu Aug 25 22:22:44.747256 2016] [suexec:notice] [pid 11107] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Aug 25 22:22:44.751123 2016] [so:warn] [pid 11107] AH01574: module dav_module is already loaded, skipping
[Thu Aug 25 22:22:44.797119 2016] [mpm_prefork:notice] [pid 11108] AH00163: Apache/2.4.18 (Ubuntu) SVN/1.9.3 mod_fcgid/2.3.9 OpenSSL/1.0.2g-fips configured – resuming normal operations
[Thu Aug 25 22:22:44.797161 2016] [core:notice] [pid 11108] AH00094: Command line: ‘/usr/sbin/apache2’
PHP Warning: Module ‘mcrypt’ already loaded in Unknown on line 0
[Thu Aug 25 22:27:45.194486 2016] [mpm_prefork:notice] [pid 11108] AH00169: caught SIGTERM, shutting down
[Thu Aug 25 22:27:47.343679 2016] [suexec:notice] [pid 11436] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Aug 25 22:27:47.349848 2016] [so:warn] [pid 11436] AH01574: module dav_module is already loaded, skipping
[Thu Aug 25 22:27:47.406071 2016] [mpm_prefork:notice] [pid 11437] AH00163: Apache/2.4.18 (Ubuntu) SVN/1.9.3 mod_fcgid/2.3.9 OpenSSL/1.0.2g-fips configured – resuming normal operations
[Thu Aug 25 22:27:47.406107 2016] [core:notice] [pid 11437] AH00094: Command line: ‘/usr/sbin/apache2’

[Thu Aug 25 22:27:38.898385 2016] [fcgid:warn] [pid 11113] [client 81.240.90.226:58703] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function mb_detect_encoding() in /home/blabla/public_html/phpmyadmin/libraries/php-gettext/gettext.inc:177 [Thu Aug 25 22:27:38.898423 2016] [fcgid:warn] [pid 11113] [client 81.240.90.226:58703] mod_fcgid: stderr: Stack trace: [Thu Aug 25 22:27:38.898428 2016] [fcgid:warn] [pid 11113] [client 81.240.90.226:58703] mod_fcgid: stderr: #0 /home/blabla/public_html/phpmyadmin/libraries/php-gettext/gettext.inc(282): _encode('The %s extensio...') [Thu Aug 25 22:27:38.898433 2016] [fcgid:warn] [pid 11113] [client 81.240.90.226:58703] mod_fcgid: stderr: #1 /home/blabla/public_html/phpmyadmin/libraries/php-gettext/gettext.inc(289): _gettext('The %s extensio...') [Thu Aug 25 22:27:38.898437 2016] [fcgid:warn] [pid 11113] [client 81.240.90.226:58703] mod_fcgid: stderr: #2 /home/blabla/public_html/phpmyadmin/libraries/core.lib.php(306): __('The %s extensio...') [Thu Aug 25 22:27:38.898440 2016] [fcgid:warn] [pid 11113] [client 81.240.90.226:58703] mod_fcgid: stderr: #3 /home/blabla/public_html/phpmyadmin/libraries/core.lib.php(972): PMA_warnMissingExtension('mbstring', true) [Thu Aug 25 22:27:38.898444 2016] [fcgid:warn] [pid 11113] [client 81.240.90.226:58703] mod_fcgid: stderr: #4 /home/blabla/public_html/phpmyadmin/libraries/common.inc.php(102): PMA_checkExtensions() [Thu Aug 25 22:27:38.898448 2016] [fcgid:warn] [pid 11113] [client 81.240.90.226:58703] mod_fcgid: stderr: #5 /home/blabla/public_html/phpmyadmin/index.php(13): require_once('/home/blabla/p...') [Thu Aug 25 22:27:38.898452 2016] [fcgid:warn] [pid 11113] [client 81.240.90.226:58703] mod_fcgid: stderr: #6 {main} [Thu Aug 25 22:27:38.898455 2016] [fcgid:warn] [pid 11113] [client 81.240.90.226:58703] mod_fcgid: stderr: thrown in /home/blabla/public_html/phpmyadmin/libraries/php-gettext/gettext.inc on line 177 [Thu Aug 25 22:27:39.791963 2016] [fcgid:warn] [pid 11116] [client 81.240.90.226:58704] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function mb_detect_encoding() in /home/blabla/public_html/phpmyadmin/libraries/php-gettext/gettext.inc:177 [Thu Aug 25 22:27:39.792046 2016] [fcgid:warn] [pid 11116] [client 81.240.90.226:58704] mod_fcgid: stderr: Stack trace: [Thu Aug 25 22:27:39.792051 2016] [fcgid:warn] [pid 11116] [client 81.240.90.226:58704] mod_fcgid: stderr: #0 /home/blabla/public_html/phpmyadmin/libraries/php-gettext/gettext.inc(282): _encode('The %s extensio...') [Thu Aug 25 22:27:39.792055 2016] [fcgid:warn] [pid 11116] [client 81.240.90.226:58704] mod_fcgid: stderr: #1 /home/blabla/public_html/phpmyadmin/libraries/php-gettext/gettext.inc(289): _gettext('The %s extensio...') [Thu Aug 25 22:27:39.792058 2016] [fcgid:warn] [pid 11116] [client 81.240.90.226:58704] mod_fcgid: stderr: #2 /home/blabla/public_html/phpmyadmin/libraries/core.lib.php(306): __('The %s extensio...') [Thu Aug 25 22:27:39.792061 2016] [fcgid:warn] [pid 11116] [client 81.240.90.226:58704] mod_fcgid: stderr: #3 /home/blabla/public_html/phpmyadmin/libraries/core.lib.php(972): PMA_warnMissingExtension('mbstring', true) [Thu Aug 25 22:27:39.792064 2016] [fcgid:warn] [pid 11116] [client 81.240.90.226:58704] mod_fcgid: stderr: #4 /home/blabla/public_html/phpmyadmin/libraries/common.inc.php(102): PMA_checkExtensions() [Thu Aug 25 22:27:39.792067 2016] [fcgid:warn] [pid 11116] [client 81.240.90.226:58704] mod_fcgid: stderr: #5 /home/blabla/public_html/phpmyadmin/index.php(13): require_once('/home/blabla/p...') [Thu Aug 25 22:27:39.792070 2016] [fcgid:warn] [pid 11116] [client 81.240.90.226:58704] mod_fcgid: stderr: #6 {main} [Thu Aug 25 22:27:39.792073 2016] [fcgid:warn] [pid 11116] [client 81.240.90.226:58704] mod_fcgid: stderr: thrown in /home/blabla/public_html/phpmyadmin/libraries/php-gettext/gettext.inc on line 177

Virtualmin is really buggy these days. I tried to install on Ubuntu 16.04 with Nginx, but it failed multiple times. And there’s also a webmin bug on Ubuntu 14.4 with Nginx. Looks like time to find new CP.

I don’t expect virtualmin to be bug free. I’m very grateful that I can use it for free.
I already used some other control panels and virtualmin is by far the best.
There is always something wrong with the other control panels, lack of support or updates, unsecure, buggy, limited features etc. At the moment I’m happy with virtualmin. I’m not switching.

Howdy,

Well, Nginx is a bit of a different animal. We recommend Apache. While Nginx should work, it’s more likely to have some occasional issues that arise. I know Jamie is working on the bug report you commented on, hopefully that issue will be resolved shortly.

As far as Apache goes – we do expect Apache to work out of the box. The issue here may be a PHP issue, but we can dig into that a bit more.

lolbro, could we maybe simplify things a bit and see if PHP in general is working? I’m seeing some errors there that suggest maybe you’re seeing an issue specific to that application, or maybe even just a missing PHP module.

Could you create a new file named “test.php”, and in that file, add the following contents:

<?php phpinfo(); ?>

When, when accessing test.php, does that work as expected?

-Eric

Okay, try running this command:

apt-get install php-mbstring

And then restart Apache:

service apache2 restart

After that, what happens when you try to access phpMyAdmin?

-Eric

Intresting, yes phpinfo works.

But for instance php my admin doesn’t. It is just a white page.

Thank you very much! The problem is resolved after I ran the command! :slight_smile: