Skip to content
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

Drowning in PHP errors: mods/spamhurdles #1040

Open
mpotts95420 opened this issue Dec 23, 2020 · 4 comments
Open

Drowning in PHP errors: mods/spamhurdles #1040

mpotts95420 opened this issue Dec 23, 2020 · 4 comments

Comments

@mpotts95420
Copy link

My moderately used Phorum installation is gathering several hundred PHP errors an hour, and jeopardizing my website. The errors look like this:

[23-Dec-2020 17:42:12 UTC] PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/goapples/public_html/phorum/mods/spamhurdles/api.php on line 775
[23-Dec-2020 17:42:12 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Crypt_AES has a deprecated constructor in /home/goapples/public_html/phorum/mods/spamhurdles/include/crypt/aes.php on line 110
[23-Dec-2020 17:42:12 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Crypt_Rijndael has a deprecated constructor in /home/goapples/public_html/phorum/mods/spamhurdles/include/crypt/rijndael.php on line 112
[22-Dec-2020 23:51:00 UTC] PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/goapples/public_html/phorum/mods/spamhurdles/api.php on line 694
[22-Dec-2020 23:51:00 UTC] PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/goapples/public_html/phorum/mods/spamhurdles/api.php on line 756

I just upgraded to 5_2_23 hoping the errors would abate, but they've intensified.
I hope there's a way to turn these errors off (if they can't be fixed) ...but I have tried by adding error_reporting( 0 ) ; to the first line of index.php, and (experimentally) replacing curly brackets on line 771 of spamhurdles/api.php with parens -- this just appeared to "whack a mole" to line 775?
I am way out of my depth here -- I'm an experienced PHP programmer but my "big" systems are only a few hundred lines long -- with an avid audience whose experience I don't want to muddle. I did "browse" looking for solutions, but came up empty. HELP!

@glensc
Copy link

glensc commented Dec 23, 2020

your errors are because you using too new PHP. you can downgrade. deprecation messages can be turned of with the error_reporting php.ini setting.

you could also use automatic code fix tools to upgrade code:

@mpotts95420
Copy link
Author

mpotts95420 commented Jan 4, 2021 via email

@glensc
Copy link

glensc commented Jan 5, 2021

you could also use automatic code fix tools to upgrade code:

If I can do that, why haven't you Phorum folks made a "fixed" version
available?

If you haven't noticed then the last merge was in 2016:
-8ce5dca

that's an indication that there are no phorum devs active.

@sookoll
Copy link

sookoll commented Feb 6, 2022

Take a look at #1043
It is not entirely fixed to work with php8, a bunch of warnings pop up, but they are easy to fix. $PHORUM needs default values on api.php and one fix PhorumDB.php file to get it working without warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants