質問編集履歴

7

指摘を受けたので修正

2018/07/16 04:54

投稿

yaschi
yaschi

スコア35

test CHANGED
@@ -1 +1 @@
1
- 【至急】UseBBのインストール後のエラーについて
1
+ UseBBのインストール後のエラーについて
test CHANGED
File without changes

6

画像の追加

2018/07/16 04:54

投稿

yaschi
yaschi

スコア35

test CHANGED
File without changes
test CHANGED
@@ -481,3 +481,9 @@
481
481
  キャッシュの破棄
482
482
 
483
483
  再インストール
484
+
485
+
486
+
487
+ 問題のエラーの画像(ブラウザーの画像とかは画像編集ソフトで消していますがChromeの最新版です)
488
+
489
+ ![問題のやつ](1c20904769ccb96951dce0495134ef92.png)

5

2018/07/16 04:49

投稿

yaschi
yaschi

スコア35

test CHANGED
File without changes
test CHANGED
@@ -477,3 +477,7 @@
477
477
  ### 試したこと
478
478
 
479
479
  PHPを5.1.6,5.3.3,5.4.16,5.5.38,5.6.30,7.0.18,7.1.4に変更して実行
480
+
481
+ キャッシュの破棄
482
+
483
+ 再インストール

4

2018/07/16 02:35

投稿

yaschi
yaschi

スコア35

test CHANGED
@@ -1 +1 @@
1
- UseBBのインストール後のエラーについて
1
+ 【至急】UseBBのインストール後のエラーについて
test CHANGED
File without changes

3

試したことの追加

2018/07/16 02:32

投稿

yaschi
yaschi

スコア35

test CHANGED
File without changes
test CHANGED
@@ -471,3 +471,9 @@
471
471
 
472
472
 
473
473
  ```
474
+
475
+
476
+
477
+ ### 試したこと
478
+
479
+ PHPを5.1.6,5.3.3,5.4.16,5.5.38,5.6.30,7.0.18,7.1.4に変更して実行

2

ソースの追加

2018/07/16 01:56

投稿

yaschi
yaschi

スコア35

test CHANGED
File without changes
test CHANGED
@@ -23,3 +23,451 @@
23
23
  in file sources/db_mysqli.php on line 96:
24
24
 
25
25
  SQL_ERROR - Access denied for user -filtered-(using password: YES)
26
+
27
+
28
+
29
+ ### 問題のソースコード
30
+
31
+ ```PHP
32
+
33
+ <?php
34
+
35
+
36
+
37
+ /*
38
+
39
+ Copyright (C) 2003-2012 UseBB Team
40
+
41
+ http://www.usebb.net
42
+
43
+
44
+
45
+ $Id$
46
+
47
+
48
+
49
+ This file is part of UseBB.
50
+
51
+
52
+
53
+ UseBB is free software; you can redistribute it and/or modify
54
+
55
+ it under the terms of the GNU General Public License as published by
56
+
57
+ the Free Software Foundation; either version 2 of the License, or
58
+
59
+ (at your option) any later version.
60
+
61
+
62
+
63
+ UseBB is distributed in the hope that it will be useful,
64
+
65
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
66
+
67
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68
+
69
+ GNU General Public License for more details.
70
+
71
+
72
+
73
+ You should have received a copy of the GNU General Public License
74
+
75
+ along with UseBB; if not, write to the Free Software
76
+
77
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
78
+
79
+ */
80
+
81
+
82
+
83
+ /**
84
+
85
+ * MySQLi database driver
86
+
87
+ *
88
+
89
+ * Contains the db class for MySQLi handling.
90
+
91
+ *
92
+
93
+ * @author UseBB Team
94
+
95
+ * @link http://www.usebb.net
96
+
97
+ * @license GPL-2
98
+
99
+ * @version $Revision$
100
+
101
+ * @copyright Copyright (C) 2003-2012 UseBB Team
102
+
103
+ * @package UseBB
104
+
105
+ * @subpackage Core
106
+
107
+ */
108
+
109
+
110
+
111
+ //
112
+
113
+ // Die when called directly in browser
114
+
115
+ //
116
+
117
+ if ( !defined('INCLUDED') )
118
+
119
+ exit();
120
+
121
+
122
+
123
+ if ( !extension_loaded('mysqli') && !defined('NO_DB') )
124
+
125
+ trigger_error('Unable to load module for database server "mysqli": PHP mysqli extension not available!', E_USER_ERROR);
126
+
127
+
128
+
129
+ ini_set('mysql.trace_mode', '0');
130
+
131
+
132
+
133
+ /**
134
+
135
+ * MySQLi database driver
136
+
137
+ *
138
+
139
+ * Performs database handling for MySQLi.
140
+
141
+ *
142
+
143
+ * @author UseBB Team
144
+
145
+ * @link http://www.usebb.net
146
+
147
+ * @license GPL-2
148
+
149
+ * @version $Revision$
150
+
151
+ * @copyright Copyright (C) 2003-2012 UseBB Team
152
+
153
+ * @package UseBB
154
+
155
+ * @subpackage Core
156
+
157
+ */
158
+
159
+ class db {
160
+
161
+
162
+
163
+ /**#@+
164
+
165
+ * @access private
166
+
167
+ */
168
+
169
+ var $connection;
170
+
171
+ var $queries = array();
172
+
173
+ var $persistent;
174
+
175
+ /**#@-*/
176
+
177
+
178
+
179
+ /**
180
+
181
+ * Make a connection to the MySQL server
182
+
183
+ *
184
+
185
+ * @param array $config Database configuration
186
+
187
+ */
188
+
189
+ function connect($config) {
190
+
191
+
192
+
193
+ global $functions;
194
+
195
+
196
+
197
+ if ( defined('NO_DB') )
198
+
199
+ return;
200
+
201
+
202
+
203
+ //
204
+
205
+ // mysqli persistent only for 5.3.0+
206
+
207
+ //
208
+
209
+ $this->persistent = ( $config['persistent'] && version_compare(PHP_VERSION, '5.3.0', '>=') );
210
+
211
+ if ( $this->persistent )
212
+
213
+ $config['server'] = 'p:'.$config['server'];
214
+
215
+
216
+
217
+ //
218
+
219
+ // Connect to server
220
+
221
+ //
222
+
223
+ $this->connection = @mysqli_connect($config['server'], $config['username'], $config['passwd']) or trigger_error('SQL: '.mysqli_connect_error(), E_USER_ERROR);
224
+
225
+
226
+
227
+ //
228
+
229
+ // Select database
230
+
231
+ //
232
+
233
+ @mysqli_select_db($this->connection, $config['dbname']) or trigger_error('SQL: '.mysqli_error($this->connection), E_USER_ERROR);
234
+
235
+
236
+
237
+ //
238
+
239
+ // Set transaction to latin1
240
+
241
+ //
242
+
243
+ if ( is_object($functions) && $functions->get_config('force_latin1_db', true) )
244
+
245
+ $this->query("SET NAMES latin1", true, false);
246
+
247
+
248
+
249
+ }
250
+
251
+
252
+
253
+ /**
254
+
255
+ * Execute database queries
256
+
257
+ *
258
+
259
+ * @param string $query SQL query
260
+
261
+ * @param bool $return_error Return error instead of giving general error
262
+
263
+ * @returns mixed SQL result resource or SQL error (only when $return_error is true)
264
+
265
+ */
266
+
267
+ function query($query, $return_error=false, $log=true) {
268
+
269
+
270
+
271
+ if ( $log )
272
+
273
+ $this->queries[] = preg_replace('#\s+#', ' ', $query);
274
+
275
+
276
+
277
+ $result = @mysqli_query($this->connection, $query) or $error = mysqli_error($this->connection);
278
+
279
+
280
+
281
+ if ( isset($error) ) {
282
+
283
+
284
+
285
+ if ( $return_error )
286
+
287
+ return $error;
288
+
289
+ else
290
+
291
+ trigger_error('SQL: '.$error, E_USER_ERROR);
292
+
293
+
294
+
295
+ }
296
+
297
+
298
+
299
+ return $result;
300
+
301
+
302
+
303
+ }
304
+
305
+
306
+
307
+ /**
308
+
309
+ * Fetch query results
310
+
311
+ *
312
+
313
+ * @param resource $result SQL query resource
314
+
315
+ * @returns array Array containing one result
316
+
317
+ */
318
+
319
+ function fetch_result(&$result) {
320
+
321
+
322
+
323
+ $res_array = mysqli_fetch_array($result, MYSQLI_ASSOC);
324
+
325
+
326
+
327
+ if ( is_array($res_array) ) {
328
+
329
+
330
+
331
+ array_walk($res_array, 'usebb_clean_db_value');
332
+
333
+ reset($res_array);
334
+
335
+
336
+
337
+ }
338
+
339
+
340
+
341
+ return $res_array;
342
+
343
+
344
+
345
+ }
346
+
347
+
348
+
349
+ /**
350
+
351
+ * Count row number
352
+
353
+ *
354
+
355
+ * @param resource $result SQL query resource
356
+
357
+ * @returns int Number of result rows
358
+
359
+ */
360
+
361
+ function num_rows(&$result) {
362
+
363
+
364
+
365
+ return mysqli_num_rows($result);
366
+
367
+
368
+
369
+ }
370
+
371
+
372
+
373
+ /**
374
+
375
+ * Last inserted ID
376
+
377
+ *
378
+
379
+ * @returns int Last inserted auto increment ID
380
+
381
+ */
382
+
383
+ function last_id() {
384
+
385
+
386
+
387
+ return mysqli_insert_id($this->connection);
388
+
389
+
390
+
391
+ }
392
+
393
+
394
+
395
+ /**
396
+
397
+ * Get used queries array
398
+
399
+ *
400
+
401
+ * @returns array Array containing executed queries
402
+
403
+ */
404
+
405
+ function get_used_queries() {
406
+
407
+
408
+
409
+ return $this->queries;
410
+
411
+
412
+
413
+ }
414
+
415
+
416
+
417
+ /**
418
+
419
+ * Get server version info
420
+
421
+ *
422
+
423
+ * @returns array Array containing database driver info and server version
424
+
425
+ */
426
+
427
+ function get_server_info() {
428
+
429
+
430
+
431
+ return array(
432
+
433
+ 'MySQL (mysqli)',
434
+
435
+ mysqli_get_server_info($this->connection)
436
+
437
+ );
438
+
439
+
440
+
441
+ }
442
+
443
+
444
+
445
+ /**
446
+
447
+ * Disconnect the database connection
448
+
449
+ */
450
+
451
+ function disconnect() {
452
+
453
+
454
+
455
+ if ( !$this->persistent )
456
+
457
+ @mysqli_close($this->connection);
458
+
459
+
460
+
461
+ }
462
+
463
+
464
+
465
+ }
466
+
467
+
468
+
469
+ ?>
470
+
471
+
472
+
473
+ ```

1

2018/07/16 01:50

投稿

yaschi
yaschi

スコア35

test CHANGED
File without changes
test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ### 環境
6
6
 
7
- サーバー - スターサーバー無料プラン PHPとMySQLが使えるやつ
7
+ サーバー - スターサーバー無料プラン PHP(公式のテスト環境合わせるため5.5.38)とMySQL(5.7.x)が使えるやつ
8
8
 
9
9
  UseBB - 1.0.16(2は情報が少なかったので...)
10
10