Skip to main content
Topic: Deprecated Error, please help? (Read 958 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Deprecated Error, please help?

Hi there!

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; PasswordHash has a deprecated constructor in /customers/6/a/e/uss-theurgy.com/httpd.www/forum/sources/ext/PasswordHash.php on line 27

That's the message I get on my forum when running PHP 7.2 on Elkarte 1.0.10. I cannot upgrade to 1.1 because of the theme and my crucial addons not being supported by Elkarte 1.1  To make matters worse, my provider forces PHP upgrades, and this Deprecated error will eventually become a real issue when upgrading to PHP 7.3 . Can anyone help me fix this while still using 1.0.10 ?

Thanks in advance!

Best,

Auctor Lucan

Re: Deprecated Error, please help?

Reply #1
That is odd .... we updated for that in the 1.0.10 release so at least that 7.x issue was fixed.  Use the attached file, simply replace the one that is in your sources/ext directory.

You are probably going to find other 7.2 issues running 1.0.10, but I fully understand the pain associated with theme updates etc ... which addons are not yet 1.1?

Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

 

Re: Deprecated Error, please help?

Reply #2
As far as I remember this error is common in 1.0.10 as it is not fully compatible with php7. It is best to upgrade to latest 1.1 branch.

Re: Deprecated Error, please help?

Reply #3
I have a problem now with a Token Verification error, and the error log points towards Sources/Subs, can I have an updated file for that too (1.0.10)? Thanks in advance!

Best,

Auctor Lucan

Re: Deprecated Error, please help?

Reply #4
You can get all of the original source files for 1.0.10 here: https://github.com/elkarte/Elkarte/releases/tag/v1.0.10

Just download the sources zip file from that page and then grab what you need from the archive.  BUT before you overwrite any files be sure you or a addon/mod has not made source edits to any file you overwrite. You can always make a copy of any original file you overwrite.

Also token errors should not be php version related, at least that I recall, so something else may be going on.
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: Deprecated Error, please help?

Reply #5
Quote
Also token errors should not be php version related, at least that I recall, so something else may be going on.

Any resolutions to this available? It is the Subs file that the error log points to, and my search on this forum has rendered some threads about the token ver error, but next to no resolutions.

Best,

Auctor Lucan

Re: Deprecated Error, please help?

Reply #6
Update: It seems to be a Chrome issue, since it works both on mobile and when switching to Mozilla. Any ideas on what may have happened in Chrome, if it's a known issue?

Re: Deprecated Error, please help?

Reply #7
What exactly is the error you are getting?
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: Deprecated Error, please help?

Reply #8
I get the Token Ver error message with "Try again later" when I try to login into the Admin area, and I get it when using Chrome. The Error logs point towards Sources/Subs and different lines starting with 10XX. Does that help any?

Re: Deprecated Error, please help?

Reply #9
I looked at sources subs from 1.0.9 to 1.0.10 and there was one minor change that would have nothing to do with tokens.   But without some specifics I can't really help you out.

If its only chrome, you should try the clear cache and cookies (just for your site) and see if that helps.

I did not see any specific token fixes in the 1.0.10 branch either, there were several php7 fixes to other files, you should look at the headers on your Session.php and SettingsForm.class.php to make sure they are at 1.0.10
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: Deprecated Error, please help?

Reply #10
All right, thank you! I will try to resolve it with clearing cache to see if that helps.

I will PM you a error log screencap (because IP is visible) since the conflicts appeared on several different lines. Hope it will help somehow, and thank you soo much for all the help so far. You're awesome!  :D

EDIT: Clearing cookies and cache didn't help.

Best,

Auctor Lucan

Re: Deprecated Error, please help?

Reply #11
I got the image, all of those errors are harmless and not the cause of the issue you are having. 

Depreciated simply means that a function will be dropped in a future version of PHP, so yes it will eventually simply stop working with some version of php but that is why there is a 1.1 branch of ElkArte.  You can try turning off those errors since they are log spam and fixed a long time ago in the 1.1 branch.

Edit your root index.php file, on line 33 it should say
Code: [Select]
error_reporting(E_ALL | E_STRICT);
change that to
Code: [Select]
error_reporting(E_ALL & ~E_DEPRECATED);

At least then if there is a real error you might be able to see it without all of the depreciated spam.  Also note one of the error is from an addon.  Since the cache flush did not work, have you completely logged out of the forum and logged back in?
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: Deprecated Error, please help?

Reply #12
I have tried that as well without luck.

Could there be a case of overlapping cookies? (that's the best I can describe it)

I managed to do a work-around with always having admin mode activated when I log in, but that only worked for the first session, because when I turned the computer on again, I got a Token Verification Error when I tried to use admin-only features, like updating a user account. I could do that immediately after I did the work-around, but not afterwards, again forcing me to use the phone or a different browser than Chrome to use admin functions. It's really strange....

It's like using the admin functions generates a cookie that's in conflict with the sessions in another cookie?

Really grateful for any further advise.

Re: Deprecated Error, please help?

Reply #13
I still suggest upgrading to 1.1.x branch as a solution. Nobody is maintaining 1.0.x branch.