We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3633
    • 84 Posts
    My client has this error displaying on their website:

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Function eregi_replace() is deprecated
    Error type/ Nr.: - 8192
    File: /home/username/public_html/assets/plugins/directresize/directResize.php
    Line: 459
    Line 459 source: $currentImgPath = eregi_replace("^.+src=(’|\")","",$imgs[0][$n]);

    Parser timing
    MySQL: 0.0045 s (0 Requests)
    PHP: 0.0640 s
    Total: 0.0684 s

    Could someone please help me solve it for them? Thanks in advance.

    If this is the wrong forum, please move this thread to the right forum.
      • 16610
      • 634 Posts
      Eregi_replace function is deprecated in PHP 5.3+.

      You may be able to turn off these warnings in your php.ini file (ask your host):
      error_reporting = E_ALL & ~E_DEPRECATED

      If that’s not possible you have to modify your script (directResize.php) to support preg_replace instead of eregi_replace: http://www.php.net/manual/en/function.preg-replace.php
        Mikko Lammi, Owner at Maagit
        • 36551
        • 416 Posts
        Has anyone successfully modified directResize to fix this problem? I've not been able to make this work.
          • 3232
          • 380 Posts
          which version of directresize are you looking to fix?
            • 36551
            • 416 Posts
            Brian

            I'm referring to directresize for evo. I've got someone working on this for me, but if you have anything that would speed things along, that would be great.
              • 36722
              • 101 Posts
              Here is an updated directResize.php This worked perfect for issues with php 5.3

              Need to be logged in to see attachment. [ed. note: himmdesign last edited this post 10 years, 9 months ago.]
                Shawn Himmelberger
                Himmelberger Design
                https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Design | https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Development