GET页面index.php循环。HTTP代码302。我已经确定了导致此循环的代码部分。文件:/usr/share/phpldapadmin/lib(第177行). $_SESSION[APPCONFIG])为null。
你有主意吗?谢谢
# If we get here, and $_SESSION[APPCONFIG] is not set, then redirect the user to the index.
if (isset($_SERVER['SERVER_SOFTWARE']) && ! isset($_SESSION[APPCONFIG])) {
if ($_SERVER['QUERY_STRING']) {
header(sprintf('Location: index.php?URI=%s',base64_encode($_SERVER['QUERY_STRING'])));
}
else {
header('Location: index.php');
}
die();
} else {
字符串
RockyLinux 9.2 nginx 1.20.1 php-fpm:8.1(我用7.4版测试过,结果相同)phpldapadmin 1.2.6.6
配置nginx:
server {
listen 10.1.1.255:443 ssl;
server_tokens off;
client_max_body_size 128M;
server_name phpldapadmin.extin.domain;
access_log /var/log/nginx/phpldapadmin.extin.domain.log;
error_log /var/log/nginx/phpldapadmin.extin.domain.error.log;
root /usr/share/phpldapadmin/htdocs/;
autoindex off;
index index.php;
ssl_certificate "/etc/letsencrypt/live/phpldapadmin.extin.domain/fullchain.pem";
ssl_certificate_key "/etc/letsencrypt/live/phpldapadmin.extin.domain/privkey.pem";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers PROFILE=SYSTEM;
ssl_prefer_server_ciphers on;
if ($host !~* ^(phpldapadmin.extin.domain)$) {
return 444;
}
location / {
try_files $uri $uri/ $uri.php?$args;
}
location ~ \.php$ {
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/opt/remi/php81/run/php-fpm/phpldapadmin.extin.domain.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_read_timeout 60s;
}
}
型
GET页面index.php循环。HTTP代码302。
1条答案
按热度按时间0sgqnhkj1#
可能你没有写session文件夹的权限,PHP默认的session文件夹,路径是
/var/lib/php/sessions
,试着用chmod a+w /var/lib/php/sessions
来解决