We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40560
    • 10 Posts
    A friend of mine is wanting to first move servers. then upgrade (if posible). When he tried moving Modx 0.9.6.1B to a new server they get the following

    « MODx Parse Error »

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

    PHP error debug
    Error: include_once(/var/www/modx/assets/plugins/phx/phx.parser.class.inc.php): failed to open stream: No such file or directory
    Error type/ Nr.: Warning - 2
    File: /path/var/www/modx/manager/includes/document.parser.class.inc.php(746) : eval()'d code
    Line: 10

    Parser timing
    MySQL: 0.0015 s (2 Requests)
    PHP: 0.1420 s
    Total: 0.1435 s


    The new server is running PHP 5.4.4 no idea what the old server is running.
    I am not sure what steps to take next...

    Thank you for your time
    Chris [ed. note: love2xlr8integra last edited this post 14 years, 3 months ago.]
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Usually that error after a site migration means that at least one file was skipped or corrupted during the transfer. The best way to transfer the files is to zip the whole site, move the zip file, then extract it in place on the new server.

      You may have some other problems with such an old site on PHP 5.4, since there are several deprecated functions that were commonly used at the time that version of MODx was developed. This is especially true of some of the included third-party snippets.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 1343 ☆ A M B ☆
        • 2,213 Posts
        I usually see that error if the full path has changed between servers. I would suggest checking the PHx plugin in the manager to verify the path is correct. Also upgrade the site to 1.0.6 which should fix a lot of issues.
          Patrick | Server Wrangler
          About Me: Website | Tweets |  MODX Hosting
          • 40560
          • 10 Posts
          Where can i set the path for PHx?

          Thank you Scottwell and AMD builder for your time



          (found the 1.0.6 download trying that now) [ed. note: love2xlr8integra last edited this post 14 years, 3 months ago.]
            • 16278
            • 928 Posts
            As supplied, PHx plugin sets up the path to the main include file using $modx->config['rb_base_dir'], which I think is from the Tools > Config > Interface & Features > File base path setting.

            (From Manage Elements > Plugins > PHx):
            include_once $modx->config['rb_base_dir'] . "plugins/phx/phx.parser.class.inc.php";


            When you move servers, you need to update that setting by clicking the Reset button next to it (you'll also have problems finding your image directories etc. if you fail to do this). Also, you should update the File Manager Path at the top of the Configuration's File Manager tab.

            I prefer to change the include line in PHx to use the base_dir setting:
            include_once $modx->config['base_dir'] . "assets/plugins/phx/phx.parser.class.inc.php";


            :) KP
              • 40560
              • 10 Posts
              What if you can get into manager. Can you set the base_dir via the database?
                • 40560
                • 10 Posts
                Think i found out what was going on. THey had some custom php that was in the config file. used the config.inc.php from a fresh install and seems to be working. Thank you all so much for your help!!!!