hello everybody
im trying to install testlink but it doesnt work
im using the auto installation
i checked the "i agree..." box and clicked continue
the next page looked like that:
TestLink will carry out a number of checks to see if everything's ready to start the setup.
0) { // Stop process because of error ?>
Unfortunately, TestLink scripted setup cannot continue at the moment, due to the above 1 ? $errors." " : "" ; ?>error 1 ? "s" : "" ; ?>.
Please correct the error 1 ? "s" : "" ; ?>, and try again (reload page). If you need help figuring out how to fix the problem 1 ? "s" : "" ; ?>, please read Installation manual and visit TestLink Forums [click here].
Your system is prepared for TestLink configuration (no fatal problem found).
i clicked continue and filled all the fields and clicked "process testlink setup"
and this is the next page:
$val) { $_SESSION[$key] = $val; } //assure that no timeout happens for large data set_time_limit(0); $tl_and_version = "TestLink {$_SESSION['testlink_version']} "; define('LEN_PWD_TL_1_0_4',15); define('ADD_DIR',1); $migration_process = ''; $sql_create_schema = array(); $sql_default_data = array(); $sql_update_schema = array(); $sql_update_data = array(); // get db info from session $db_server = $_SESSION['databasehost']; $db_admin_name = $_SESSION['databaseloginname']; $db_admin_pass = $_SESSION['databaseloginpassword']; $db_name = $_SESSION['databasename']; $db_type = $_SESSION['databasetype']; $tl_db_login = $_SESSION['tl_loginname']; $tl_db_passwd = $_SESSION['tl_loginpassword']; $db_table_prefix = $_SESSION['tableprefix']; $tl_and_version = "TestLink {$_SESSION['testlink_version']} "; $sql_create_schema[1] = "sql/{$db_type}/testlink_create_tables.sql"; $sql_default_data [1] = "sql/{$db_type}/testlink_create_default_data.sql"; $a_sql_schema[] = $sql_create_schema; $a_sql_data[] = $sql_default_data; global $g_tlLogger; $g_tlLogger->disableLogging('db'); $msg_process_data = "
Importing StartUp data "; $inst_type_verbose=" Installation "; $install = $_SESSION['isNew']; $upgrade = !$install; if ($upgrade) { $inst_type_verbose=" Upgrade "; $msg_process_data = "
Updating Database Contents "; $a_sql_data = array(); } $the_title = $_SESSION['title']; ?>
0 ) { echo $check['msg']; close_html_and_exit(); } ?> TestLink setup will now attempt to setup the database:
Creating connection to Database Server: "; // ------------------------------------------------------------------------------------------------ // Connect to DB Server without choosing an specific database $db = new database($db_type); define('NO_DSN',FALSE); // // echo 'DDD'; // echo $db_server, $db_admin_name, $db_admin_pass; @$conn_result = $db->connect(NO_DSN,$db_server, $db_admin_name, $db_admin_pass); if( $conn_result['status'] == 0 ) { echo 'Failed!
Please check the database login details and try again.'; echo '
Database Error Message: ' . $db->error_msg() . "
"; close_html_and_exit(); } else { echo "OK!
"; } $db->close(); $db=null; // -------------------------------------------------------------------------------------- // Connect to the Database (if Succesful -> database exists) $db = new database($db_type); @$conn_result = $db->connect(NO_DSN,$db_server, $db_admin_name, $db_admin_pass,$db_name); if( $conn_result['status'] == 0 ) { $db->close(); echo "
Database $db_name does not exist.
"; if( $upgrade ) { echo "Can't Upgrade"; close_html_and_exit(); $errors += 1; } else { echo "Will attempt to create:"; $create = true; } } else { echo "
Connecting to database `" . $db_name . "`: "; echo "OK!"; } // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ if($create) { // check database name for invalid characters (now only for MySQL) $db->close(); $db = null; $db = New database($db_type); $conn_result=$db->connect(NO_DSN,$db_server, $db_admin_name, $db_admin_pass); echo "
Creating database `" . $db_name . "`: "; // 20060214 - franciscom - from MySQL Manual // 9.2. Database, Table, Index, Column, and Alias Names // // Identifier : Database // Maximum Length (bytes): 64 // Allowed Characters : Any character that is allowed in a directory name, except '/', '\', or '.' // // An identifier may be quoted or unquoted. // If an identifier is a reserved word or contains special characters, you must quote it whenever you refer to it. // For a list of reserved words, see Section 9.6, �Treatment of Reserved Words in MySQL�. // Special characters are those outside the set of alphanumeric characters from the current character set, // '_', and '$'. // The identifier quote character is the backtick ('`'): // // // Postgres uses as identifier quote character " (double quotes): $sql_create_db =$db->build_sql_create_db($db_name); if(!$db->exec_query($sql_create_db)) { echo "Failed! - Could not create database: $db! " . $db->error_msg(); $errors += 1; echo "
TestLink setup could not create the database, " . "and no existing database with the same name was found.
" . "Please create a database by different way (e.g. from command line)," . " or with different DB root account. Run setup again then."; close_html_and_exit(); } else { echo "OK!"; } } // in upgrade mode we detect the lenght of user password field // to identify a version with uncrypted passwords $tables = tlObject::getDBTables(); $my_ado=$db->get_dbmgr_object(); if ($upgrade) { $user_table=$my_ado->MetaTables('TABLES',false,'user'); if( count($user_table) == 1 ) { $the_cols=$my_ado->MetaColumns('user'); $pwd_field_len =$the_cols['PASSWORD']->max_length; if ( $pwd_field_len == LEN_PWD_TL_1_0_4 ) { $update_pwd=1; echo "
You are trying to upgrade from a pre-release of TestLink 1.5" . "
this kind of upgrade is supported by this script. Use upgrade to supported version " . "at first.
"; close_html_and_exit(); } } // ------------------------------------------------------------------------------------------------ $a_sql_upd_dir=array(); $a_sql_data_dir=array(); $the_version_table=$my_ado->MetaTables('TABLES',false,'db_version'); if( count($the_version_table) == 0 ) { echo "
You are trying to upgrade from a pre-release of TestLink 1.7" . "
this kind of upgrade is supported by this script. Use upgrade to supported version " . "at first.
"; close_html_and_exit(); } else { $migration_functions_file = ''; $migration_process = ''; // try to know what db version is installed $sql = "SELECT * FROM {$tables['db_version']} ORDER BY upgrade_ts DESC"; $res = $db->exec_query($sql); if (!$res) { echo "Database ERROR:" . $db->error_msg(); exit(); } $myrow = $db->fetch_array($res); $schema_version=trim($myrow['version']); switch ($schema_version) { // case 'DB 1.1': // $a_sql_upd_dir[] = "sql/alter_tables/1.8/{$db_type}/DB.1.2/"; // $a_sql_upd_dir[] = "sql/alter_tables/1.9/{$db_type}/DB.1.3/"; // $migration_process = 'migrate_18_to_19'; // $migration_functions_file = '.\migration\migrate_18\migrate_18_to_19.php'; // break; case 'DB 1.2': $a_sql_upd_dir[] = "sql/alter_tables/1.9/{$db_type}/DB.1.3/step1/"; $a_sql_data_dir[] = "sql/alter_tables/1.9/{$db_type}/DB.1.3/stepZ/"; $migration_process = 'migrate_18_to_19'; $migration_functions_file = './migration/migrate_18/migrate_18_to_19.php'; break; case 'DB 1.3': echo "
Your DB Schema {$schema_version} is the last available, then you don't need to do any upgrade."; echo "
Script is finished.
"; close_html_and_exit(); break; default: if( strlen($schema_version) == 0 ) { echo "
Information of DB schema version is missing. Don't know how to upgrade.
"; } else { echo "
This script doesn't recognize your schema version: " . $schema_version . "
"; } echo "
Upgrade is not possible. Check your input data (Go back in page history).
"; close_html_and_exit(); break; } } $a_sql_schema = getDirSqlFiles($a_sql_upd_dir,ADD_DIR); $a_sql_data = getDirSqlFiles($a_sql_data_dir,ADD_DIR); } // ------------------------------------------------------------------------------------------------ // Now proceed with user checks and user creation (if needed) // // 20051217 - fm refactoring due to minor errors // 20050910 - fm // Added support for different types of architecture/installations: // webserver and dbserver on same machines => user will be created as user // webserver and dbserver on DIFFERENT machines => user must be created as user@webserver // // if @ in tl_db_login (username) -> get the hostname using splitting, and use it // during user creation on db. $db->close(); $db=null; $user_host = explode('@',$tl_db_login); $msg = create_user_for_db($db_type,$db_name, $db_server, $db_admin_name, $db_admin_pass, $tl_db_login, $tl_db_passwd); echo "
Creating Testlink DB user `" . $user_host[0] . "`: "; if ( strpos($msg,'ok -') === FALSE ) { echo "Failed! - Could not create user: $tl_db_login!"; $errors += 1; } else { echo "OK! ($msg) "; } // ------------------------------------------------------------------------------------------------ // Schema Operations (CREATE, ALTER, ecc). // Important: // Postgres: do it as tl_login NOT as db_admin // MySQL : do it as db_admin NOT as tl_login if( !is_null($db) ) { $db->close(); $db=null; } $db = new database($db_type); switch($db_type) { case 'mssql': @$conn_result = $db->connect(NO_DSN, $db_server, $db_admin_name, $db_admin_pass, $db_name); break; case 'mysql': @$conn_result = $db->connect(NO_DSN, $db_server, $db_admin_name, $db_admin_pass, $db_name); break; case 'postgres': @$conn_result = $db->connect(NO_DSN, $db_server, $tl_db_login, $tl_db_passwd, $db_name); break; } // -------------------------------------------------------------------------------------------- if( $install && $conn_result['status'] != 0 ) { // BUGID 3654 drop_tables($db,$db_table_prefix,$db_type); } // -------------------------------------------------------------------------------------------- $sqlParser = new SqlParser($db,$db_type,$db_table_prefix); foreach($a_sql_schema as $sql_schema) { foreach ($sql_schema as $sql_file) { echo "
Processing:" . $sql_file; $sqlParser->process($sql_file); } echo "
"; } // Now data migration must be done if needed if( $migration_process != '' ) { require_once($migration_functions_file); $migration_process($db,$tables); } // ------------------------------------------------- // Data Operations if ( count($a_sql_data > 0) ) { foreach($a_sql_data as $sql_data ) { if ( count($sql_data > 0) ) { // echo $msg_process_data; foreach ($sql_data as $sql_file) { $sqlParser->process($sql_file); } } } } // ------------------------------------------------- if ($update_pwd) { echo "Password Conversion ..."; // @author Francisco Mancardi - 20050918 // Found error upgrading from 1.0.4 to 1.6 on RH // due to case sensitive on table name. (USER) $user_pwd = "UPDATE user SET password=MD5(password)"; $result = $db->exec_query($user_pwd); } if($sqlParser->install_failed==true) { echo "Failed! - {$inst_type_verbose} failed!"; $errors += 1; echo "
" . "TestLink setup couldn't install the default site into the selected database. " . "The last error to occur was " . $sqlParser->sql_errors[count($sqlParser->sql_errors)-1]["error"] . ' during the execution of SQL statement ' . strip_tags($sqlParser->sql_errors[count($sqlParser->sql_errors)-1]["sql"]). ""; close_html_and_exit(); } else { echo "OK!"; } // ----------------------------------------------------------------------------- echo "
Writing configuration file: "; $data['db_host']=$db_server; $data['db_login'] = $user_host[0]; $data['db_passwd'] = $tl_db_passwd; $data['db_name'] = $db_name; $data['db_type'] = $db_type; $data['db_table_prefix'] = $db_table_prefix; $cfg_file = "../config_db.inc.php"; $yy = write_config_db($cfg_file,$data); // ----------------------------------------------------------------------------- if(strcasecmp('ko', $yy['status']) == 0) { echo "Failed!"; $errors += 1; echo "
" . "TestLink couldn't write the config file. Please copy the following into the " . ' ' . $cfg_file . ' file:
' . '' . $yy['cfg_string'] . ""; echo "Once that's been done, you can log into TestLink by pointing your browser at your TestLink site."; close_html_and_exit(); } else { echo "OK!"; } // 20080308 - franciscom important_reminder(); echo '
' . "{$inst_type_verbose} was successful!" . '
' . 'You can now log into the ' . 'TestLink (using login name:admin / password:admin - Please Click Me!).
'; $db->close(); close_html_and_exit(); // ----------------------------------------------------------- function write_config_db($filename, $data) { $ret = array('status' => 'ok', 'cfg_string' => ''); $db_host = $data['db_host']; $db_login = $data['db_login']; // if @ present in db_login, explode an take user name WITHOUT HOST $user_host = explode('@',$db_login); if (count($user_host) > 1 ) { $db_login = $user_host[0]; } $db_passwd = $data['db_passwd']; $db_name = $data['db_name']; $db_type = $data['db_type']; $db_table_prefix = $data['db_table_prefix']; // write config.inc.php $configString = ""; if (@!$handle = fopen($filename, 'w')) { $ret['status'] = 'ko'; } // Write $somecontent to our opened file. if (@fwrite($handle, $configString) === FALSE) { $ret['status'] = 'ko'; } @fclose($handle); $ret['cfg_string'] = $configString; return($ret); } // Drop tables to allow re-run Installation // BUGID 3654 function drop_tables(&$dbHandler,$dbTablePrefix,$dbType) { // From 1.9 and up we have detail of tables. $schema = tlObjectWithDB::getDBTables(); // tables present on target db $my_ado=$dbHandler->get_dbmgr_object(); $tablesOnDB =$my_ado->MetaTables('TABLES'); if( count($tablesOnDB) > 0 && isset($tablesOnDB[0])) { echo "
Dropping all TL existent tables:
"; foreach($schema as $tablePlainName => $tableFullName) { // echo 'DEBUG - $tablePlainName:' . $tablePlainName . '
'; // echo 'DEBUG - $tableFullName:' . $tableFullName . '
'; // BUGID 3654 $targetTable = $dbTablePrefix . $tablePlainName; if( in_array($targetTable,$tablesOnDB) ) { // Need to add option (CASCADE ?) to delete dependent object echo "Droping $targetTable" . "
"; $sql="DROP TABLE $targetTable"; $sql .= $dbType != 'mssql' ? " CASCADE " : ' '; $dbHandler->exec_query($sql); } } echo "Done!"; } } ?>
in all this there is a "click on me" link. when i clicking it,it brings me to that page:
assign('title', lang_get('main_page_title')); $smarty->assign('titleframe', 'lib/general/navBar.php'); $smarty->assign('mainframe', $args->reqURI); $smarty->display('main.tpl'); function init_args() { $iParams = array("reqURI" => array(tlInputParameter::STRING_N,0,4000)); $pParams = G_PARAMS($iParams); $args = new stdClass(); $args->reqURI = ($pParams["reqURI"] != '') ? $pParams["reqURI"] : 'lib/general/mainPage.php'; return $args; } ?>
is someone knows what can be the problem?
thank a lot!!!
installation
Moderators: Amaradana, TurboPT, TL Developers
Re: installation
I got the exact same messages when attempting a migration from 1.8x to 1.9x. This post is pretty old, but since no one else has responded, I wanted to share what worked for me. In the browser I was accessing the testlink install wrong, via C:\wamp\www\testlink192\install\index.php
What was needed was: http://localhost/testlink192/install
What was needed was: http://localhost/testlink192/install