mysql5.6.6이상에서 sql_mode 설정 코드 추가
This commit is contained in:
@ -95,6 +95,7 @@ if (file_exists($dbconfig_file)) {
|
|||||||
$connect_db = sql_connect(G5_MYSQL_HOST, G5_MYSQL_USER, G5_MYSQL_PASSWORD) or die('MySQL Connect Error!!!');
|
$connect_db = sql_connect(G5_MYSQL_HOST, G5_MYSQL_USER, G5_MYSQL_PASSWORD) or die('MySQL Connect Error!!!');
|
||||||
$select_db = sql_select_db(G5_MYSQL_DB, $connect_db) or die('MySQL DB Error!!!');
|
$select_db = sql_select_db(G5_MYSQL_DB, $connect_db) or die('MySQL DB Error!!!');
|
||||||
@mysql_query(" set names utf8 ");
|
@mysql_query(" set names utf8 ");
|
||||||
|
if(defined('G5_MYSQL_SET_MODE') && G5_MYSQL_SET_MODE) @mysql_query("SET SESSION sql_mode = ''");
|
||||||
if (defined(G5_TIMEZONE)) @mysql_query(" set time_zone = '".G5_TIMEZONE."'");
|
if (defined(G5_TIMEZONE)) @mysql_query(" set time_zone = '".G5_TIMEZONE."'");
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -23,7 +23,6 @@ $admin_pass = $_POST['admin_pass'];
|
|||||||
$admin_name = $_POST['admin_name'];
|
$admin_name = $_POST['admin_name'];
|
||||||
$admin_email = $_POST['admin_email'];
|
$admin_email = $_POST['admin_email'];
|
||||||
|
|
||||||
@mysql_query('set names utf8');
|
|
||||||
$dblink = @mysql_connect($mysql_host, $mysql_user, $mysql_pass);
|
$dblink = @mysql_connect($mysql_host, $mysql_user, $mysql_pass);
|
||||||
if (!$dblink) {
|
if (!$dblink) {
|
||||||
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">'.PHP_EOL;
|
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">'.PHP_EOL;
|
||||||
@ -32,7 +31,6 @@ if (!$dblink) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mysql_query('set names utf8');
|
|
||||||
$select_db = @mysql_select_db($mysql_db, $dblink);
|
$select_db = @mysql_select_db($mysql_db, $dblink);
|
||||||
if (!$select_db) {
|
if (!$select_db) {
|
||||||
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">'.PHP_EOL;
|
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">'.PHP_EOL;
|
||||||
@ -40,6 +38,13 @@ if (!$select_db) {
|
|||||||
echo '<div><a href="./install_config.php">뒤로가기</a></div>'.PHP_EOL;
|
echo '<div><a href="./install_config.php">뒤로가기</a></div>'.PHP_EOL;
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$mysql_set_mode = 'false';
|
||||||
|
@mysql_query('set names utf8');
|
||||||
|
if(version_compare(mysql_get_server_info(), '5.6.6', '>=') == 1) {
|
||||||
|
@mysql_query("SET SESSION sql_mode = ''");
|
||||||
|
$mysql_set_mode = 'true';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h2><?php echo G5_VERSION ?> 설치가 시작되었습니다.</h2>
|
<h2><?php echo G5_VERSION ?> 설치가 시작되었습니다.</h2>
|
||||||
@ -186,7 +191,8 @@ fwrite($f, "if (!defined('_GNUBOARD_')) exit;\n");
|
|||||||
fwrite($f, "define('G5_MYSQL_HOST', '{$mysql_host}');\n");
|
fwrite($f, "define('G5_MYSQL_HOST', '{$mysql_host}');\n");
|
||||||
fwrite($f, "define('G5_MYSQL_USER', '{$mysql_user}');\n");
|
fwrite($f, "define('G5_MYSQL_USER', '{$mysql_user}');\n");
|
||||||
fwrite($f, "define('G5_MYSQL_PASSWORD', '{$mysql_pass}');\n");
|
fwrite($f, "define('G5_MYSQL_PASSWORD', '{$mysql_pass}');\n");
|
||||||
fwrite($f, "define('G5_MYSQL_DB', '{$mysql_db}');\n\n");
|
fwrite($f, "define('G5_MYSQL_DB', '{$mysql_db}');\n");
|
||||||
|
fwrite($f, "define('G5_MYSQL_SET_MODE', {$mysql_set_mode});\n\n");
|
||||||
fwrite($f, "define('G5_TABLE_PREFIX', '{$table_prefix}');\n\n");
|
fwrite($f, "define('G5_TABLE_PREFIX', '{$table_prefix}');\n\n");
|
||||||
fwrite($f, "\$g5['write_prefix'] = G5_TABLE_PREFIX.'write_'; // 게시판 테이블명 접두사\n\n");
|
fwrite($f, "\$g5['write_prefix'] = G5_TABLE_PREFIX.'write_'; // 게시판 테이블명 접두사\n\n");
|
||||||
fwrite($f, "\$g5['auth_table'] = G5_TABLE_PREFIX.'auth'; // 관리권한 설정 테이블\n");
|
fwrite($f, "\$g5['auth_table'] = G5_TABLE_PREFIX.'auth'; // 관리권한 설정 테이블\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user