Hello
I have an Asustor AS5102T which recently was uppgraded and got php 5.5.6 .
This made my php based web frontend for my database (mysql) to stop working.
I think it is related to _Sessions, but are not sure. firefox debugger just gives an “internal server error” but no other clues. I do find the coockie as generated, only thing I wonder about here is the PATH which is set to “/” and nothing more. Name is PHPSESSID.
In the code below, which is the login for my database web frontend, when removing the entire php block the form appears as it should. Removing only one line at the time do not help. Even if only leaving <?php and its exit, the form will not appear The entire block has to be removed. Then strange things happens when I put the php block back in. It works apperantly. The form appears but it does not log in as it should when user creds are given
Now It start to give an error on other pages in stead.
Before doing anything more, has there been any changes in 5.5.6 since … I think it was 5.5.4.??
The following snip is the login page which fails (login.php)
[php]
Enter credentials:
User: Password:The following shows how sec_session_start() is defined.
Note: see attached file (extension renamed to txt, was php) for the entire file
[php]
function sec_session_start() {
$session_name = ‘sec_session_id’; // Set a custom session name
$secure = SECURE;
// This stops JavaScript being able to access the session id.
$httponly = true;
// Forces sessions to only use cookies.
if (ini_set(‘session.use_only_cookies’, 1) == FALSE) {
header(“Location: …/www/call.php?target=error&error=Could not initiate a safe session (ini_set)”);
exit();
}
// Gets current cookies params.
$cookieParams = session_get_cookie_params();
session_set_cookie_params($cookieParams[“lifetime”],
$cookieParams[“path”],
$cookieParams[“domain”],
$secure,
$httponly);
// Sets the session name to the one set above.
session_name($session_name);
session_start(); // Start the PHP session
session_regenerate_id(); // regenerated the session, delete the old one.
}[/php]
functions.txt (8.61 KB)