Error : Make sure your PHP session configuration is valid and working

Hi,

I have the error when I try a fresh install of MODX 2.8.2 :

FATAL ERROR: MODX Setup cannot continue.

Make sure your PHP session configuration is valid and working.

My apache error log is empty.

My server is running well other MODX websites and I don’t know why this error is appearing on new MODX install.

That sounds a lot like the sessions aren’t working for that site… the setup checks that by initialising a session, setting a value to it, and then redirecting to a different page within the setup and making sure it has the value in the session. That check is apparently failing.

I’m not sure why that might be failing though, as I’ve never actually encountered it before. Perhaps a domain/host, https, or php configuration issue?

Could try inspecting the request/responses to see how the session cookie gets defined and why that might not persist after the redirect.

Here is the answer header inside the debug console :

HTTP/1.1 404 Not Found
Server: nginx
Date: Sun, 09 May 2021 13:46:14 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: PHPSESSID=csopsl5ffdlrv9nelhddb6du9e; expires=Sun, 16-May-2021 13:46:13 GMT; Max-Age=604800; path=/; secure; HttpOnly

And the request header :

GET /favicon.ico HTTP/1.1
Host: www.website.fr
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0
Accept: image/webp,*/*
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://www.website.fr/setup/index.php?s=set

I don’t know if is can help…

That’s for the favicon - you’d need to find the initial request for setup/index.php which then redirects (so that’ll have a 301 or 302 status code).

It does look like the Set-Cookie includes the secure flag, which makes it only available on HTTPS, but the Referer on the request indicates HTTP. Are you on HTTP or HTTPS? If you’re on HTTP but cookies are limited to HTTPS that would certainly explain it.

The domain is an existing domain, hosted elsewhere and the website is working : https://www.parisfacecachee.fr/

I have in charge to move this website on my own server.
But as I said, for this particular domain name, the MODX installation doesn’t works

You can easily reproduce the issue by adding on your hosts file this line :

92.243.18.234  www.test.fr test.fr parisfacecachee.fr www.parisfacecachee.fr

Because parisfacecachee.fr is existing, I can’t have https for now, but normally it doesn’t matter.
By bypassing the DNS resolution with the hosts file, you can access to my server with http://www.parisfacecachee.fr (no https) and you will see the default MODX warning than the config file is not set.
Now, you can go there :

The test.fr setup is working, but not parisfacecachee.fr
And if I try on another server I have the same strange result.

I don’t understand from where the issue is coming…

there is definitely something wrong with the domain name configuration (and I don’t have access to it).
The issue is existing only for it, so it’s not a server side issue…
Very strange…