We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48359
    • 22 Posts
    db is fine. I installed a fresh copy yesterday no probs..

    this is a russian site im trying to get to work locally and its a bloody nightmare. i cant find out where that darn slash is coming from - its stopping all the assets etc from loading. very frustrating!

      • 48359
      • 22 Posts
      if anyone is willing to teamviewer id be very delighted to see whats wrong - really. 3 days now in total with no luck.
        • 39404
        • 175 Posts
        stalemate resolution associate Reply #33, 12 years, 1 month ago
        fstarocka,

        Could you post the generated html for the page on both your live domain and local copy? That would probably be easier to troubleshoot...

        What you can do in the meantime, is in config.inc.php, you'll see this:

        if (!defined('MODX_BASE_PATH')) {
            $modx_base_path= 'C:/Program Files (x86)/wamp/www/lol/';
            $modx_base_url= '/lol';
            define('MODX_BASE_PATH', $modx_base_path);
            define('MODX_BASE_URL', $modx_base_url);
        }
        


        Your base url set in HTML would then show as:
        localhost/lol


        and your individual lines would show as:
        <link rel="stylesheet" type="text/css" href="/assets/templates/lol/styles/default.css" />


        Regards,
        Tom
          • 48359
          • 22 Posts
          also, is there a way to change the manager language? The live site is russian and i cannot get it to be english.. ive tried changing the lexicon settings.. does it require english language pack to be present or something or can this only be done during install?
            • 48359
            • 22 Posts
            the funny thing is if i click the link to the assets on the live site, it works - locally however dosnt until i remove the prefix slash and paste that into the address bar - then it works.. maybe a windows thing?
              • 39404
              • 175 Posts
              stalemate resolution associate Reply #36, 12 years, 1 month ago
              I think the common issue both you and I face is that we're taking non-windows sites trying to run locally on our windows machines. You're using xammp and I'm using wamp, but i bet that non-windows machines don't have a problem with extra forward slashes.

              I'm not sure about the manager language, I haven't needed to change manager languages, but I did find it in system settings under manager_language. I changed my manager to Russian and it worked.

              Regards,
              Tom
                • 48359
                • 22 Posts
                interesting - ill have a look at the manager lang thing. I doubt using linux/win makes a diff, the platform differences are all handled by the servers/OS - the php files/db stuff all works flwlessly between platforms as ive been developing that way for years.

                Theres def a catch in something - glad were both in the same boat here. If i manage anything ill buzz u asap. Just had a siesta on the couch - my brain was a bit frazzled.

                back in the chair now -
                  • 48359
                  • 22 Posts
                  ok - so i tracked down a config.inc.php for windows using a subfolder, changed it to my values and voila - its working.

                  Heres the code:

                  Kudos to thapriest86 here: https://forums.modx.com/thread/?thread=80952&page=3


                  <?php
                  /**
                  * MODX Configuration file
                  */
                  $database_type = 'mysql';
                  $database_server = 'localhost';
                  $database_user = 'root';
                  $database_password = '';
                  $database_connection_charset = 'utf8';
                  $dbase = 'database_name';
                  $table_prefix = 'modx_';
                  $database_dsn = 'mysql:host=localhost;dbname=database_name;charset=utf8';
                  $config_options = array (
                  );
                  $driver_options = array (
                  );

                  $lastInstallTime = 1354870776;

                  $site_id = 'modx50c1aff7f3e9e9.69739860';
                  $site_sessionname = 'SN50c1afb60590b';
                  $https_port = '443';
                  $uuid = 'd66020fb-456b-4a0c-a557-b3511af1f90f';

                  if (!defined('MODX_CORE_PATH')) {
                  $modx_core_path= 'C:/xampp/htdocs/yourdir/core/';
                  define('MODX_CORE_PATH', $modx_core_path);
                  }
                  if (!defined('MODX_PROCESSORS_PATH')) {
                  $modx_processors_path= 'C:/xampp/htdocs/yourdir/core/model/modx/processors/';
                  define('MODX_PROCESSORS_PATH', $modx_processors_path);
                  }
                  if (!defined('MODX_CONNECTORS_PATH')) {
                  $modx_connectors_path= 'C:/xampp/htdocs/yourdir/connectors/';
                  $modx_connectors_url= '/yourdir/connectors/';
                  define('MODX_CONNECTORS_PATH', $modx_connectors_path);
                  define('MODX_CONNECTORS_URL', $modx_connectors_url);
                  }
                  if (!defined('MODX_MANAGER_PATH')) {
                  $modx_manager_path= 'C:/xampp/htdocs/yourdir/manager/';
                  $modx_manager_url= '/yourdir/manager/';
                  define('MODX_MANAGER_PATH', $modx_manager_path);
                  define('MODX_MANAGER_URL', $modx_manager_url);
                  }
                  if (!defined('MODX_BASE_PATH')) {
                  $modx_base_path= 'C:/xampp/htdocs/yourdir/';
                  $modx_base_url= '/yourdir/';
                  define('MODX_BASE_PATH', $modx_base_path);
                  define('MODX_BASE_URL', $modx_base_url);
                  }
                  if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
                  $isSecureRequest = false;
                  } else {
                  $isSecureRequest = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port);
                  }
                  if (!defined('MODX_URL_SCHEME')) {
                  $url_scheme= $isSecureRequest ? 'https://' : 'http://';
                  define('MODX_URL_SCHEME', $url_scheme);
                  }
                  if (!defined('MODX_HTTP_HOST')) {
                  if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
                  $http_host='localhost';
                  define('MODX_HTTP_HOST', $http_host);
                  } else {
                  $http_host= $_SERVER['HTTP_HOST'];
                  if ($_SERVER['SERVER_PORT'] != 80) {
                  $http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
                  }
                  $http_host .= ($_SERVER['SERVER_PORT'] == 80 || $isSecureRequest) ? '' : ':' . $_SERVER['SERVER_PORT'];
                  define('MODX_HTTP_HOST', $http_host);
                  }
                  }
                  if (!defined('MODX_SITE_URL')) {
                  $site_url= $url_scheme . $http_host . MODX_BASE_URL;
                  define('MODX_SITE_URL', $site_url);
                  }
                  if (!defined('MODX_ASSETS_PATH')) {
                  $modx_assets_path= 'C:/xampp/htdocs/yourdir/assets/';
                  $modx_assets_url= '/yourdir/assets/';
                  define('MODX_ASSETS_PATH', $modx_assets_path);
                  define('MODX_ASSETS_URL', $modx_assets_url);
                  }
                  if (!defined('MODX_LOG_LEVEL_FATAL')) {
                  define('MODX_LOG_LEVEL_FATAL', 0);
                  define('MODX_LOG_LEVEL_ERROR', 1);
                  define('MODX_LOG_LEVEL_WARN', 2);
                  define('MODX_LOG_LEVEL_INFO', 3);
                  define('MODX_LOG_LEVEL_DEBUG', 4);
                  }
                  if (!defined('MODX_CACHE_DISABLED')) {
                  $modx_cache_disabled= false;
                  define('MODX_CACHE_DISABLED', $modx_cache_disabled);
                  }


                    • 3749
                    • 24,544 Posts
                    Check the xampp/apache/conf/httpd.conf file

                    Make sure that the following two lines are uncommented (remove the semicolon at the beginning of the line):

                    LoadModule rewrite_module
                    modules/mod_rewrite.so


                    Also, if you've removed or renamed the .htaccess file, make sure you turn off the use_friendly_urls system setting (in the modx_system_settings table in the DB if necessary).

                      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