-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors with PHP 8.1.3 #562
Comments
Temp fix if using mysql and for lines 129,151,208,280,297,335 in system/libraries/Session/drivers/Session_database_driver.php I just inserted the following before each function as a temp fix. *there is still other things broke, but this is a start. |
Thanks for that info on getting rid of errors. That was very helpful. After doing those changes, I found that the captcha showed a broken image. Switching it to reCaptcha fixed that. Then I found that when submitting a new paste, it threw another error. The fix is to edit system/core/Input.php (uppercase i in the filename) and edit line 568, changing it so it says "$which = FILTER_DEFAULT;" instead of setting it to NULL. |
Has the repo been updated so it works with PHP 8.1 without the manual code edits that are mentioned on this issue? |
There have been no commits pushed to this repo in nearly 3 years, so I think that no changes have been made. |
I, too, am having error messages such as the above using PHP 8.1.12. I've used this software on several machines for several years, but not recently. It looks like PHP 8.1.x has changes that have broken this project's code. Alas. |
Abandonware at this point |
I think I fixed most of the problems, thought there may be one lingering, but not a show-stopper, just occasional warning messages as it renders. |
There are sources out there which will tell you what changes you need to make to update the code. Some will even automatically run through it and make the changes for you. Looks like Code Igniter needs to be updated also |
It has CodeIgniter 3.1.9 which is for PHP v5.6.- v7.3. Version 4 is out and good for PHP v7.4 and up to v8.2 |
It appears I have already pushed my changes up to GitHub:
So, anyone who wants to give it a try is welcomed. I cannot provide warranty service, I just hacked until it worked again. |
Please note that the project was continued here: https://github.com/MercanoGlobal/SNIP Your feedback is greatly appreciated. |
I think it more accurate to state the Stikked project has been forked into a project named SNIP. https://github.com/claudehohl/Stikked has no mention of the Stikked project being continued. Can the database for Stikked be used by SNIP? I have several year's worth of pastes which are invaluable and I'm not eager to maintain both a Stikked and a SNIP instance. |
@jlpoolen You should first create a backup, test the upgrade on a development instance, and see if any issues appear. |
Getting a plethora of errors with PHP 8.1.3. Its in Main.php and Session_database_driver.php
`
A PHP Error was encountered
Severity: 8192
Message: Return type of CI_Session_database_driver::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Filename: drivers/Session_database_driver.php
Line Number: 129
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: 8192
Message: Return type of CI_Session_database_driver::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Filename: drivers/Session_database_driver.php
Line Number: 280
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: 8192
Message: Return type of CI_Session_database_driver::read($session_id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Filename: drivers/Session_database_driver.php
Line Number: 151
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: 8192
Message: Return type of CI_Session_database_driver::write($session_id, $session_data) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Filename: drivers/Session_database_driver.php
Line Number: 208
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: 8192
Message: Return type of CI_Session_database_driver::destroy($session_id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Filename: drivers/Session_database_driver.php
Line Number: 297
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: 8192
Message: Return type of CI_Session_database_driver::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Filename: drivers/Session_database_driver.php
Line Number: 335
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: ini_set(): Session ini settings cannot be changed after headers have already been sent
Filename: Session/Session.php
Line Number: 282
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: session_set_cookie_params(): Session cookie parameters cannot be changed after headers have already been sent
Filename: Session/Session.php
Line Number: 294
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: ini_set(): Session ini settings cannot be changed after headers have already been sent
Filename: Session/Session.php
Line Number: 304
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: ini_set(): Session ini settings cannot be changed after headers have already been sent
Filename: Session/Session.php
Line Number: 314
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: ini_set(): Session ini settings cannot be changed after headers have already been sent
Filename: Session/Session.php
Line Number: 315
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: ini_set(): Session ini settings cannot be changed after headers have already been sent
Filename: Session/Session.php
Line Number: 316
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: ini_set(): Session ini settings cannot be changed after headers have already been sent
Filename: Session/Session.php
Line Number: 317
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: ini_set(): Session ini settings cannot be changed after headers have already been sent
Filename: Session/Session.php
Line Number: 375
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent
Filename: Session/Session.php
Line Number: 110
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: session_start(): Session cannot be started after headers have already been sent
Filename: Session/Session.php
Line Number: 143
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 98
Function: library
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: 8192
Message: stristr(): Passing null to parameter #1 ($haystack) of type string is deprecated
Filename: controllers/Main.php
Line Number: 269
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 269
Function: stristr
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: 8192
Message: stristr(): Passing null to parameter #1 ($haystack) of type string is deprecated
Filename: controllers/Main.php
Line Number: 297
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 297
Function: stristr
File: /public/www/paste/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: 8192
Message: stristr(): Passing null to parameter #1 ($haystack) of type string is deprecated
Filename: controllers/Main.php
Line Number: 321
Backtrace:
File: /public/www/paste/application/controllers/Main.php
Line: 321
Function: stristr
File: /public/www/paste/index.php
Line: 315
Function: require_once
`
The text was updated successfully, but these errors were encountered: