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

    I’ve decompressed the files, i followed the instrutions http://svn.modxcms.com/docs/display/MODx096/Installation

    but when i went to the install page : "host/modx/install/index.php" after choosing the language, -> "New Instalation"
    after that page i got problems, on the next page, the database page, "host/modx/install/index.php?action=connection"

    The connection page has problems, i think.

    I configured the fields, "Database host", "login name", "password", but the i click "test database..." but it doesn’t work,
    And i can’t go forward, i’m stuck.

    Can someone help, thanks.

    Pipas
      • 15082
      • 195 Posts
      If you don’t get any reply from the test it’s likely that your browser blocks the javascript that runs the connection test.

      If there is a error message, your DB credentials aren’t suitable.

      Greetz
      JUSI
        • 3749
        • 24,544 Posts

        Some hosts add a prefix to the db name and/or user name, so the correct db name and user name may not be what you entered when you created the db and user.

        Be sure you’ve created a database user for the DB and that the use has all permissions for the DB.

        Be sure you’re using the DB userername/password here, not the MODx username/password

        Almost always, DB host is ’localhost’, but on some servers it’s not.
          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
          • 23427
          • 6 Posts
          Thanks for the replys but...still not working sad

          "jusicgn" - i’ve tried diferent browsers, IE, firefox, chrome....but neither worked, as far as i know
          i’m not blocking JScript.
          When i click on the "test" link it does nothing...really, it just sits there, no action, if i click on the "Next" button it complains about "..you need to test your connection".

          "BobRay" - i didn’t create any DB yet, the installation docs that i’ve read, didn’t meation that.
          I though that this install script would do that... am i wrong?

          Thanks guys
          Pipas
            • 3749
            • 24,544 Posts
            Quote from: pipas at Oct 25, 2009, 04:51 PM

            Thanks for the replys but...still not working sad

            "BobRay" - i didn’t create any DB yet, the installation docs that i’ve read, didn’t meation that.
            I though that this install script would do that... am i wrong?

            Thanks guys
            Pipas

            MODx tries to create the DB but it doesn’t always work because of the way the individual host is set up.

            In those cases, you have to use PhpMyAdmin to create your own DB (make a note of the DB name -- it may not be what you type). Be sure to create a DB user and give the user rights to the MODx DB. That’s the DB name, username, and password you’ll use during the install.
              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
              • 23427
              • 6 Posts
              I’m sorry, but i think there is something wrong with the jscript.

              After "bangging" my head... i used google chrome with inspector, and when i click the test link it complains about the "header security"

              However i will try the solution that you pointed, but on the install page, on the db page, there is no field to place the DB name.

              Thanks
                • 3749
                • 24,544 Posts
                You have to click on the "Test Database" link to make the db name field appear. If it doesn’t, try another browser.
                  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
                  • 15082
                  • 195 Posts
                  If you’ve already tried diffrent browsers, another thing that can break some scripts are "AntiVirus/SafeBrowsing" suites like Norton and so on. They often do a local proxying and modify the scripts they consider harmful...

                  If you’re running sth like that, try to disable them and retry.

                  Greetz
                  JUSI
                    • 23427
                    • 6 Posts

                    Well i tried, IE 8, Firefox 3.5, Chrome 3.0, and on my latest test
                    i used Konqueror 4.2.2, but still no go sad

                    Nothing, when i click "Test database connection..." no action...

                    is there anyway to create this configuration file manually?

                    thanks
                    Pipas
                      • 3749
                      • 24,544 Posts
                      manager/includes/config.inc.php:

                      <?php
                      /**
                       *	MODx Configuration file
                       */
                      $database_type = 'mysql';
                      $database_server = 'localhost';
                      $database_user = 'username'; // db username
                      $database_password = '****'; //  actual pwd of db user
                      $database_connection_charset = 'utf8';
                      $database_connection_method = 'SET CHARACTER SET';
                      $dbase = '`db_name`';  // name of your database
                      $table_prefix = 'modx_';
                      error_reporting(E_ALL & ~E_NOTICE);
                      
                      $lastInstallTime = 1248990041;
                      
                      $site_sessionname = 'SN4a7213580585c';
                      $https_port = '443';
                      
                      // automatically assign base_path and base_url
                      if(empty($base_path)||empty($base_url)||$_REQUEST['base_path']||$_REQUEST['base_url']) {
                          $sapi= 'undefined';
                          if (!strstr($_SERVER['PHP_SELF'], $_SERVER['SCRIPT_NAME']) && ($sapi= @ php_sapi_name()) == 'cgi') {
                              $script_name= $_SERVER['PHP_SELF'];
                          } else {
                              $script_name= $_SERVER['SCRIPT_NAME'];
                          }
                          $a= explode("/manager", str_replace("\\", "/", dirname($script_name)));
                          if (count($a) > 1)
                              array_pop($a);
                          $url= implode("manager", $a);
                          reset($a);
                          $a= explode("manager", str_replace("\\", "/", dirname(__FILE__)));
                          if (count($a) > 1)
                              array_pop($a);
                          $pth= implode("manager", $a);
                          unset ($a);
                          $base_url= $url . (substr($url, -1) != "/" ? "/" : "");
                          $base_path= $pth . (substr($pth, -1) != "/" && substr($pth, -1) != "\\" ? "/" : "");
                          // assign site_url
                          $site_url= ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port) ? 'https://' : 'http://';
                          $site_url .= $_SERVER['HTTP_HOST'];
                          if ($_SERVER['SERVER_PORT'] != 80)
                              $site_url= str_replace(':' . $_SERVER['SERVER_PORT'], '', $site_url); // remove port from HTTP_HOST Â 
                          $site_url .= ($_SERVER['SERVER_PORT'] == 80 || (isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port) ? '' : ':' . $_SERVER['SERVER_PORT'];
                          $site_url .= $base_url;
                      }
                      
                      if (!defined('MODX_BASE_PATH')) define('MODX_BASE_PATH', $base_path);
                      if (!defined('MODX_BASE_URL')) define('MODX_BASE_URL', $base_url);
                      if (!defined('MODX_SITE_URL')) define('MODX_SITE_URL', $site_url);
                      if (!defined('MODX_MANAGER_PATH')) define('MODX_MANAGER_PATH', $base_path.'manager/');
                      if (!defined('MODX_MANAGER_URL')) define('MODX_MANAGER_URL', $site_url.'manager/');
                      
                      // start cms session
                      if(!function_exists('startCMSSession')) {
                      	function startCMSSession(){
                      		global $site_sessionname;
                      		session_name($site_sessionname);
                      		session_start();
                      		$cookieExpiration= 0;
                              if (isset ($_SESSION['mgrValidated']) || isset ($_SESSION['webValidated'])) {
                                  $contextKey= isset ($_SESSION['mgrValidated']) ? 'mgr' : 'web';
                                  if (isset ($_SESSION['modx.' . $contextKey . '.session.cookie.lifetime']) && is_numeric($_SESSION['modx.' . $contextKey . '.session.cookie.lifetime'])) {
                                      $cookieLifetime= intval($_SESSION['modx.' . $contextKey . '.session.cookie.lifetime']);
                                  }
                                  if ($cookieLifetime) {
                                      $cookieExpiration= time() + $cookieLifetime;
                                  }
                      			if (!isset($_SESSION['modx.session.created.time'])) {
                      			  $_SESSION['modx.session.created.time'] = time();
                      			}
                              }
                      		setcookie(session_name(), session_id(), $cookieExpiration, MODX_BASE_URL);
                      	}
                      }
                      ?>
                        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