My situation is the following. I have a cakephp project and a seperated plain php script running on the same server. When I use my client browser to connect to the cakephp proje
CakePHPs PHP session defaults (like all built-in defaults) do change the name of the cookie / the name of the session (session.name INI setting) to CAKEPHP
:
https://github.com/cakephp/cakephp/blob/3.5.3/src/Network/Session.php#L133-L138
So you either have to change that to match the defaults used by your vanilla PHP app (which is most probably PHPSESSID
, ie the PHP default):
'Session' => [
'defaults' => 'php',
'cookie' => session_name(), // would use the PHP default
],
// ...
or change the latter app to use the name configured for your CakePHP application:
session_name('CAKEPHP');
session_start();
// ...
Also make sure that the session.cookie_path and session.cookie_domain configuration covers both of your applications locations.
See also