We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8168
    • 1,118 Posts
    Hi, Trying a fresh install of Revo 2.3.5 on a server which I know supports it... But after first few steps of what looks like a successful install... I get a blank white screen (https://www.example.com/setup/index.php?action=options) with server error exposed in firebug.

    Looking in error log I get this

    PHP Parse error:  syntax error, unexpected '{' in /public_html/core/config/config.inc.php on line 13


    Any ideas on the issue???

    Looking at the actual core/config/config.inc.php file - all the variables at the top are not being set - e.g. it looks like this:

    $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};
    


    Note - I am installing on an https server... is that the issue?

    Cheers,

    dubbs. [ed. note: dubbs last edited this post 8 years, 8 months ago.]
      • 48589
      • 33 Posts
      Well, you only show 10 lines, where the issue is supposed to be on line 13.
      But... One thing that immediately stands out is the one at line 9 of what you've posted. Both config and driver options don't have the the quotes before and after it. That seems to be the issue. Try making it:

      $config_options = '{config_options}';
      $driver_options = '{driver_options}';
        • 8168
        • 1,118 Posts
        Quote from: dizero at Aug 12, 2015, 12:29 PM
        Well, you only show 10 lines, where the issue is supposed to be on line 13.
        But... One thing that immediately stands out is the one at line 9 of what you've posted. Both config and driver options don't have the the quotes before and after it. That seems to be the issue. Try making it:

        $config_options = '{config_options}';
        $driver_options = '{driver_options}';

        Thanks - tried updating that (although no idea why I should as MODx dynamically generates this file...!). One change... now an error on line 89... added ''s to the {} and now works past that error... Now more errors!!!

        GOING TO TRY A NEW INSTALL...

        Full config.inc.php file code below. As you can see - none of the variables from the setup are being passed to it... Feels like this installation build has some errors to me...

        <?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 = 1439323460;
        
        $site_id = 'modx55ca55441f6c55.61762191';
        $site_sessionname = '{site_sessionname}';
        $https_port = '{https_port}';
        $uuid = '8395bf5a-84e0-47cd-8223-1267096ea134';
        
        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= array_key_exists('HTTP_HOST', $_SERVER) ? $_SERVER['HTTP_HOST'] : '{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);
        }
        

        [ed. note: dubbs last edited this post 8 years, 8 months ago.]
          • 48589
          • 33 Posts
          The issue seems to be the same as before, with the quotes missing around the {}, but that's just strictly PHP, not specifically the MODX error.

          Probably, the quotation marks shouldn't even be necessary. What the issue seems to be, is that all those things between the brackets should have been replaced by the values you've entered during the setup. So perhaps you could check if the config.inc.php file is writeable or not.
            • 8168
            • 1,118 Posts
            Thanks. Have checked, it is writable - something major going on - I have re-installed. Hopefully that will work...
              • 8168
              • 1,118 Posts
              Fresh install fails... OK.. gonna go with an older build! 2.3.5. obviously is buggy!

              Giving 2.3.4 a go... [ed. note: dubbs last edited this post 8 years, 8 months ago.]
                • 8168
                • 1,118 Posts
                2.3.4 worked!
                  • 48589
                  • 33 Posts
                  Weird. But whatever works, works wink
                    • 22840
                    • 1,572 Posts
                    Quote from: dubbs at Aug 12, 2015, 04:11 PM
                    2.3.4 worked!

                    Does a upgrade work from the 2.3.4 install ?
                      • 8168
                      • 1,118 Posts
                      I will give it a go...