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

    I did an upgrade from Modx Rev 2.2.5 to 2.2.6... and now i´m having this strange error!! How can i solve this situation?
    I checked th core/config file and it seems that happened some changes there in this new version.

    Parse error: syntax error, unexpected '{' in C:\Program Files\EasyPHP-12.1\www\mysite\core\config\config.inc.php on line 13


    I also tried a fresh instalation and i had the same error!!!

    I´m running Modx with :

    • EasyPHP 12.1
    • Apache 2.4.2
    • MySQL 5.5.27
    • PHP 5.4.6

    Does anyone had the same problem?

    Many thanks in advance [ed. note: legues last edited this post 13 years, 9 months ago.]
      • 40092
      • 265 Posts
      Could you post config.inc.php ?
        • 16899
        • 284 Posts
        Quote from: thapriest86 at Dec 06, 2012, 05:30 AM
        Could you post config.inc.php ?

        Yes!! smiley

        <?php
        /**
         *  MODX Configuration file
         */
        $database_type = '{database_type}';
        $database_server = '{database_server}';
        $database_user = '{database_user}';
        $database_password = '{database_password}';
        $database_connection_charset = '{database_connection_charset}';
        $dbase = '{dbase}';
        $table_prefix = '{table_prefix}';
        $database_dsn = '{database_dsn}';
        $config_options = {config_options};
        $driver_options = {driver_options};
        
        $lastInstallTime = 1354792014;
        
        $site_id = 'modx50c07c4e4fd260.13808784';
        $site_sessionname = '{site_sessionname}';
        $https_port = '{https_port}';
        $uuid = '65e6f291-e453-4eb7-883d-83e5e4231369';
        
        if (!defined('MODX_CORE_PATH')) {
            $modx_core_path= '{core_path}';
            define('MODX_CORE_PATH', $modx_core_path);
        }
        if (!defined('MODX_PROCESSORS_PATH')) {
            $modx_processors_path= '{processors_path}';
            define('MODX_PROCESSORS_PATH', $modx_processors_path);
        }
        if (!defined('MODX_CONNECTORS_PATH')) {
            $modx_connectors_path= '{connectors_path}';
            $modx_connectors_url= '{connectors_url}';
            define('MODX_CONNECTORS_PATH', $modx_connectors_path);
            define('MODX_CONNECTORS_URL', $modx_connectors_url);
        }
        if (!defined('MODX_MANAGER_PATH')) {
            $modx_manager_path= '{mgr_path}';
            $modx_manager_url= '{mgr_url}';
            define('MODX_MANAGER_PATH', $modx_manager_path);
            define('MODX_MANAGER_URL', $modx_manager_url);
        }
        if (!defined('MODX_BASE_PATH')) {
            $modx_base_path= '{web_path}';
            $modx_base_url= '{web_url}';
            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='{http_host}';
                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= '{assets_path}';
            $modx_assets_url= '{assets_url}';
            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= {cache_disabled};
            define('MODX_CACHE_DISABLED', $modx_cache_disabled);
        }
        
        
          • 40092
          • 265 Posts
          Try this one:

          <?php
          /**
           *  MODX Configuration file
           */
          $database_type = '{database_type}';
          $database_server = '{database_server}';
          $database_user = '{database_user}';
          $database_password = '{database_password}';
          $database_connection_charset = '{database_connection_charset}';
          $dbase = '{dbase}';
          $table_prefix = '{table_prefix}';
          $database_dsn = '{database_dsn}';
          $config_options = '{config_options}';
          $driver_options = '{driver_options}';
           
          $lastInstallTime = 1354792014;
           
          $site_id = 'modx50c07c4e4fd260.13808784';
          $site_sessionname = '{site_sessionname}';
          $https_port = '{https_port}';
          $uuid = '65e6f291-e453-4eb7-883d-83e5e4231369';
           
          if (!defined('MODX_CORE_PATH')) {
              $modx_core_path= '{core_path}';
              define('MODX_CORE_PATH', $modx_core_path);
          }
          if (!defined('MODX_PROCESSORS_PATH')) {
              $modx_processors_path= '{processors_path}';
              define('MODX_PROCESSORS_PATH', $modx_processors_path);
          }
          if (!defined('MODX_CONNECTORS_PATH')) {
              $modx_connectors_path= '{connectors_path}';
              $modx_connectors_url= '{connectors_url}';
              define('MODX_CONNECTORS_PATH', $modx_connectors_path);
              define('MODX_CONNECTORS_URL', $modx_connectors_url);
          }
          if (!defined('MODX_MANAGER_PATH')) {
              $modx_manager_path= '{mgr_path}';
              $modx_manager_url= '{mgr_url}';
              define('MODX_MANAGER_PATH', $modx_manager_path);
              define('MODX_MANAGER_URL', $modx_manager_url);
          }
          if (!defined('MODX_BASE_PATH')) {
              $modx_base_path= '{web_path}';
              $modx_base_url= '{web_url}';
              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='{http_host}';
                  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= '{assets_path}';
              $modx_assets_url= '{assets_url}';
              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= {cache_disabled};
              define('MODX_CACHE_DISABLED', $modx_cache_disabled);
          }
          ?>
            • 16899
            • 284 Posts
            To be honest i did that before this post... but i had this error: smiley

            Parse error: syntax error, unexpected '{' in C:\Program Files\EasyPHP-12.1\www\mysite\core\config\config.inc.php on line 89

              • 40092
              • 265 Posts
              Same change goes voor line 89 ;-)

              Change it to:
              $modx_cache_disabled= '{cache_disabled}';
                • 16899
                • 284 Posts
                Now i have this error!!! LOL
                Fatal error: Class 'xPDODriver_' not found in C:\Program Files\EasyPHP-12.1\www\mysite\core\xpdo\xpdo.class.php on line 1823



                The line on the xpdo file is

                $this->driver= new $driverClass ($this);
                  • 40092
                  • 265 Posts
                  Sniffing around a bit this usually is due to not fully uploaded folders.
                  Can you reupload them to make sure everythins is there?

                  Not a reinstall, but just adding missing files.
                    • 16899
                    • 284 Posts
                    I did again a fresh install and then i corrected the config file as you sugested and i have the last error again!!! sad
                      • 16899
                      • 284 Posts
                      Hummmmm... something weird with this version... i just installed the 2.2.5 again!!!!