Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The web server seems to be incorrectly configured for cookies required for PHP sessions! #5973

Closed
hervehobbes opened this issue Dec 24, 2023 · 4 comments

Comments

@hervehobbes
Copy link

hervehobbes commented Dec 24, 2023

Hello,

Describe the bug
I have the error message "The web server seems to be incorrectly configured for cookies required for PHP sessions!"
Just after finishing installation.

To Reproduce
Steps to reproduce the behavior:

  1. Install FreshRss from latest.zip
  2. Configure it
  3. Try to access it

Expected behavior
I should access FreshRss

Environment information (please complete the following information):

  • Ubuntu 22.04.3
  • PHP 8.1.2-1ubuntu2.14 (cli)
  • mysql Ver 8

Additional context
I'm not using Docker

Content of /freshrss/data/users/_/
[warning] --- Invalid session during login for user=XXXX, nonce=

Thank you for any help.

@Alkarex
Copy link
Member

Alkarex commented Dec 25, 2023

Hello,
What Web server, and do you use any proxy?

As the message tells, there seems to be a problem with your PHP sessions. Try to create the following ./FreshRSS/p/i/session.php and try to access https://freshrss.example.net/i/session.php:

<pre>
<?php
session_start();
$_SESSION['count'] = ($_SESSION['count'] ?? 0) + 1;
var_dump($_SESSION);

It should increment by one each time you refresh the page. If that does not work, there is a wrong session configuration in your PHP setup, independent of FreshRSS.

A wrong session can also be due to wrong cookie path. Have you maybe installed more than once at different paths? You might have a wrong base_url in ./FreshRSS/data/config.php. Back-up and remove that file before you try to install again.

@hervehobbes
Copy link
Author

hervehobbes commented Dec 25, 2023

Hello,

I'm using Apache 2.4 and don't have any proxy.

Here is the result of the Php code:

array(1) {
  ["count"]=>
  int(1)
}

After 5 refresh here is the result:

array(1) {
  ["count"]=>
  int(5)
}

I renamed /data/config.php into config.php.old and then relaunched the site but I have:

Error during context user init!

And nothing new in log.txt.

The base_url parameter in config.php seems correct.

I have activated error_log in php.ini but can't see anything in the error log.

@Alkarex
Copy link
Member

Alkarex commented Dec 25, 2023

I meant to make sure that the config.php was not kept from a previous install. Please remove data/applied_migrations.txt as well before trying the install again

@hervehobbes
Copy link
Author

A fresh reinstall solved the problem, thank you very much for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants