I have the following PHP code:
include './globallyUsedFunctions/connectToDatabase.php';
include './globallyUsedFunctions/hashInput.php';
session_start();
For some reason, it causes this error:
<br />
<b>Warning</b>: session_start(): open(\xampp\tmp\sess_4p70knkr6lb7r9ha0pitktl3fe, O_RDWR) failed: No such file or directory (2) in <b>D:\foundationtests\src\assets\php\login.php</b> on line <b>2</b><br />
<br />
<b>Warning</b>: session_start(): Failed to read session data: files (path: \xampp\tmp) in <b>D:\foundationtests\src\assets\php\login.php</b> on line <b>2</b><br />
Now I think that the reason for this lies outside the code, so here is some info about my system: I have the most recent version of a no-install XAMPP, I run apache and mariaDB in it. This is running on a windows 10 machine, on a user account without admin privileges (thats why I chose the no-install version of XAMPP).
The website is also running inside the ZURB Foundation Framework (ZURB Template 6.4) which is based on webpack4, gulp and babel7.
EDIT: Alternatives I already tried:
suggested by "code builders" (see answers)
session_start();
require_once $_SERVER['DOCUMENT_ROOT'].'/globallyUsedFunctions/connectToDatabase.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/globallyUsedFunctions/hashInput.php';
Result =>
<br />
<b>Warning</b>: session_start(): open(\xampp\tmp\sess_14rr40ahtg7rbgb20fvqocet83, O_RDWR) failed: No such file or directory (2) in <b>D:\foundationtests\src\assets\php\login.php</b> on line <b>2</b><br />
<br />
<b>Warning</b>: session_start(): Failed to read session data: files (path: \xampp\tmp) in <b>D:\foundationtests\src\assets\php\login.php</b> on line <b>2</b><br />