質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
MySQL

MySQL(マイエスキューエル)は、TCX DataKonsultAB社などが開発するRDBMS(リレーショナルデータベースの管理システム)です。世界で最も人気の高いシステムで、オープンソースで開発されています。MySQLデータベースサーバは、高速性と信頼性があり、Linux、UNIX、Windowsなどの複数のプラットフォームで動作することができます。

PHP

PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

Q&A

1回答

674閲覧

UseBBのインストール後のエラーについて

yaschi

総合スコア35

MySQL

MySQL(マイエスキューエル)は、TCX DataKonsultAB社などが開発するRDBMS(リレーショナルデータベースの管理システム)です。世界で最も人気の高いシステムで、オープンソースで開発されています。MySQLデータベースサーバは、高速性と信頼性があり、Linux、UNIX、Windowsなどの複数のプラットフォームで動作することができます。

PHP

PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

0グッド

0クリップ

投稿2018/07/16 01:39

編集2022/01/12 10:55

本日、UseBBをスターサーバーのフリープランにインストールしていました。しかし、日本語化にしようとprofile.php?id=1にアクセスしたところエラーが出てしまい全く知らない領域に手も足も出なかったため質問させていただきました。

環境

サーバー - スターサーバー無料プラン PHP(公式のテスト環境と合わせるため5.5.38)とMySQL(5.7.x)が使えるやつ
UseBB - 1.0.16(2は情報が少なかったので...)
FTPソフト - Filezillaの最新版

インストール前に行ったこと

config.php-distの-distを削除

エラーメッセージ

in file sources/db_mysqli.php on line 96:
SQL_ERROR - Access denied for user -filtered-(using password: YES)

### 問題のソースコード

PHP

1<?php 2 3/* 4 Copyright (C) 2003-2012 UseBB Team 5 http://www.usebb.net 6 7 $Id$ 8 9 This file is part of UseBB. 10 11 UseBB is free software; you can redistribute it and/or modify 12 it under the terms of the GNU General Public License as published by 13 the Free Software Foundation; either version 2 of the License, or 14 (at your option) any later version. 15 16 UseBB is distributed in the hope that it will be useful, 17 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 GNU General Public License for more details. 20 21 You should have received a copy of the GNU General Public License 22 along with UseBB; if not, write to the Free Software 23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 24*/ 25 26/** 27 * MySQLi database driver 28 * 29 * Contains the db class for MySQLi handling. 30 * 31 * @author UseBB Team 32 * @link http://www.usebb.net 33 * @license GPL-2 34 * @version $Revision$ 35 * @copyright Copyright (C) 2003-2012 UseBB Team 36 * @package UseBB 37 * @subpackage Core 38 */ 39 40// 41// Die when called directly in browser 42// 43if ( !defined('INCLUDED') ) 44 exit(); 45 46if ( !extension_loaded('mysqli') && !defined('NO_DB') ) 47 trigger_error('Unable to load module for database server "mysqli": PHP mysqli extension not available!', E_USER_ERROR); 48 49ini_set('mysql.trace_mode', '0'); 50 51/** 52 * MySQLi database driver 53 * 54 * Performs database handling for MySQLi. 55 * 56 * @author UseBB Team 57 * @link http://www.usebb.net 58 * @license GPL-2 59 * @version $Revision$ 60 * @copyright Copyright (C) 2003-2012 UseBB Team 61 * @package UseBB 62 * @subpackage Core 63 */ 64class db { 65 66 /**#@+ 67 * @access private 68 */ 69 var $connection; 70 var $queries = array(); 71 var $persistent; 72 /**#@-*/ 73 74 /** 75 * Make a connection to the MySQL server 76 * 77 * @param array $config Database configuration 78 */ 79 function connect($config) { 80 81 global $functions; 82 83 if ( defined('NO_DB') ) 84 return; 85 86 // 87 // mysqli persistent only for 5.3.0+ 88 // 89 $this->persistent = ( $config['persistent'] && version_compare(PHP_VERSION, '5.3.0', '>=') ); 90 if ( $this->persistent ) 91 $config['server'] = 'p:'.$config['server']; 92 93 // 94 // Connect to server 95 // 96 $this->connection = @mysqli_connect($config['server'], $config['username'], $config['passwd']) or trigger_error('SQL: '.mysqli_connect_error(), E_USER_ERROR); 97 98 // 99 // Select database 100 // 101 @mysqli_select_db($this->connection, $config['dbname']) or trigger_error('SQL: '.mysqli_error($this->connection), E_USER_ERROR); 102 103 // 104 // Set transaction to latin1 105 // 106 if ( is_object($functions) && $functions->get_config('force_latin1_db', true) ) 107 $this->query("SET NAMES latin1", true, false); 108 109 } 110 111 /** 112 * Execute database queries 113 * 114 * @param string $query SQL query 115 * @param bool $return_error Return error instead of giving general error 116 * @returns mixed SQL result resource or SQL error (only when $return_error is true) 117 */ 118 function query($query, $return_error=false, $log=true) { 119 120 if ( $log ) 121 $this->queries[] = preg_replace('#\s+#', ' ', $query); 122 123 $result = @mysqli_query($this->connection, $query) or $error = mysqli_error($this->connection); 124 125 if ( isset($error) ) { 126 127 if ( $return_error ) 128 return $error; 129 else 130 trigger_error('SQL: '.$error, E_USER_ERROR); 131 132 } 133 134 return $result; 135 136 } 137 138 /** 139 * Fetch query results 140 * 141 * @param resource $result SQL query resource 142 * @returns array Array containing one result 143 */ 144 function fetch_result(&$result) { 145 146 $res_array = mysqli_fetch_array($result, MYSQLI_ASSOC); 147 148 if ( is_array($res_array) ) { 149 150 array_walk($res_array, 'usebb_clean_db_value'); 151 reset($res_array); 152 153 } 154 155 return $res_array; 156 157 } 158 159 /** 160 * Count row number 161 * 162 * @param resource $result SQL query resource 163 * @returns int Number of result rows 164 */ 165 function num_rows(&$result) { 166 167 return mysqli_num_rows($result); 168 169 } 170 171 /** 172 * Last inserted ID 173 * 174 * @returns int Last inserted auto increment ID 175 */ 176 function last_id() { 177 178 return mysqli_insert_id($this->connection); 179 180 } 181 182 /** 183 * Get used queries array 184 * 185 * @returns array Array containing executed queries 186 */ 187 function get_used_queries() { 188 189 return $this->queries; 190 191 } 192 193 /** 194 * Get server version info 195 * 196 * @returns array Array containing database driver info and server version 197 */ 198 function get_server_info() { 199 200 return array( 201 'MySQL (mysqli)', 202 mysqli_get_server_info($this->connection) 203 ); 204 205 } 206 207 /** 208 * Disconnect the database connection 209 */ 210 function disconnect() { 211 212 if ( !$this->persistent ) 213 @mysqli_close($this->connection); 214 215 } 216 217} 218 219?> 220

試したこと

PHPを5.1.6,5.3.3,5.4.16,5.5.38,5.6.30,7.0.18,7.1.4に変更して実行
キャッシュの破棄
再インストール

問題のエラーの画像(ブラウザーの画像とかは画像編集ソフトで消していますがChromeの最新版です)
問題のやつ

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

m.ts10806

2018/07/16 01:43

コードをご提示ください。またPHPとMySQLのバージョンもご提示ください
yaschi

2018/07/16 01:44

コードはどこのコードを提示すればよろしいでしょうか?
m.ts10806

2018/07/16 01:45

問題が発生しているコードです。エラーメッセージだけでは何を元にエラーとなっているのか質問者さんしか分かりません。
yaschi

2018/07/16 01:51

上記のものでよろしいでしょうか?
退会済みユーザー

退会済みユーザー

2018/07/16 03:04

上記をみるに、初回接続時にユーザーおよびDBが作成されると思ってるでいい?
yaschi

2018/07/16 04:29

サーバーにUseBBをインストールする前にサーバー側の管理画面でMySQLとMySQLユーザーを登録し権限を付与しました。
yaschi

2018/07/16 04:30

それ以外の操作は特に何もしていません。
m.ts10806

2018/07/16 04:50

タイトルに「至急」など入れるのはマナー違反です(タイトルには質問要件のみ入れるものです)
yaschi

2018/07/16 04:54

大変失礼しました。今修正しました。
退会済みユーザー

退会済みユーザー

2018/07/16 14:44 編集

気になって身に行ってみたけど 月額126円~で フリープランはないように見えますが。契約しているサーバー会社へのリンクを貼ってください。(スターサーバー違いであってほしいが
guest

回答1

0

すでにインストールされましたか?(まずそこです)
installフォルダにアクセスしていくつか入力してインストールします。
ちなみに真ん中の方に太字で
UseBB may not have been installed yet.
とあります。
これの日本語訳は
UseBBがまだインストールされていない可能性があります。
です。

投稿2019/04/11 21:21

退会済みユーザー

退会済みユーザー

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問