News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SMF2 and PHP5.5 - deprecated warning

Started by digger, June 23, 2013, 06:29:54 PM

Previous topic - Next topic

digger

8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
File: /var/www/clients/client3/web5/web/Sources/Load.php(183) : runtime-created function
Line: 3

shadow82x

Where do you get that warning? I get no noticeable errors on PHP 5.5.0beta3
Colin B
Former Spammer, Customize, & Support Team Member

ziycon

digger, if you could give more information as to where and when this occurs please we can look into it?

digger

#3
I see this warnings in the forum error log since php was upgraded to 5.5.0

shadow82x

Confirmed on SMF 2.0.4 and 2.1 alpha. I'll probably submit an issue to Git later tonight, unless you want to ziycon. :P
Colin B
Former Spammer, Customize, & Support Team Member

ziycon

You go for shadow82x, your the one that replicated it :)

shadow82x

Colin B
Former Spammer, Customize, & Support Team Member

Daniel15

+1 - Confirmed by me as well.

2013/06/24 21:10:30 [error] 30274#0: *4045380 FastCGI sent in stderr: "PHP message: PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/smfshop.com/forum/Sources/Load.php(183) : runtime-created function on line 3" while reading response header from upstream, client: xx.xxx.xxx.xx, server: smfshop.com
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

DSystem

There is already a solution for this bug? I am having the same problem.


http://eletronicabr.com/index.php?action=admin;area=logs;sa=errorlog;desc
8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
Arquivo: /home/forumbr/domains/eletronicabr.com/public_html/Sources/Load.php(183) : runtime-created function
Linha: 3

shadow82x

https://github.com/SimpleMachines/SMF2.1/pull/548/commits

It's resolution in SMF2.1 however I don't believe that fix can be applied to 2.0. (I could be wrong)
Colin B
Former Spammer, Customize, & Support Team Member

hjf288

I backported Spuds fixes at one point, I will try doing this one when I get time :)

emanuele



Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

DSystem

Would not have how to disable this error in function error_handler (Errors.php) of SMF?

So it is not filling the error logs, while not fixing this problem.

Arantor

Change index.php:

Code (find) Select
error_reporting(defined('E_STRICT') ? E_ALL | E_STRICT : E_ALL);

Code (replace) Select
$reporting = E_ALL;
if (defined('E_STRICT'))
$reporting |= E_STRICT;
if (defined('E_DEPRECATED'))
$reporting &= ~E_DEPRECATED;
error_reporting($reporting);


(Yes, I could have made it into one line but it'd be ugly because it would need another set of inline ternary expressions)

It would be better to fix them but fixing them is a very large job. I'd also wonder why your host is pushing out 5.5 already since it's only just really been launched... 5.4 is also still out there (and still active)

DSystem

Tried this change. Most didn't work, still generating the error logs.

My forum is a dedicated server. And I was the one that put the PHP 5.5. to have more performance, more if you have a lot of bugs I'll put an older version.

Arantor

Interesting, as that change worked for me locally.

But SMF does not properly work on PHP 5.5 and won't for some time. SMF 2.1 does, but it is unlikely that the changes will be backported to 2.0 any time soon.

emanuele

There is the intention to create a patch to fix SMF (both 1.1 and 2.0) to work with php 5.5.

Someone wanted it to be included in the latest release (2.0.5), though since the security fixes were already long overdue at the end good sense prevailed and the compatibility will be worked on at some point by someone. :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Arantor

Unless that's going to happen by the time 2.1 enters RC status, I wouldn't worry about 1.1. It's already 7 years old, far beyond its expected lifetime and frankly it's about time it was itself deprecated.

Right now 1.1 is in strict maintenance only land, 2.0 is in a similar place but right now it's the current stable version, 1.1 can't even claim that.

DSystem

#18
I tried to disable these errors in php.ini. But also did not work. :(

Disabled the error logs on the Panel of smf and I'll wait for this update to the next update of SMF 2.0.6  :)

Well that would be better a MOD with these changes, to take all the incompatibilities before joining in SMF.

VCRulez

Any updates on the PHP 5.5 compatibility?

Advertisement: