OK success, finally.
I wanted to test PHP session caching outside of NC to see it was even working.
So, I asked chatgpt to write me a script. It took a few tries , but it eventually came up with one that worked:
<?php
// Start the session
session_start();
// Check if a counter variable is set in the session
if(isset($_SESSION['counter'])) {
// Increment the counter
$_SESSION['counter']++;
} else {
// Set the counter to 1
$_SESSION['counter'] = 1;
}
// Display the counter value
echo "Counter: " . $_SESSION['counter'];
// End the session
session_write_close();
?>
Sure enough it didn’t work on my NC server, but it did work on another server I have.
PHP Warning: session_start(): open(/var/cpanel/php/sessions/alt-php74/sess_a4a42fd737d49859ad666af0681b4548, O_RDWR) failed: No such file or directory
PHP Warning: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/alt-php74)
So I changed the session.save_path
in my php.ini from whatever my provider had in there, to a directory in my home and now I’m able to login normally.
Thanks to @chrissi55 for the tip off.