Tagged: php, Siteground
-
AuthorPosts
-
May 25, 2018 at 12:18 pm #962056
Hi
I’m hoping you can advise why I’m getting this error. The site is hosted by Siteground with their SG optimizer plugin enabled. The message is:FILE: …/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/external/JSqueeze.php
——————————————————————————————————————————–
FOUND 3 ERRORS AFFECTING 3 LINES
——————————————————————————————————————————–
409 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
494 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
510 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
——————————————————————————————————————————–
Thank you in advanceMay 28, 2018 at 11:21 am #963062Exactly my question.
Just following. ^^May 28, 2018 at 11:37 am #963074Hi Treacs,
Enfold is fully compatible with php7, this modifier, that is deprecated, is not even used in the code on those lines. Please check for yourself. I have two instances running, one on php7.0.1 and one on php7.2.3 and they work fine.
Best regards,
Victoria- This reply was modified 6 years, 6 months ago by Victoria.
May 28, 2018 at 11:46 am #963084Thanks
May 30, 2018 at 2:11 pm #964261Hi Victoria
Thanks for your quick reply. Sorry it’s taken me a while to respond as I was away for a few days. I had a look at the file and have picked line 510 which is:
$f = preg_replace("'(?<![a-zA-Z0-9_\$])for\neach\('", 'for each(', $f);
I understand Enfold is compatible with PHP7 so I don’t understand why it’s throwing this error. Could it be because the original template I downloaded and used was one of your older demos/designs (Construction demo)?June 1, 2018 at 10:57 am #965185Hi Treacs,
Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardJune 3, 2018 at 8:35 am #966082OK thanks
June 4, 2018 at 5:01 am #966289Hi,
Thanks for that, though we need a URL as well to be able to log in :-)
Best regards,
RikardJune 4, 2018 at 8:39 am #966363Apologies, I thought i had included it
June 4, 2018 at 10:13 pm #966855Hi,
Thank you for the feedback.
Actually I just did a research and I couldnt define that issue.It is something we can work it out but we would appreciate some patience to check it a little bit more.
Thank you for your patience.
Best regards,
BasilisJune 5, 2018 at 5:57 am #966966No problem, thanks for the update
June 5, 2018 at 6:09 pm #967345Hi Treacs,
I tried to check on your site but gives this error:
403 - Forbidden Error You are not allowed to access this address. If the error persists, please contact the website webmaster.
I’m using php version 7.1.7 which works perfectly fine and doesn’t have any issues on my end.
I have the same code you posted but it doesn’t show any error on that line.Best regards,
NikkoJune 5, 2018 at 6:52 pm #967365HI Nikko
Sorry about that. I forgot that I’d put an IP ban in my .htaccess for all IPs except my own – I’ve removed it now. The site is running PHP 7.1 but the option for 7.1.7 isn’t available for me.June 5, 2018 at 8:17 pm #967437Hi Treacs,
Thanks for giving us access.
I did check it and I thought at first it causes some issues but it doesn’t.
So I tried to check further into the error thrown (line 409, 494, 510) which according to the plugin uses /e modifier on preg_replace() which is removed in php 7 however if you look on those lines of code you shouldn’t see any /e modifier. Here are some examples that uses /e modifier: https://stackoverflow.com/questions/15454220/replace-preg-replace-e-modifier-with-preg-replace-callback and you can try to search for similar examples and you should see that /e is explicitly written but not on JSqueeze.php on those 3 lines.
I don’t think the checker is accurate in checking it and there are no functionality that isn’t working properly so I think it’s safe to say that Enfold theme is compatible with 7.1.
Another way to check for errors is turning on WordPress Debug: https://codex.wordpress.org/Debugging_in_WordPress
I couldn’t really say why the plugin/checker throws those errors, but maybe the author/s of that plugin knows better. I hope this clears it out.Best regards,
NikkoJune 6, 2018 at 8:43 am #967691OK thanks Nikko, I’ll raise the question with them.
June 6, 2018 at 9:54 pm #968089Hi Guys,
Sorry to barge in on this one, but I was about to report the same issue, but searched the forum first. I have many sites (some old, some new) and moved them all recently to SiteGround. All are running PHP 7.0 and the Siteground SG Optimizer provides the following message in the dashboard: You website doesn’t run on the recommended by SiteGround PHP version. When I go to the SG Optimizer and run the check, i get the same error message:
FILE: /home/mywebsites/public_html/sitedomain.com/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/external/JSqueeze.php
————————————————————————————————————————————————
FOUND 3 ERRORS AFFECTING 3 LINES
————————————————————————————————————————————————
409 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
494 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
510 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
————————————————————————————————————————————————
If this code does not exist, what is the best way to update to php 7.1?
Should we delete the theme and upload it again? (I have a child theme installed)Many thanks,
HJune 6, 2018 at 10:35 pm #968096My guess would be SG’s Optimizer plugin is using a regexp that is throwing false positives on those lines for some reason.
Note: I don’t work here, just another customer answering questions while I wait for a response to my own thread ;)
June 7, 2018 at 12:45 am #968130@aussie_jason Many thanks for the reply. I think you are right about this. I found out I can manually update PHP through cPanel (which is new to me – shock, I know) so will try this option. Hope you get you’re own thread sorted :)
June 7, 2018 at 7:16 am #968202Hi Heathcliffe,
Thanks for the feedback, please let us know if you should need any further help on the topic. Thanks @aussie_jason for helping out :-)
Best regards,
RikardJune 7, 2018 at 10:05 am #968385Thanks for all the responses guys. I raised a support ticket with Siteground and there’s now an updated version of their plugin available which fixes the problem.
June 7, 2018 at 4:41 pm #969697Hi Treacs,
Glad that we could help :)
Let us know if you need further assistance or if we can close this thread.Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.