Session Is not working in Codeigniter 3.1.13 and PHP 8.1 #6259
Unanswered
stavFLDeveloper
asked this question in
Q&A
Replies: 2 comments
-
Does your issues got resolved? |
Beta Was this translation helpful? Give feedback.
0 replies
-
yes, codeigniter 3.13 is compatible with php 8.1, last weekend im migrated a project that use php 7.4 and codeigniter 3.11 to php 8.1 and codeigniter 3.13. @stavFLDeveloper |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello guys,
I started upgrading my PHP to version 8.0.28 and it works as fine as other version and when I'm trying to upgrade to PHP 8.1
I get so many errors regarding the session and deprecated syntax of PHP functions
I'm posting here some of the errors that I'm getting,
and my main question is that is CodeIgniter 3.1.13 is compatible with PHP 8.1 + ? and what can I do in order to fix this problem ?
Return type of CI_SessionWrapper::read(string $id): mixed should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice C:\stav\system\libraries\Session\PHP8SessionWrapper.php 70
ERROR - 2024-01-09 12:45:05.216335 --> Severity: 8192 --> Return type of CI_SessionWrapper::gc(int $maxlifetime): mixed should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice C:\stav\system\libraries\Session\PHP8SessionWrapper.php 86
ERROR - 2024-01-09 12:47:29.364710 --> Severity: 8192 --> Return type of CI_SessionWrapper::read(string $id): mixed should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice C:\stav\system\libraries\Session\PHP8SessionWrapper.php 70
ERROR - 2024-01-09 12:47:29.365653 --> Severity: 8192 --> Return type of CI_SessionWrapper::gc(int $maxlifetime): mixed should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice C:\stav\system\libraries\Session\PHP8SessionWrapper.php 86
ERROR - 2024-01-09 12:49:06.500123 --> Severity: 8192 --> Return type of CI_SessionWrapper::read(string $id): mixed should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice C:\stav\system\libraries\Session\PHP8SessionWrapper.php 70
ERROR - 2024-01-09 12:49:06.500952 --> Severity: 8192 --> Return type of CI_SessionWrapper::gc(int $maxlifetime): mixed should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice C:\stav\system\libraries\Session\PHP8SessionWrapper.php 86
Quick notice:
#[\ReturnTypeWillChange] is already been set in my code and still this is not working .
And some errors is :
ini_set(): Session ini settings cannot be changed after headers have already been sent
Creation of dynamic property Auth::$Events is deprecated
Beta Was this translation helpful? Give feedback.
All reactions