We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30889
    • 29 Posts
    Well I am almost finished my first MODx site.

    Deploying problems now exist.

    I’ve uploaded the site and it worked for a brief moment and then the following:

    « Execution of a query to the database failed - Table ’steveb_medgard1.modx_site_templates’ doesn’t exist »

    It should be looking for ’steveb_modxmg.modx_site_templates’. Somewhere it switches databases. I know I make use of the other database for listing the catalogue on pages and then I switch back using mysql_select_db(’modxmg’);

    This problem did not exist on the development server. So I am not sure where things have changed.

    Any ideas or pointers?
      • 30889
      • 29 Posts
      I think I may have worked out what has happened, I am not sure though.

      It appears that I made a change to the Resource Path and Resource URL which cause the problem but I can set it back to what it was before to fix it because it makes no difference to the outcome. This may have affected the cache because a browser restart has let the front end to work.

      On the manager side if I try to modify Snippets in the manager I now receive:

      Forbidden
      You don’t have permission to access /modx/manager/index.php on this server.

      Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

      Apart from the changes specified in the "moving sites" documentation and wiki I have not made any others.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        1. Are you sure the manager/includes/config.inc.php file has the correct settings?

        2. Did you upload the original install folder and run the installer in upgrade mode?

        3. See this: http://wiki.modxcms.com/index.php/What_is_mod_security_and_how_does_it_affect_me
          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
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: Tybek at Feb 24, 2008, 09:58 PM

          It should be looking for ’steveb_modxmg.modx_site_templates’. Somewhere it switches databases. I know I make use of the other database for listing the catalogue on pages and then I switch back using mysql_select_db(’modxmg’);
          This is why I use PDO now (or xPDO) to connect to a database. All this shenanigans with the traditional php database extensions and maintaining connections and changing databases makes me crazy. I maintain a connection to one PDO object for each database I connect to and all is well with the world.

          Quote from: Tybek at Feb 24, 2008, 10:34 PM

          It appears that I made a change to the Resource Path and Resource URL which cause the problem but I can set it back to what it was before to fix it because it makes no difference to the outcome. This may have affected the cache because a browser restart has let the front end to work.
          You should run the installer in upgrade mode anytime you change servers to make sure the cache is cleared. This has always been a pain point for me, but 0.9.7 will solve this as you can simply not migrate the cache files and it will work fine, unlike the current implementation.

          Quote from: Tybek at Feb 24, 2008, 10:34 PM

          On the manager side if I try to modify Snippets in the manager I now receive:

          Forbidden
          You don’t have permission to access /modx/manager/index.php on this server.

          Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
          Sounds like mod_security intercepting the request. It likes to do that if PHP or JS code is found. You can turn it off in the htaccess file in the manager directory. There are a number of posts covering how to do this (and a wiki entry as well). A quick search should turn them up.

          Susan’s too quick for me... smiley
            • 30889
            • 29 Posts
            Thankyou for the link. The following in .htaccess worked.

            SecFilterEngine On
            SecFilterSelective "REQUEST_URI" "/manager/index.php" "allow,nolog"
            SecFilterScanPOST Off