4

I am using Nginx with Centos 7 which is working fine.

After that I installed phpMyAdmin which was successfully installed as well, however when I access it on the browser it shows white blank page with no HTML source code.

What am I doing wrong?

pp_
  • 3,435
  • 4
  • 19
  • 27
Blackflash
  • 81
  • 1
  • 8
  • What does error_log say? – Stuart Mar 31 '16 at 13:31
  • nothing just blank page – Blackflash Apr 01 '16 at 06:34
  • I doubt the error log is a blank page – Stuart Apr 01 '16 at 06:43
  • 2016/04/01 02:32:07 [error] 9943#0: *56 FastCGI sent in stderr: "PHP message: PHP Fatal error: Call to undefined function __() in /usr/share/phpMyAdmin/libraries/core.lib.php on line 245" while reading response header from upstream, client: XXX.XX.XXX.XXX, server: XXX.XX.XXX.XXX, request: "GET /phpMyAdmin/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "XXX.XX.XXX.XXX" – Blackflash Apr 01 '16 at 06:51
  • Possible duplicate of [Call to undefined function \_\_() error - phpMyAdmin](http://stackoverflow.com/questions/21243704/call-to-undefined-function-error-phpmyadmin) – Isaac Bennetch Apr 11 '16 at 22:32

3 Answers3

6

based on the accepted answer I found the solution, But instead of changing the permission to 777 I prefer changing the ownership like below:

sudo chown -R nginx:nginx /var/lib/php/session/

The group of the session directory is apache by default, I changed it to nginx which is the user that runs php-fpm and nginx

Niyaz
  • 797
  • 1
  • 8
  • 18
1

I've found the solution.

The /var/lib/php/session/ folder was not writeable by nginx/php-fpm, I've just edited the permissions to 777 and now it works.

Blackflash
  • 81
  • 1
  • 8
0

You need to add a symlink

sudo ln -s /usr/share/phpMyAdmin /usr/share/nginx/html

After that, restart your php-fpm process.

sudo systemctl restart php-fpm

https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-with-nginx-on-a-centos-7-server

Aaron Franco
  • 1,560
  • 1
  • 14
  • 19