We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34722
    • 8 Posts
    Hi

    Im working on my first modx site and have run into problems moving the site from the virtual server to the remote. Im using a temporary url at the moment as the old site is still running...

    Web server:
    Server: Localhost via UNIX socket
    Server version: 5.1.52
    Protocol version: 10
    User: client@localhost
    MySQL charset: UTF-8 Unicode (utf8)
    Database:
    MySQL client version: 5.1.52
    PHP extension: mysql
    phpMyAdmin:
    Version information: 3.3.9.2
    Using: Modx revolution 2.0.7-pl - downloaded it early January.



    Following the info in this link http://rtfm.modx.com/display/revolution20/Moving+Your+Site+to+a+New+Server#

    Cleared the cache and turned off friendly urls and exported and imported the sql database using phpmyadmin and cpanel.

    Ftp all the files to the remote server - assets etc.

    NEXT -Updated Config Files
    Followed all this..

    Once you’ve deployed files to the new server, you need to update the main configuration file: core/config/config.inc.php. You have to update paths to 6 different resources. Open the file and update the values for the following variables doing a find and replace:

    *****My path is /home/client/public_html/core/
    /home/client/public_html/core/model/modx/processors/ etc. etc.******


    /* PATHS */
    $modx_core_path= ’/path/to/modx_doc_root/core/’;
    $modx_processors_path= ’/path/to/modx_doc_root/core/model/modx/processors/’;
    $modx_connectors_path= ’/path/to/modx_doc_root/connectors/’;
    $modx_manager_path= ’/path/to/modx_doc_root/manager/’;
    $modx_base_path= ’/path/to/modx_doc_root/’;
    $modx_assets_path= ’/path/to/modx_doc_root/assets/’;

    /* HOST (used for command-line PHP stuff) */
    $http_host=’yoursite.com’; ****Im on a temporary url so used ’50.22.131.93’ IP address here******
    If you are also moving your site into or out of a subfolder, be sure to update the variables such as $modx_connectors_url, $modx_manager_url, and $modx_base_url. They should generally
    end with a slash (e.g., $modx_base_url=’/’ for a site not in a subfolder).

    *****I used /~client/ here as Im using a temporary url and that is the username*****

    Permissions
    Before you can edit your config file, you may need to loosen up the permissions. After you’ve edited it, be sure you restore the read-only permissions on the file.
    There are also 3 additional configuration files that contain two PHP constants:
    define(’MODX_CORE_PATH’, ’/path/to/modx_doc_root/core/’);

    ******Changed the same paths again /home/client/public_html/core/******

    define(’MODX_CONFIG_KEY’, ’config’);
    /config.core.php
    /connectors/config.core.php
    /manager/config.core.php
    Make sure you update the paths in these files as well.


    *****I also updated the database with the path I used earlier using the search in phpmyadmin******

    UPDATE `your_revo_db`.`workspaces` SET path=’/path/to/modx_doc_root/core/’ WHERE id=’1’;



    My changes: `client_modx1`. `modx_workspaces` SET path=’/home/client/public_html/core/ WHERE id=’1’;

    I also edited the .htaccess file with info connecting to the temporary url, this is what Im putting into browser to test http://50.22.131.93/~client/

    Used the info from this post for temporary urls:

    # Friendly URLs Part
    RewriteEngine On
    RewriteBase /~client/
    RewriteCond %{HTTP_HOST} .
    # Force all pages to go to www.domain.com for SEO
    RewriteCond %{HTTP_HOST} !^XX.XXX.XX.XXX[NC]
    RewriteRule (.*) XX.XXX.XX.XXX/$1 [R=301,L]
    # Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    # Additional Settings Follow
    # ExpiresActive On
    # ExpiresByType image/gif A2592000
    # ExpiresByType image/jpeg A2592000
    # ExpiresByType image/png A2592000
    # BrowserMatch "MSIE" brokenvary=1
    # BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
    # BrowserMatch "Opera" !brokenvary
    # SetEnvIf brokenvary 1 force-no-vary


    I was getting a error 404 last week, changed a few things then got a white blank page and now Im error 503 site temporarily unavailable.

    When I test /manager

    I get

    Warning: include_once(/home/client/public_html/home/client/public_html/core/model/modx/modx.class.php) [function.include-once]: failed to open stream: No such file or directory in /home/client/public_html/manager/index.php on line 47

    Warning: include_once() [function.include]: Failed opening ’/home/client/public_html/home/client/public_html/core/model/modx/modx.class.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/client/public_html/manager/index.php on line 47

    Warning: include(/home/wright/public_html/home/client/public_html/core/error/unavailable.include.php) [function.include]: failed to open stream: No such file or directory in /home/client/public_html/manager/index.php on line 48

    Warning: include() [function.include]: Failed opening ’/home/client/public_html/home/client/public_html/core/error/unavailable.include.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/client/public_html/manager/index.php on line 48
    Site temporarily unavailable!


    Any ideas would be great.

    Thanks
    D
      • 34722
      • 8 Posts
      Hi

      Ive now managed to get into the manager by changing the paths but now getting a message-

      Could not find action file at: /Applications/MAMP/htdocs/modx/manager/controllers/default/welcome.php

      I tried clearing the cache and no change, I look at another message on forum about clearing it manually but not want to mess up anything MORE!!! smiley it also says in a message below, change permissions to 777 how do u do this?
      Clearing all the contents of the cache folder gave some errors on the site and a few things didn’t work but then I thought about your other part of the post. Uploading to the new server changed the folder permission of core/cache to 775. So changing that and everything in it to 777 let me back into manager and then clearing cache once again and flushing permissions got everything running great again. Thanks for your help.

      Thanks
      D
        • 34722
        • 8 Posts
        Trying changing permissions to 0777 but no change.

        Any ideas?
          • 22303 MODX Staff
          • 10,725 Posts
          I think you’ll have to manually set the _url paths in your config.inc.php file to include the /~client/ part. I think your Apache configuration is not properly reporting the HTTP_HOST and path, which are auto-determined during setup. Other folks have reported similar issues, but it should work if you set the *_url variables in the config properly. You will have to manually change this when you change the server configuration with an actual domain which points to your site.
            • 34722
            • 8 Posts
            Hi

            I tried that last week, did help as in I can see manager but everything is blank .. no resources etc. Gona try rerunning setup now. Not sure if it will benefit...

            D
              • 34722
              • 8 Posts
              YEAH!!!!!!!!!!!!!!!!!!!!!!!!!!

              I got it working smiley Everything apart from the gallery sections but Il look into that..It has been a long few weeks. Any ideas why the gallery component not showing up?

              Thanks

              D

                • 42517
                • 9 Posts
                Quote from: dmccar at May 22, 2011, 02:04 PM
                Hi

                Ive now managed to get into the manager by changing the paths -


                Could you tell me what you changed in the paths? What was wrong with the ones you had? I'm having the exact same problem.
                I've been staring at my config.core.php and my config.inc.php files for days now and I just can't see anything wrong with the file paths I've specified.


                  • 42517
                  • 9 Posts
                  I've been struggling with this for days now.

                  I'm almost certain I've done this properly, but just in case, is this what it should look like:

                  ****config.inc.php****

                  if (!defined('MODX_CORE_PATH')) {
                  $modx_core_path= '/content/Hosting/p/e/myDomain.ie/web/core/';
                  define('MODX_CORE_PATH', $modx_core_path);
                  }
                  if (!defined('MODX_PROCESSORS_PATH')) {
                  $modx_processors_path= '/content/Hosting/p/e/myDomain.ie/web/core/model/modx/processors/';
                  define('MODX_PROCESSORS_PATH', $modx_processors_path);
                  }
                  if (!defined('MODX_CONNECTORS_PATH')) {
                  $modx_connectors_path= '/content/Hosting/p/e/myDomain.ie/web/connectors/';
                  $modx_connectors_url= '/connectors/';
                  define('MODX_CONNECTORS_PATH', $modx_connectors_path);
                  define('MODX_CONNECTORS_URL', $modx_connectors_url);
                  }
                  if (!defined('MODX_MANAGER_PATH')) {
                  $modx_manager_path= '/content/Hosting/p/e/myDomain.ie/web/manager/';
                  $modx_manager_url= '/manager/';
                  define('MODX_MANAGER_PATH', $modx_manager_path);
                  define('MODX_MANAGER_URL', $modx_manager_url);
                  }
                  if (!defined('MODX_BASE_PATH')) {
                  $modx_base_path= '/content/Hosting/p/e/myDomain.ie/web/';
                  $modx_base_url= '/';
                  define('MODX_BASE_PATH', $modx_base_path);
                  define('MODX_BASE_URL', $modx_base_url);
                  }

                  ......

                  if (!defined('MODX_ASSETS_PATH')) {
                  $modx_assets_path= '/content/Hosting/p/e/myDomain.ie/web/assets/';
                  $modx_assets_url= '/assets/';
                  define('MODX_ASSETS_PATH', $modx_assets_path);
                  define('MODX_ASSETS_URL', $modx_assets_url);
                  }


                  *****config.core.php*****
                  *****This is the same for all three config.core.php files*****

                  <?php
                  define('MODX_CORE_PATH', '/content/Hosting/p/e/peopleandculture.ie/web/core/');
                  define('MODX_CONFIG_KEY', 'config');
                  ?>


                  My error log shows these errors:

                  PHP Warning: include_once(/content/Hosting/p/e/myDomain.ie/web/core/model/modx/modx.class.php): failed to open stream: No such file or directory in /content/sites/p/e/myDomain.ie/web/manager/index.php on line 50

                  PHP Warning: include_once(): Failed opening '/content/Hosting/p/e/myDomain.ie/web/core/model/modx/modx.class.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /content/sites/p/e/myDomain.ie/web/manager/index.php on line 50

                  PHP Warning: include(/content/Hosting/p/e/myDomain.ie/web/core/error/unavailable.include.php): failed to open stream: No such file or directory in /content/sites/p/e/myDomain.ie/web/manager/index.php on line 51

                  PHP Warning: include(): Failed opening '/content/Hosting/p/e/myDomain.ie/web/core/error/unavailable.include.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /content/sites/p/e/myDomain.ie/web/manager/index.php on line 51


                  I'm having the exact same problem as OP. The files are uploaded to the server, database is imported and it's path is set, .htaccess is in order. The site shows up fine on the browser, but if I go to manager I get "site temporarily unavailable".

                  This is the code that seems to be failing.

                  /* include the modX class */
                  if (!(include_once MODX_CORE_PATH . 'model/modx/modx.class.php')) {
                  include MODX_CORE_PATH . 'error/unavailable.include.php';
                  die('Site temporarily unavailable!');
                  }

                  Any help you could give me would be great. I'm at my wits end with this.

                  Thanks
                    • 3749
                    • 24,544 Posts
                    It looks like your files are actually in

                    /content/sites/p/e/myDomain.ie/web/manager/index.php


                    but your config is set to

                    /content/Hosting/p/e/myDomain.ie/web/manager/index.php
                      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
                      • 42517
                      • 9 Posts
                      Yeah. I see that now.

                      The hosting company sent me the path-files specifically:

                      Additional Information for Developers
                      ---------------------------------------
                      The full path to the document root of your website is
                      /content/Hosting/p/e/mydomain.ie/web


                      I never considered that that could be wrong.

                      However, now I'm not getting access to their FTP. I'll let you know the outcome as soon as I get in.