WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.10.x) »
  • General Help & Support »
  • preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
  • Print
Pages: [1]   Go Down

Author Topic: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead  (Read 18768 times)

Offline svsanchez

  • Posts: 589
preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
« on: August 29, 2020, 12:57:06 AM »
Hello.

I just noticed that I have thousands upon thousands of messages like this in all my error logs:

[28-Aug-2020 08:18:39 UTC] PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callba ck instead in /home/deguatec/public_html/modules/show_menu2/include.php on line 216

A LITTLE INFO ABOUT MY SITE:

1) First of all, sorry to publish here, but I couldn't find the create new post in the WB 2.8.x forum

2) My site is www.deguate.com.gt

3) I am still using WB 2.8.3 because when I upgraded to 2.10.x or 2.12.x my site became horribly slow (1 minute to start showing the pages). I tried upgrading several times with the same result in speed, don't know why.

4) I found a topic talking about a patch for this problem (https://forum.WebsiteBaker.org/index.php/topic,27343.msg188689.html#msg188689), but the resource seems to not exist anymore (https://code.google.com/archive/p/wbcom/)

5) My site has sveral hundred categoris and subcategories. Each one of them has an error log. Depending on the traffic of the pages on the category, the error log on each of them can grow to few thousand bytes to more than 1GB in a month, so I need to fix this ASAP to stop utilizing all my hosting space in error logs!

Thank you!
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
« Reply #1 on: August 29, 2020, 07:42:39 AM »
Hello, you can do this:
- create a copy of your site in a subdomain and give us access to find the problems
  - also for upgrade test is this the best way
- or deactivate the error logging in your WB Settings

I hope it is clear you can't use your old system with the newest databases or PHP versions.
You have to upgrade.
Logged
https://onkel-franky.de

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1883
    • EFG MG
Re: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
« Reply #2 on: August 29, 2020, 06:38:37 PM »
2nd possibility
You transfer the website and the database dump to our FTP server and we look at the problems.
If you are interested, send me a PM
problem with this, we can't test it at your hoster, which is probably partly responsible for the slowdown
Therefore only as 2nd possibility.
Logged
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

Offline svsanchez

  • Posts: 589
Re: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
« Reply #3 on: September 01, 2020, 04:29:02 AM »
Hello dbs and hgs, thank you both for your help.

I am making a copy of the site on the same server but with another domain.

1) I will upload it as it is right now (version 2.8.3) so that you can see how slow the front end becomes once it is upgraded.

2) Also, you will see how the backend becomes slow because of the big size of the site (I use a mod by Ruud to open only the pages current level (siblings), which is discussed here:

https://forum.WebsiteBaker.org/index.php/topic,25587.msg174593.html#msg174587
Logged

Offline svsanchez

  • Posts: 589
Re: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
« Reply #4 on: September 01, 2020, 04:47:21 AM »
Ok, so I installed it on the test domain. Where do I send the login credentials?
Logged

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1883
    • EFG MG
Re: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
« Reply #5 on: September 01, 2020, 07:45:31 AM »
Send a PM to dbs or me, we will then exchange information.
Logged
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

Offline svsanchez

  • Posts: 589
Re: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
« Reply #6 on: September 01, 2020, 09:14:16 PM »
Hello, I sent the PM to both (hgs + dbs).
Logged

Offline svsanchez

  • Posts: 589
Re: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
« Reply #7 on: September 04, 2020, 09:08:45 PM »
Regarding the original problem:

PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callba ck instead in /home/deguatec/public_html/modules/show_menu2/include.php on line 216

After checking soem not so big error log files, I noticed that this error stopped at the end of June, so I think it must have been a problem due to the PHP version. I had decided to upgrade my site to 2.12.x and changed the PHP version to 7.1, but since my previous attempts have made the site incredibly slow, I decided to stick with version 2.8.3 until a solution is found for big sites and forgot to change my php version back to 5.6.

So, if you encounter that error, check your php version.
Logged

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
« Reply #8 on: September 05, 2020, 03:22:32 PM »
preg_replace with modifier 'e' only works with deprecated messages from PHP-5.5 and no longer at all from PHP-7.
In order to keep preg_replace 'e' executable under PHP-7, it must be exchanged for preg_replace_callba ck and the code to be executed converted into a callback function.

See: php.net
Quote from: php.net pcre modifier 'e'
e (PREG_REPLACE_EVAL)
    Warning

    This feature was DEPRECATED in PHP 5.5.0, and REMOVED as of PHP 7.0.0.
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.10.x) »
  • General Help & Support »
  • preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2