Tagged: ,

Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #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 advance

    #963062

    Exactly my question.
    Just following. ^^

    #963074

    Hi 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, 2 months ago by Victoria.
    #963084

    Thanks

    #964261

    Hi 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)?

    #965185

    Hi 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,
    Rikard

    #966082

    OK thanks

    #966289

    Hi,

    Thanks for that, though we need a URL as well to be able to log in :-)

    Best regards,
    Rikard

    #966363

    Apologies, I thought i had included it

    #966855

    Hi,

    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,
    Basilis

    #966966

    No problem, thanks for the update

    #967345

    Hi 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,
    Nikko

    #967365

    HI 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.

    #967437

    Hi 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,
    Nikko

    #967691

    OK thanks Nikko, I’ll raise the question with them.

    #968089

    Hi 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,
    H

    #968096

    My 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 ;)

    #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 :)

    #968202

    Hi 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,
    Rikard

    #968385

    Thanks 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.

    #969697

    Hi Treacs,

    Glad that we could help :)
    Let us know if you need further assistance or if we can close this thread.

    Best regards,
    Nikko

Viewing 21 posts - 1 through 21 (of 21 total)
  • You must be logged in to reply to this topic.