Reputation:
I'm setting up PHPMyAdmin on an NginX server. The system itself works, however, the /setup page where I should be able to change settings (i.e. build a new config.inc.php) is blank. It doesn't show an error, returns a 200 OK and there's nothing in /var/log/nginx/error.log.
Here's my nginx configuration for this server block:
listen [::]:80;
root /usr/share/phpmyadmin; # path to my pma installation
index index.php;
charset utf-8;
server_name my-host;
location / {
autoindex off;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\. {
deny all;
}
location /libraries {
deny all;
}
location /setup/lib {
deny all;
}
Does anyone know what's going on here?
There seems to be an error in the /setup/lib/common.inc.php file:
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Loads libraries/common.inc.php and preforms some additional actions
*
* @package PhpMyAdmin-setup
*/
/**
* Do not include full common.
* @ignore
*/
echo 1;
define('PMA_MINIMUM_COMMON', true);
define('PMA_SETUP', true);
chdir('..');
echo 2;
if (!file_exists('./libraries/common.inc.php')) {
die('Bad invocation!');
}
echo 3;
require_once './libraries/common.inc.php';
require_once './libraries/config/config_functions.lib.php';
require_once './libraries/config/messages.inc.php';
require_once './libraries/config/ConfigFile.class.php';
require_once './libraries/url_generating.lib.php';
require_once './libraries/user_preferences.lib.php';
echo 4;
// use default error handler
restore_error_handler();
echo 5;
// Save current language in a cookie, required since we use PMA_MINIMUM_COMMON
$GLOBALS['PMA_Config']->setCookie('pma_lang', $GLOBALS['lang']);
echo 6;
ConfigFile::getInstance()->setPersistKeys(array(
'DefaultLang',
'ServerDefault',
'UploadDir',
'SaveDir',
'Servers/1/verbose',
'Servers/1/host',
'Servers/1/port',
'Servers/1/socket',
'Servers/1/extension',
'Servers/1/connect_type',
'Servers/1/auth_type',
'Servers/1/user',
'Servers/1/password'));
echo 7;
// allows for redirection even after sending some data
ob_start();
Output: 123456
Upvotes: 1
Views: 4963
Reputation: 914
Just encountered this. In case you
nginx
, php7.4-fpm
, and perhaps MariaDBsites-enabled/
to run PHP and have a working phpinfo()
phpMyAdmin
as a zip, and extracted itand yet it still returns a blank HTTP 200 page, did you remember to install its PHP dependencies? It turns out I completely forgot about its requirements, such as php-gd
.
To save time, I ran apt-get install phpmyadmin
. It should pull everything phpMyAdmin needs to run properly. It should also set up its needed database structures.
Removing the phpmyadmin
apt package afterward is optional, and I did since I download the zip from phpMyAdmin's site anyways.
Upvotes: 0
Reputation: 1
Fixed adding these options in my /etc/nginx/conf.d/virtual.conf file:
location ~ \.php$ {
....
include fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
...
}
and restarting nginx.
Upvotes: 0
Reputation: 69
I had the same problem and I solved it by changing the default buffer sizes in the nginx conf specific to my phpmyadmin directory. The 4 last lines are the ones I add/changed.
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
Upvotes: 2
Reputation: 10091
Most likely this is same issue as bug #1175142 , which has been fixed 4:4.0.1-2. The problem is that in Debian packaged phpMyAdmin, the config script includes one helper function, what prevented in config file being loaded multiple times.
Upvotes: 0