skip to Main Content

GET page index.php loop. HTTP code 302.
I’ve identified the part of the code that causes this loop.
File: /usr/share/phpldapadmin/lib (line 177). $_SESSION[APPCONFIG]) is null.

Do you have an idea ? Thank you

# 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 (I tested with version 7.4, same result)
phpldapadmin 1.2.6.6

Config 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 page index.php loop. HTTP code 302.

2

Answers


  1. Chosen as BEST ANSWER

    thank you for your response. Indeed it was indeed a rights problem on the sessions directory. I forgot to communicate the solution. my Bad.


  2. Maybe you don’t have write permissions to the session folder,PHP’s default session folder, the path is /var/lib/php/sessions, try to use chmod a+w /var/lib/php/sessions to solve

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search