質問編集履歴
3
エラーログ追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -292,6 +292,22 @@
|
|
292
292
|
|
293
293
|
|
294
294
|
|
295
|
+
### errir.log
|
296
|
+
|
297
|
+
```php
|
298
|
+
|
299
|
+
2021-06-14 03:25:01 Error: [PDOException] SQLSTATE[HY000]: General error: 1364 Field 'complete' doesn't have a default value
|
300
|
+
|
301
|
+
Request URL: /board/entryWriting/?1623641016=
|
302
|
+
|
303
|
+
Stack Trace:
|
304
|
+
|
305
|
+
```
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
295
311
|
### database.php
|
296
312
|
|
297
313
|
```php
|
2
アプリケーションのDB設定を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -289,3 +289,131 @@
|
|
289
289
|
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
|
290
290
|
|
291
291
|
```
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
### database.php
|
296
|
+
|
297
|
+
```php
|
298
|
+
|
299
|
+
class DATABASE_CONFIG {
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
// default
|
304
|
+
|
305
|
+
public $default = array(
|
306
|
+
|
307
|
+
'datasource' => 'Database/Mysql',
|
308
|
+
|
309
|
+
'persistent' => false,
|
310
|
+
|
311
|
+
'host' => 'db',
|
312
|
+
|
313
|
+
'login' => 'root',
|
314
|
+
|
315
|
+
'password' => 'secret',
|
316
|
+
|
317
|
+
'database' => 'database',
|
318
|
+
|
319
|
+
'prefix' => '',
|
320
|
+
|
321
|
+
'encoding' => 'utf8',
|
322
|
+
|
323
|
+
);
|
324
|
+
|
325
|
+
// ローカル
|
326
|
+
|
327
|
+
public $local = array(
|
328
|
+
|
329
|
+
'datasource' => 'Database/Mysql',
|
330
|
+
|
331
|
+
'persistent' => false,
|
332
|
+
|
333
|
+
'host' => 'db',
|
334
|
+
|
335
|
+
'login' => 'root',
|
336
|
+
|
337
|
+
'password' => 'secret',
|
338
|
+
|
339
|
+
'database' => 'database',
|
340
|
+
|
341
|
+
'prefix' => '',
|
342
|
+
|
343
|
+
'encoding' => 'utf8',
|
344
|
+
|
345
|
+
);
|
346
|
+
|
347
|
+
// 開発
|
348
|
+
|
349
|
+
public $dev = array(
|
350
|
+
|
351
|
+
'datasource' => 'Database/Mysql',
|
352
|
+
|
353
|
+
'persistent' => false,
|
354
|
+
|
355
|
+
'host' => 'localhost',
|
356
|
+
|
357
|
+
'login' => 'root',
|
358
|
+
|
359
|
+
'password' => '#####',
|
360
|
+
|
361
|
+
'database' => 'database_dev',
|
362
|
+
|
363
|
+
'prefix' => '',
|
364
|
+
|
365
|
+
'encoding' => 'utf8',
|
366
|
+
|
367
|
+
);
|
368
|
+
|
369
|
+
// 本番
|
370
|
+
|
371
|
+
public $pro = array(
|
372
|
+
|
373
|
+
'datasource' => 'Database/Mysql',
|
374
|
+
|
375
|
+
'persistent' => false,
|
376
|
+
|
377
|
+
'host' => 'localhost',
|
378
|
+
|
379
|
+
'login' => 'root',
|
380
|
+
|
381
|
+
'password' => '######',
|
382
|
+
|
383
|
+
'database' => 'database_pro',
|
384
|
+
|
385
|
+
'prefix' => '',
|
386
|
+
|
387
|
+
'encoding' => 'utf8',
|
388
|
+
|
389
|
+
```
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
### AppModel.php
|
394
|
+
|
395
|
+
```php
|
396
|
+
|
397
|
+
class AppModel extends Model {
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
public function __construct($id = false, $table = null, $ds = null)
|
402
|
+
|
403
|
+
{
|
404
|
+
|
405
|
+
$env = (isset($_SERVER['CAKE_ENV']) ? $_SERVER['CAKE_ENV'] : 'local');
|
406
|
+
|
407
|
+
if ($env !== 'default') {
|
408
|
+
|
409
|
+
$this->useDbConfig = $env;
|
410
|
+
|
411
|
+
}
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
parent::__construct($id, $table, $ds);
|
416
|
+
|
417
|
+
}
|
418
|
+
|
419
|
+
```
|
1
ログを確認しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -245,3 +245,47 @@
|
|
245
245
|
&& service apache2 restart
|
246
246
|
|
247
247
|
```
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
###docerのphpログ
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
特にエラーらしきものはわかりません、、、
|
256
|
+
|
257
|
+
```
|
258
|
+
|
259
|
+
172.26.0.1 - - [14/Jun/2021:11:42:06 +0900] "POST /board/entryWriting/?1623638442 HTTP/1.1" 500 989 "http://localhost/board/?tag=t90" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36 Edg/91.0.864.48"
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
172.26.0.1 - - [14/Jun/2021:11:42:14 +0900] "POST /board/getEntryList/?1623638450 HTTP/1.1" 200 515 "http://localhost/board/?tag=t90" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36 Edg/91.0.864.48"
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
172.26.0.1 - - [14/Jun/2021:11:42:21 +0900] "POST /board/getNewComment/?1623638457 HTTP/1.1" 200 515 "http://localhost/board/?tag=t90" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36 Edg/91.0.864.48"
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
172.26.0.1 - - [14/Jun/2021:11:42:28 +0900] "POST /board/updateEntryList/?1623638464 HTTP/1.1" 200 515 "http://localhost/board/?tag=t90" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36 Edg/91.0.864.48"
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
172.26.0.1 - - [14/Jun/2021:11:42:35 +0900] "POST /board/updateComment/?1623638471 HTTP/1.1" 200 515 "http://localhost/board/?tag=t90" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36 Edg/91.0.864.48"
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
172.26.0.1 - - [14/Jun/2021:11:42:42 +0900] "POST /consumer/getCheckData/?1623638478 HTTP/1.1" 200 291 "http://localhost/board/?tag=t90" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36 Edg/91.0.864.48"
|
280
|
+
|
281
|
+
```
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
###var_dumpでのコンソール
|
286
|
+
|
287
|
+
```php
|
288
|
+
|
289
|
+
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
|
290
|
+
|
291
|
+
```
|