We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16899
    • 284 Posts
    Quote from: thapriest86 at Dec 06, 2012, 01:49 PM
    It's on localhost and tried already. Replacing new config file with the old one seems to work. But, it's quite the coincidence that Legues and i get exactly the same errors after upgrading.

    True!!! smiley
      • 16899
      • 284 Posts
      Quote from: legues at Dec 06, 2012, 04:33 PM
      Quote from: thapriest86 at Dec 06, 2012, 01:49 PM
      It's on localhost and tried already. Replacing new config file with the old one seems to work. But, it's quite the coincidence that Legues and i get exactly the same errors after upgrading.

      True!!! smiley

      I tried do a clean install on Windows XP, and i have the same error again, on Windows Vista, Modx runs normally!!! How can i solve this?
        • 40092
        • 265 Posts
        PRoblem is that it doesn't fully or correctly write the config.inc.php file.
        What i did to fix is simply took a configured config.onc file from a fresh install i had somewhere else and changed it to work with the one that gave errors.
          • 16899
          • 284 Posts
          Quote from: thapriest86 at Dec 07, 2012, 04:18 AM
          PRoblem is that it doesn't fully or correctly write the config.inc.php file.
          What i did to fix is simply took a configured config.onc file from a fresh install i had somewhere else and changed it to work with the one that gave errors.

          Could you share with me your config... because here i haven´t a fresh good install!!!
            • 40092
            • 265 Posts
            Change database_name and yourdir to your own ;-)

            <?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);
            }
            
            
              • 16899
              • 284 Posts
              Thanks a lot!!! smiley But at home, i did a fresh install with the new confi file and it´s working!!! Here i just used the "old" config file and it works like a charm!! Is this a bug or something like that?
                • 40092
                • 265 Posts
                Did the same here. Fresh install works, upgrade fails. I don't know if this is a bug, since i've seen no reports of others having the same problems.
                  • 42365
                  • 6 Posts
                  Quote from: thapriest86 at Dec 07, 2012, 04:42 AM
                  Did the same here. Fresh install works, upgrade fails. I don't know if this is a bug, since i've seen no reports of others having the same problems.

                  https://forums.modx.com/thread/81235/revo-2-2-6---after-installation-error-500
                    • 3232
                    • 380 Posts
                    I get this type of error often when I am upgrading, I have found that if I download the zip in chrome, it always gets this parse error. If I download the same package in Safari, the install goes without an issue and there are no 500 errors.

                    Hopefully this helps someone else.
                      • 22303 MODX Staff
                      • 10,725 Posts
                      FWIW, I always download using Chrome on OS X and have never had this problem.