I'm facing a strange behavior on phpmyadmin + redis php session cache. Here is my php-fpm pool configuration :
php_value[session.save_handler] = redis
php_value[session.save_path] = "tcp://127.0.0.1:6379"
This configurations works fine for a simple php script :
<?php
//simple counter to test sessions. should increment on each page reload.
session_start();
$count = isset($_SESSION['count']) ? $_SESSION['count'] : 1;
echo $count;
echo "<br>";
$_SESSION['count'] = ++$count;
$username = $_SESSION['username'];
if(isset($_SESSION['logged']) && $_SESSION['logged']=='yes') {
echo "$username";
}
$_SESSION['username']='Teddy';
$_SESSION['logged']='yes';
?>
I see the increment and the Teddy message.
But when I try to access to phpmyadmin through 'http://myserver/phpmyadmin' I always get the authentication page, even after successfull login, I'm always redirected to that login page...
If I switch to path sessions :
php_value[session.save_handler] = files
php_value[session.save_path] = /var/www/vhost/sessions
Everything works well (my php script and phpmyadmin).
I would like to know if somebody experienced a similar issue and if there is a fix ? Could this be a limitation of phpmyadmin ?
I'm runing on Linux Debian 8.6 + phpmyadmin 4.2.12-2 + php5-fpm 5.6.24 + redis-server 3.2.4-1.
My vhost is configured this way :
Alias /webops /usr/share/phpmyadmin
...
<FilesMatch "(^$|\.php$)">
SetHandler "proxy:unix:///var/run/php-fpm/vhost.sock|fcgi://vhost/"
</FilesMatch>
<Proxy fcgi://vhost/$1 >
</Proxy>
RewriteCond %{REQUEST_FILENAME} .php$
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-f
RewriteRule (.*) - [H=text/html]
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
Thank you Bests Julien
0 Answers