Kotomono
Kotomono

Reputation: 78

PhpMyAdmin shows blank page on nginx ubuntu 16.04

I have created a server block on nginx to open phpmyadmin, but when i try to access it, it only shows blank page with 500 Internal Server Error. But other server blocks that i have is active and works fine. This is my code for phpmyadmin server block:

server {
    listen       500;
    server_name  phpmyadmin.dev;
    root         /usr/share/phpmyadmin;
    index        index.php;

    # Add your IP to the allow list!
    location / {
        allow 127.0.0.1;
        deny all;
    }

    location ~ \.php$ {
        try_files $uri = 404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

enter image description here

I use php5.6, nginx/1.10.0 and mysql 14.14.

Did I miss something? Please help me, thanks in advance.

Upvotes: 3

Views: 7683

Answers (2)

Morteza Pouretemadi
Morteza Pouretemadi

Reputation: 648

It's because phpmyadmin can't access to php sessions. Just run

 chmod -R 777 /var/lib/php/session

Upvotes: 5

ravindrakhokharia
ravindrakhokharia

Reputation: 174

Please try install below and check it might work to resolve the fatal error.

apt-get install php-gettext

Thanks!

Upvotes: 3

Related Questions