We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17897
    • 46 Posts
    Hope this is going in the right spot. Been a while since I posted in here and the forums have changed a bit!

    Really I am having 2 problem, but I believe them to be related.

    I had an installation of Modx Rev 2.0.7 (old, I know, I plan to upgrade once I get this working first...) running on an IIS 6 (Win Server 2003) box with MySql 5.1.44 (I think) and PHP 5.3.2 (again, I think). The site was running fine overall, but I recently rebuilt the server onto a Win 2008 R2 (IIS 7.5) base and am having some issues. I followed the documented procedure for moving to a new server. Database was copied over, and an upgrade run with the Modx 2.0.7 setup to "firm things up" as the documentation puts it. 500 error upon hitting the install button...

    The good news is the public side of the site is 100% a-OK, and I can even log into the manager. I am sure this was helped by the site path on the server itself not changing. I even got a web.config setup with URL rewriting working nicely with Friendly URLS (a lot easier than I was anticipating!) However, the manager home page is messed up. The normal layout that is. The "news" feed stuff is merely listed down the screen. The resources list is not there. See attached file for a partial screenshot. The "logout" button does nothing. Clicking on say the "package management" link in the menu bar results in an empty content page (this is true for other links there too).

    Thinking that it might just be an issue with the migration, I tried a completely FRESH installation of 2.0.7 on a sub-domain in a different folder, using a new user and database. All pre-checks checked out fine, but again, after hitting the install button, a 500 error is shown. Again, I can actually log into the manager though, with the same behavior described for the real site.

    Any thoughts? Can't really do anything with things in this state.

    The new server's important information:
    Windows Server 2008 R2 SP1
    IIS 7.5
    PHP 5.4.10 installed as Fast-CGI
    MYSQL 5.5.28

    Appreciate any help!

    This question has been answered by madmattd. See the first response.

      • 3749
      • 24,544 Posts
      It sounds like some of the CSS and JS files are not being loaded. That could be the result of not running Setup, which would probably have corrected the paths. If you do a View Source on the Manager page, it should tell you where MODX is looking for them.

      Check the paths in the four config.core.php files:

       MODX root directory
       /manager/
       /connectors/
       /setup/includes/

      If one of those is wrong, fixing it might allow you to run Setup.

      Next, check the path in the modx_workspaces table in the DB.

      Finally, check all the paths and URLs in the core/config/config.inc.php file.

      Under Apache, 500 errors in Setup usually come from the .htaccess file. I'm not sure what that means for IIS. There are also a few plugins that will crash Setup, so you could try disabling them in the DB.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 17897
        • 46 Posts
        Quote from: BobRay at Jan 27, 2013, 03:36 AM
        It sounds like some of the CSS and JS files are not being loaded. That could be the result of not running Setup, which would probably have corrected the paths. If you do a View Source on the Manager page, it should tell you where MODX is looking for them.

        Check the paths in the four config.core.php files:

         MODX root directory
         /manager/
         /connectors/
         /setup/includes/

        If one of those is wrong, fixing it might allow you to run Setup.

        Next, check the path in the modx_workspaces table in the DB.

        Finally, check all the paths and URLs in the core/config/config.inc.php file.

        Under Apache, 500 errors in Setup usually come from the .htaccess file. I'm not sure what that means for IIS. There are also a few plugins that will crash Setup, so you could try disabling them in the DB.


        I appreciate the fast response BobRay, though I'm not sure how bad paths apply to a fresh installation, as my understanding is that the paths are built during the installation (I could see that being a problem for the migrated install which is why I was careful not to change where the files were put on the rebuilt system). But, I checked, and the paths for the NEW installation (for now I'm going to ignore the production site, as the same problems are applying in a brand-new installation, I'm hoping fixing on the new will help me fix the production.)

        The paths are ([PATH_TO_SITE] is the Windows folder the site is pointed to):
        modx_workspaces: [PATH_TO_SITE]/core
        [PATH_TO_SITE]/config.core.php: <?php define('MODX_CORE_PATH', dirname(__FILE__) . '/core/'); define('MODX_CONFIG_KEY', 'config');
        [PATH_TO_SITE]/manager/config.core.php: <?php define('MODX_CORE_PATH', dirname(dirname(__FILE__)) . '/core/'); define('MODX_CONFIG_KEY', 'config');
        [PATH_TO_SITE]/connectors/config.core.php: <?php define('MODX_CORE_PATH', dirname(dirname(__FILE__)) . '/core/'); define('MODX_CONFIG_KEY', 'config');
        [PATH_TO_SITE]/setup/includes/config.core.php: <?php define ('MODX_CORE_PATH', MODX_INSTALL_PATH . 'core/'); define ('MODX_CONFIG_KEY', 'config'); define ('MODX_SETUP_KEY', '@traditional@');


        That all looks correct to me. (Incidentally, all is showing the same, albeit with a different-and correct- PATH_TO_SITE, for the production site).

        As to the View Source, all looks to be correct there too. Here is the head section of the Manager Home Page:
        <title>MODx :: MODx Revolution</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        
        <link rel="stylesheet" type="text/css" href="/manager/assets/ext3/resources/css/ext-all-notheme-min.css" />
        <link rel="stylesheet" type="text/css" href="/manager/templates/default/css/modx-min.css" />
        
        <script src="/manager/assets/ext3/adapter/ext/ext-base.js" type="text/javascript"></script>
        <script src="/manager/assets/ext3/ext-all.js" type="text/javascript"></script>
        <script src="/manager/assets/modext/build/core/modx-min.js" type="text/javascript"></script>
        <script src="/connectors/lang.js.php?ctx=mgr&topic=topmenu,file,resource,welcome,configcheck&action=" type="text/javascript"></script>
        <script src="/connectors/layout/modx.config.js.php?action=&wctx=mgr" type="text/javascript"></script>
        
        <script type="text/javascript" src="/manager/assets/modext/modext-min.js?v=207pl"></script>
        <script type="text/javascript" src="/manager/assets/modext/build/core/modx.layout-min.js?v=207pl"></script>
        <script type="text/javascript">Ext.onReady(function() {
            MODx.load({xtype: "modx-layout",accordionPanels: MODx.accordionPanels || [],auth: "modx5101f385941319.68657121"});
        });</script>
        <script type="text/javascript" src="/manager/assets/modext/build/widgets/modx.panel.welcome-min.js?v=207pl"></script>
        <script type="text/javascript" src="/manager/assets/modext/build/widgets/security/modx.grid.user.recent.resource-min.js?v=207pl"></script>
        <script type="text/javascript" src="/manager/assets/modext/build/sections/welcome-min.js?v=207pl"></script>
        
        <script type="text/javascript">
        // <![CDATA[
        Ext.onReady(function() {
            MODx.hasViewDocument = "1";
            MODx.hasViewUser = "1";
            MODx.load({
                xtype: "modx-page-welcome"
                ,site_name: "MODx Revolution"
                ,displayConfigCheck: true
                ,user: "1"
                ,newsEnabled: "1"
                ,securityEnabled: "1"
            });
        });
        // ]]>
        </script>
          • 3749
          • 24,544 Posts
          I understood you to say that Setup didn't complete. Maybe I misread your post.

          I don't claim to be an expert on MODX URL rewriting (especially for IIS), but I think the leading slash may be an issue, though I can't remember how to fix that. All my non-MODX-cloud sites are at Bluehost, where I just install them and they work: http://bit.ly/Hb5CAY.

          There used to be a forum thread here for IIS issues. I'm not sure if it still exists, but I'm sure you'd get better help there if it does.

            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 17897
            • 46 Posts
            In the case of the fresh installation, there are no friendly URLS on yet.

            I think I am confusing things with 2 different questions, my apologies. Perhaps ignore everything I said earlier about the production site and just look at this:

            - Fresh install on the server:
            Windows Server 2008 R2 SP1
            IIS 7.5
            PHP 5.4.10 installed as Fast-CGI
            MYSQL 5.5.28
            - New MYSQL user with full control of an empty DB.
            - all pre-install checks come up green (IUSR has write permissions to entire site, with the intent to lock things down after the install - Windows seems to behave better with the install this way in the past)
            - clicking on "install" generates a 500 error after a couple second delay (consistent with a script executing a fair amount of stuff)
            - I can actually log into the manager at this point, but the manager looks wrong per above screenshot
            - Further, clicking any of the other menu items (aside from "home" which returns to this broken home page fine) seems to generate a blank content page
            - tables have been written to the database, everything to my limited knowledge appears correct with the files

            I have used the IIS forum in the past, it no longer seems to be present here though sadly. Or I'm blind and can't find it (totally possible!). I've installed several cases of ModX before on IIS, just it was IIS 6 (Win 2003) and it worked fine.

            I appreciate the help BobRay, this one has been bugging me for a while and I ran out of ideas on what to check. Hopefully you or someone else here can point me in the right direction.
            • My guess is, unless you can turn on the FastCGI debugging/logging to prove otherwise, you do not have the appropriate permissions on the files still. In my experience, I could never get IIS 7.5 to work in a setup like this without running it from the public user directory on my Windows VM. This was at a Microsoft sponsored event where I had the engineer responsible for PHP in IIS working directly with me, and we could not get it to work.

              That said, minify may be the only thing causing real problems here, as it seems to have problems with virtual directories on IIS. Do you have access to any error logs with more detail?
                • 17897
                • 46 Posts
                It well may be permissions, who ever knows with Windows...I've been looking through the forums here to check on proper permissions, I've yet to find a clear answer aside from people saying they get it working...more digging in order.

                I have full RDP access to the server. I deleted the DB and user, and recreated the same, running setup to generate a clean set of log hits. Here are the site logs (with my IP removed):

                #Software: Microsoft Internet Information Services 7.5
                #Version: 1.0
                #Date: 2013-01-28 23:08:04
                #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
                2013-01-28 23:08:04 192.168.127.1 GET / - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 1794
                2013-01-28 23:08:04 192.168.127.1 GET /favicon.ico - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 404 0 2 93
                2013-01-28 23:08:04 192.168.127.1 GET /favicon.ico - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 404 0 2 296
                2013-01-28 23:08:10 192.168.127.1 GET /setup/ - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 124
                2013-01-28 23:08:10 192.168.127.1 GET /setup/index.php s=set 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 514
                2013-01-28 23:08:10 192.168.127.1 GET /setup/assets/css/reset.css - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 93
                2013-01-28 23:08:10 192.168.127.1 GET /setup/assets/css/text.css - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 109
                2013-01-28 23:08:10 192.168.127.1 GET /setup/assets/css/print.css - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 187
                2013-01-28 23:08:11 192.168.127.1 GET /setup/assets/js/modx.setup.js - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 343
                2013-01-28 23:08:11 192.168.127.1 GET /setup/assets/css/960.css - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 546
                2013-01-28 23:08:11 192.168.127.1 GET /setup/assets/css/style.css - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 733
                2013-01-28 23:08:11 192.168.127.1 GET /setup/assets/css/layout.css - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 561
                2013-01-28 23:08:11 192.168.127.1 GET /setup/assets/modx.css - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 1419
                2013-01-28 23:08:12 192.168.127.1 GET /setup/assets/images/img_box.png - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 1466
                2013-01-28 23:08:12 192.168.127.1 GET /setup/assets/js/ext-core.js - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 2043
                2013-01-28 23:08:12 192.168.127.1 GET /setup/assets/images/header_background.png - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 218
                2013-01-28 23:08:12 192.168.127.1 GET /setup/assets/images/meta_separator.gif - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 499
                2013-01-28 23:08:13 192.168.127.1 GET /setup/assets/images/img_splash.gif - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 2215
                2013-01-28 23:08:13 192.168.127.1 GET /setup/assets/images/footer_fold_top.jpg - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 592
                2013-01-28 23:08:13 192.168.127.1 GET /setup/assets/images/modx_logo_header.png - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 780
                2013-01-28 23:08:13 192.168.127.1 GET /setup/assets/images/footer_fold_bottom.jpg - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 889
                2013-01-28 23:08:14 192.168.127.1 POST /setup/index.php - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 302 0 0 109
                2013-01-28 23:08:14 192.168.127.1 GET /setup/index.php action=welcome 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 234
                2013-01-28 23:08:16 192.168.127.1 GET /setup/assets/js/sections/welcome.js - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 1341
                2013-01-28 23:08:16 192.168.127.1 POST /setup/index.php action=welcome 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 302 0 0 93
                2013-01-28 23:08:17 192.168.127.1 GET /setup/assets/images/im_new_inst.gif - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 109
                2013-01-28 23:08:17 192.168.127.1 GET /setup/assets/images/im_inst_upgrade.gif - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 93
                2013-01-28 23:08:17 192.168.127.1 GET /setup/index.php action=options 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 780
                2013-01-28 23:08:21 192.168.127.1 POST /setup/index.php action=options 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 302 0 0 109
                2013-01-28 23:08:21 192.168.127.1 GET /setup/index.php action=database 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 327
                2013-01-28 23:08:21 192.168.127.1 GET /setup/assets/js/sections/database.js - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 358
                2013-01-28 23:08:58 192.168.127.1 POST /setup/processors/connector.php - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 2433
                2013-01-28 23:14:38 192.168.127.1 POST /setup/processors/connector.php - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 1372
                2013-01-28 23:14:52 192.168.127.1 POST /setup/index.php action=database 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 302 0 0 1294
                2013-01-28 23:14:53 192.168.127.1 GET /setup/index.php action=summary 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 1357
                2013-01-28 23:14:53 192.168.127.1 GET /setup/assets/js/sections/summary.js - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 218
                2013-01-28 23:14:53 192.168.127.1 GET /setup/assets/images/icon_ok.gif - 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 200 0 0 280
                2013-01-28 23:14:56 192.168.127.1 POST /setup/index.php action=summary 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 302 0 0 93
                2013-01-28 23:15:04 192.168.127.1 GET /setup/index.php action=install 80 - MY_IP_REMOVED Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:18.0)+Gecko/20100101+Firefox/18.0 500 0 0 7909
                


                That is just from the install procedure. 500 error is at the end. I'm not good at reading these logs, but I don't see much useful except it is failing on the install procedure (not shockingly...). Is there some other sort of log I should be looking at?

                Not sure if it helps, but I installed PHP using the distributable from the PHP site, not the Microsoft Web Platform Installer variant.
                  • 17897
                  • 46 Posts
                  All right, the plot thickens.

                  I haven't had much time to work on this, which is a problem since I need to make some changes to the website, but since I'd not gotten any tips here, I had nowhere to go.

                  BUT, on a whim I decided to try a clean install of the current version of Revo (2.2.6). Installed perfectly (once I added write permissions to the core/packages directory so the install could unzip the zip file there). Manager looks correct (albeit different from the 2.0.7 version I am familiar with. I assume just visual overhaul, as nothing looked broken).


                  SO, is there anything I need to know about upgrading from 2.0.7 to 2.2.6, and can I do it without having to log into the 2.0.7 manager first? If I can do this upgrade (which I will test on a test site first of course), I think I'll be good to go.
                  • discuss.answer
                    • 17897
                    • 46 Posts
                    Well I went for it since I seemed to have no option. After a mostly-successful upgrade on a copy of the site I did it on the main site and all went fine (most of my packages were current as of December so they came through the change fine).

                    My main suspect for the problems is that in the server change, PHP was upgraded from 5.3.x to 5.4.x (I think it was 5.3, there is a small chance it was 5.2).

                    For installing ModX 2.2.6, the permissions I got to work were:
                    IUSR: Modify, Read & Execute, List Folder Contents, Write
                    for the entire site directory. Then I just stripped it back to Read&Execute and List Folder Contents for the core/core.config.php file after the install. Giving these rights to only the core/config, core/cache, and core/packages directories permitted an installation just fine, but several other directories needed write access for package installation, so I gave write/modify access to the whole site.

                    No problems thus far, except one (out of roughly 200) of my old resources generates a 500 error when viewed on the front end (the "blog" home page, which was built using a tutorial here a while back - SplittingRed's perhaps). I'll track that one down, probably something that changed along the way.

                    I'm still not completely sure why the 2.0.7 version would not install cleanly, but whatever, I can manage the site again, and it's on 2.2.6 to boot.


                    OPENGEEK: perhaps this helps somehow? I could write up a short how-to that worked for me, though the above was the heart of it. Perhaps 2.0.7 doesn't work with PHP 5.4 for some reason? [ed. note: madmattd last edited this post 11 years, 2 months ago.]