TinyPortal

Development => Support => Older SMF versions => Topic started by: PD3 on May 05, 2020, 08:07:36 AM

Title: PHP Depreciation woes
Post by: PD3 on May 05, 2020, 08:07:36 AM
Hi guys,

I've been running an old version of the portal for years without any problems, but now it's just a white page with an internal server error 500

I'll paste the error code below, just in case there's an easy fix, but after reading around I'm pretty sure I just need to upgrade. My question is this -- how do I upgrade without losing everything if I can't even get the forum to load?

Thanks in advance for any useful information

Code: [Select]
PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public_html/forum/Sources/Load.php(225) : runtime-created function on line 3
Title: Re: PHP Depreciation woes
Post by: @rjen on May 05, 2020, 08:44:37 AM
Firstly provide a bit more details: what version are you using: SMF version, Tinyportal version, PHP version?
What other mods are you using?
The error is not pointing to TinyPortal...

What led to the errors?

I assume you moved to a higher PHP version? What version was working last?

Easiest approach would be to downgrade to the php version that was working and when the forum comes back take it from there...
Title: Re: PHP Depreciation woes
Post by: PD3 on May 05, 2020, 10:21:22 AM
Firstly provide a bit more details: what version are you using: SMF version, Tinyportal version, PHP version?

Software Version:           SMF 1.1.21
$forum_version = 'SMF 1.1.21'
(from the index.php can't find the TP version)
PHP is up to date, but the host tried loading an older version, and that didn't work either

Quote
What other mods are you using?

None that I can remember

Quote
The error is not pointing to TinyPortal...

I had some problems with trying to update the SMF, with errors showing on multiple lines, so it was inadvisable to go ahead. I made the mistake of not taking it further because it was working OK without the update.

Quote
What led to the errors?

I didn't do anything to bring it on. I'm guessing the hosts just updated PHP

Quote
I assume you moved to a higher PHP version? What version was working last?

I've no idea -- I leave that to the hosts. I can find out if you need to know.

Quote
Easiest approach would be to downgrade to the php version that was working and when the forum comes back take it from there...

Yes, tried that. I was hoping I can somehow find a way to upgrade SMF or TP without having to use SMF package manager, as I don't currently have access to it due to the fault.

Many thanks for the reply, @rjen
Title: Re: PHP Depreciation woes
Post by: tino on May 05, 2020, 10:47:47 AM
If you can downgrade to php 5.5 or lower then you can apply this patch short term to remove the error notices in SMF https://www.smfhacks.com/index.php?action=downloads;sa=view;down=204

The ideal would be to upgrade to SMF 2.0.x, if you do that remember to back up your database.
Title: Re: PHP Depreciation woes
Post by: @rjen on May 05, 2020, 11:10:28 AM
Since it is not a TinyPortal issue, but a general SMF issue, you can better follow up on your support request on SMF:  over there are more knowledgeable people that can provide support then here....
Title: Re: PHP Depreciation woes
Post by: PD3 on May 06, 2020, 03:00:04 AM
OK, thanks guys. I guess I now know what I'm going to be doing Saturday  :-\