Topic: PHP setcookie problem

Roel / Team

I've just upgraded to PHP 7.4 and am getting the following warnings :-

1) Warning: Cookie paths cannot contain any of the following ',; \t\r\n\013\014' (on line 94 of index.php);
2) Warning: session_name(): Cannot change session name when headers already sent in (line 105);
3) Warning: session_start(): Cannot start session when headers already sent in (line 106);
4) Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in (line 107);
5) Warning: Cannot modify header information - headers already sent by (output started at .... web address .... /index.php:94) in ./common/toolbox.php (line 639).

The calendar displays fine, but the error messages fill up the top bar so I can see the login button, etc.

I could revert to the prior PHP version, but that would require much rewriting of other functions (not Luxcal related).

Any insights ??

Many thanks / Doss

Re: PHP setcookie problem

Hi Doss,
This problem was never reported before. Many calendar users, including myself, are using PHP 7.4 and the latest calendar version 5.1.0 is compatible with PHP 7.4.
I'm sure warnings 2-5 are caused by warning 1.

The cookie path in the file index.php (warning 1) is directly coming from the PHP variable $_SERVER["PHP_SELF"] and therefore should not contain any invalid characters.
I had a look at the calendar source code and saw the cookie path is 100% identical to the RSS feed path of the calendar, without the suffix "/rssfeed . . . .".
So could you please make sure that on the Settings page, in the section general the RSS feed links (3rd from the bottom) is checked, and then hover with your mouse over the RSS button in the left lower corner of the calendar and let me know the link that pops up.

Once we know that this link is OK, we will take it from there.
Roel

Re: PHP setcookie problem

Roel, - thanks for the prompt response.

I'm also using 5.1.0.

Unfortunately the error messages are filling the top bar, where (options / calendar / add / search / menu buttons are and I cannot see (or they are not there) the menu button to access the Settings page.

??

Doss.

Re: PHP setcookie problem

Ok, I see Ross.
Default the RSS feeds are enabled, if they are, you don't need to go to the Settings page.
If needed, you can get the Settings page by adding ?cP=80 to the calendar URL.
Could you send me a link to your calendar (via the Contact Us page).
Roel

Re: PHP setcookie problem

Roel,

Thanks - link sent.
Doss