SMF icon indicating copy to clipboard operation
SMF copied to clipboard

PHP 5.5 generates a preg_replace error

Open mcblaber opened this issue 13 years ago • 22 comments

Originally Reported - http://www.simplemachines.org/community/index.php?topic=506431.0;topicseen Confirmed by me.

Both in SMF2.0.4 and SMF2.1 the forum generates a handful of errors in the forum error log when running PHP5.5.

All errors revolve around preg_replace. "8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback insteadFile: .../Sources/Load.php(183) : runtime-created function Line: 3"

mcblaber avatar Jun 24 '13 00:06 mcblaber

Looking at the head, it doesn't look like /e modifier is used anywhere in Load.php. Run the alpha and try again.

If anything, I think Spuds fixed this back in October.

joshuaadickerson avatar Jun 24 '13 01:06 joshuaadickerson

I believe my SMF 2.1 alpha site is running a version from a few months ago, so that's odd.

mcblaber avatar Jun 24 '13 02:06 mcblaber

Yep, Spuds fixed most, but not all, there are at least still 6 left. Search for ~e'.

emanuele45 avatar Jun 24 '13 07:06 emanuele45

Yup ... I converted most of them to callbacks but there were a few I did not get to, it was a work in progress plus I wanted to leave some fun for others :P

Spuds avatar Jun 24 '13 12:06 Spuds

This should be either fixed as a compatibility patch or a release for SMF. If its a compatibility patch it should be included in the next release patch as a can fail operation. Needs patched for 1.1 and 2.0.

FYI, This was done for a MySQL issue in a old version of PHP as well.

jdarwood007 avatar Jun 25 '13 04:06 jdarwood007

These should be fixed in #548

jdarwood007 avatar Jul 31 '13 20:07 jdarwood007

Can anyone test and confirm that this is fully fixed now? I don't have a server with PHP 5.5 to test this on.

Oldiesmann avatar Aug 22 '13 16:08 Oldiesmann

Oldiesmann, I have tested this on 5.5 and wasn't getting it. If you want, I can share my url to my PHP 5.5 site and get you access to browse it.

jdarwood007 avatar Aug 24 '13 22:08 jdarwood007

I can also confirm that I have found none of these errors on my PHP 5.5 site although I am only running 5.5.0 not the latest.

tinoest avatar Aug 24 '13 22:08 tinoest

This seems to be fixed in 2.1, this should probably be left open to remind us to get a 2.0 patch out for it.

Arantor avatar Sep 27 '13 16:09 Arantor

Unless I missed something, this should be the list for 2.0 https://gist.github.com/jdarwood007/6747894

Expend it if we need to. Will help with getting a mod package wrote out to fix this.

jdarwood007 avatar Sep 28 '13 23:09 jdarwood007

Thanks SleePy :)

Arantor avatar Sep 29 '13 00:09 Arantor

http://www.simplemachines.org/community/index.php?topic=512125.msg3617729#new

This commit breaks posting (for example) an image only:

[img]http://www.katzy.dsl.pipex.com/Smileys/c000.gif[/img]

emanuele45 avatar Oct 03 '13 12:10 emanuele45

So, wiill this be fixed in 2.0.x too?

multiformeingegno avatar Dec 03 '13 19:12 multiformeingegno

There is already a patch for 2.0 however it is not ready yet; we have not yet finished thorough testing on it as there are security concerns attached to this.

Arantor avatar Dec 03 '13 19:12 Arantor

Oh, ok. Do you think it will be in 2.0.7?

multiformeingegno avatar Dec 03 '13 19:12 multiformeingegno

I think the general feeling is to release it as a separate patch, the problem with it is that it makes a lot of changes, and it will confuse people who want to do a x.y.z to x.y.z+1 patch.

Arantor avatar Dec 03 '13 21:12 Arantor

Uhm, was asking cause I have logs packed (to say an euphemism) by these warnings :P

On Tue, Dec 3, 2013 at 10:05 PM, Arantor [email protected] wrote:

I think the general feeling is to release it as a separate patch, the problem with it is that it makes a lot of changes, and it will confuse people who want to do a x.y.z to x.y.z+1 patch.

Reply to this email directly or view it on GitHub: https://github.com/SimpleMachines/SMF2.1/issues/459#issuecomment-29751183

multiformeingegno avatar Dec 03 '13 21:12 multiformeingegno

And you'll get it when we're satisfied it doesn't cause a security concern, the method by which we distribute it should not be a concern.

Arantor avatar Dec 03 '13 23:12 Arantor

It's not a concern. It's an info. I wanted to know if I need to follow this topic to find the patch when it's out or wait for an official release.

On Wed, Dec 4, 2013 at 12:51 AM, Arantor [email protected] wrote:

And you'll get it when we're satisfied it doesn't cause a security concern, the method by which we distribute it should not be a concern.

Reply to this email directly or view it on GitHub: https://github.com/SimpleMachines/SMF2.1/issues/459#issuecomment-29764340

multiformeingegno avatar Dec 03 '13 23:12 multiformeingegno