Question

Blank page with nginx & php-fpm installed on all user pages and user registration not working

Posted June 30, 2020 555 views
NginxPHPLEMPUbuntu 20.04

I followed the Digital Ocean Guide to installing LEMP on ubuntu 20.04 but I am running into the error after login of my admin panel at:

https://prideleads.com/admin_cpa/

with username & password: admin

It goes to a blank screen(when php.ini error log says On)
or HTTP Error 500 when php.ini is off for errors.

The /var/log/nginx/error.log says nothing and so does the /var/log/php5.6-fpm.log

I am stuck! If anyone could help me get past this speed bump I would so much appreciate it :D

My server block:

server {
    server_name performacpa.com www.performacpa.com;
    root /var/www/performacpa/public;

    index index.html index.htm index.php;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
     }

    location ~ /\.ht {
        deny all;
    }


}

P.S. the script works fine on this cPanel hosting I setup:
http://cpanetwork.ml/admin_cpa

Same login info.

Thanks for anyone who reaches out for support on this :D

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi there @estepp2020,

I could suggest adding the PHP snippet from this post here on top of the index file of your application:

// Debug - Add this on top of your index.php file

ini_set('error_reporting', E_ERROR);
register_shutdown_function("fatal_handler");
function fatal_handler() {
    $error = error_get_last();
    echo("");
    print_r($error);
}

This should start displaying any errors that occur rather than getting a blank screen.

Also as far as I can see in your Nginx config you are using PHP 7.4 but you are checking the error log for PHP 5.6. Are there any other logs in the /var/logs/ folder for PHP FPM?

Hope that this helps!
Regards,
Bobby

Submit an Answer