When I go to my homepage to launch the installation there is an error. I get a 500 Internal Server error. The PHP error log shows:
PHP Parse error: syntax error, unexpected '$expire' (T_VARIABLE) in E:\domains\mypackage\mydomain.net\system\library\session\file.php on line 71
I've worked around it by commenting out the code block with the error. The installation page is now showing. Hopefully I can continue without problems.
Its not a good solution as this is in the "destruct" method and could be important. I would like to know if there's a better way to fix this error without deleting code? Thanks.
This block of code is:
if ((rand() % $gc_divisor) < $gc_probability) {
$expire = time() - ini_get('session.gc_maxlifetime');
$files = glob(DIR_SESSION . 'sess_*');
foreach ($files as $file) {
if (filemtime($file) $expire) { Line 71
unlink($file);
}
}
}
Yeah, that code doesn't seem right. Did you modify it before installing OpenCart?ecostar wrote: ↑Mon May 23, 2022 9:17 pmWhen I go to my homepage to launch the installation there is an error. I get a 500 Internal Server error. The PHP error log shows:
PHP Parse error: syntax error, unexpected '$expire' (T_VARIABLE) in E:\domains\mypackage\mydomain.net\system\library\session\file.php on line 71
I've worked around it by commenting out the code block with the error. The installation page is now showing. Hopefully I can continue without problems.
Its not a good solution as this is in the "destruct" method and could be important. I would like to know if there's a better way to fix this error without deleting code? Thanks.
This block of code is:
if ((rand() % $gc_divisor) < $gc_probability) {
$expire = time() - ini_get('session.gc_maxlifetime');
$files = glob(DIR_SESSION . 'sess_*');
foreach ($files as $file) {
if (filemtime($file) $expire) { Line 71
unlink($file);
}
}
}
Scroll down to line 71, if you are using version 3.x it should look like this:
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo
OC version. See this line: https://github.com/opencart/opencart-3/ ... le.php#L69ecostar wrote: ↑Mon May 23, 2022 9:17 pmWhen I go to my homepage to launch the installation there is an error. I get a 500 Internal Server error. The PHP error log shows:
PHP Parse error: syntax error, unexpected '$expire' (T_VARIABLE) in E:\domains\mypackage\mydomain.net\system\library\session\file.php on line 71
I've worked around it by commenting out the code block with the error. The installation page is now showing. Hopefully I can continue without problems.
Its not a good solution as this is in the "destruct" method and could be important. I would like to know if there's a better way to fix this error without deleting code? Thanks.
This block of code is:
if ((rand() % $gc_divisor) < $gc_probability) {
$expire = time() - ini_get('session.gc_maxlifetime');
$files = glob(DIR_SESSION . 'sess_*');
foreach ($files as $file) {
if (filemtime($file) $expire) { Line 71
unlink($file);
}
}
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Probably, because I downloaded it and it was fine.
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo
Who is online
Users browsing this forum: No registered users and 218 guests