PhpMyAdmin 500 Internal Server Error on Nginx/php5-fpm/Debian
Posted
by
ThrownAway
on Server Fault
See other posts from Server Fault
or by ThrownAway
Published on 2014-05-28T07:33:30Z
Indexed on
2014/05/28
9:32 UTC
Read the original article
Hit count: 235
I downloaded PhpMyAdmin a while ago and am having a hard time getting it to work. Requesting localhost/phpmyadmin gives a 500 Internal Server Error response, but there's nothing in the error log.
These are the steps I did:
- Downloaded the newest phpmyadmin and unzipped all the files to /var/vhosts/phpmyadmin/www/
- Created a new php5-fpm pool and a server block on nginx
- Changed the owner of all the files inside phpmyadmin/
- Tried requesting localhost/phpmyadmin and localhost/phpmyadmin/setup
The phpmyadmin is running inside a chroot, and all the files are owned by www-data so it shouldn't be a permission error.
I made a new php file in the same directory to produce an error and it logs just fine so it has to be just phpmyadmin.
Here's my php5-fpm pool:
[phpmyadmin]
listen = /var/vhosts/phpmyadmin/tmp/.php.sock;
user = www-data
group = www-data
chroot = /var/vhosts/phpmyadmin/
chdir = /
php_admin_value[error_reporting] = E_ALL
php_admin_value[error_log] = error.log
php_admin_flag[log_errors] = on
php_admin_flag[display_errors] = on
php_value[session.save_handler] = files
php_value[session.save_path] = /tmp
And Nginx server block:
server {
listen 80;
root /var/vhosts/phpmyadmin/www;
server_name pma.domain;
location / {
try_files $uri $uri/ /index.html;
autoindex on;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_pass unix:/var/vhosts/phpmyadmin/tmp/.php.sock;
fastcgi_param SCRIPT_FILENAME /www$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT /www;
}
index index.html index.htm index.php;
try_files $uri $uri/ =404;
}
Any ideas what could be wrong? Why is it not producing any errors even though I've forced them to be on?
© Server Fault or respective owner