質問編集履歴

3

エラーメッセージを追記しました。

2020/04/14 14:48

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,87 @@
12
12
 
13
13
  ```
14
14
 
15
+ object(PDOException)#2 (8) {
16
+
17
+ ["message":protected]=>
18
+
19
+ string(44) "SQLSTATE[HY000] [2019] Unknown character set"
20
+
21
+ ["string":"Exception":private]=>
22
+
23
+ string(0) ""
24
+
25
+ ["code":protected]=>
26
+
15
- エラーメッセージ
27
+ int(2019)
28
+
29
+ ["file":protected]=>
30
+
31
+ string(50) "/Applications/MAMP/htdocs/staff/staff_add_done.php"
32
+
33
+ ["line":protected]=>
34
+
35
+ int(25)
36
+
37
+ ["trace":"Exception":private]=>
38
+
39
+ array(1) {
40
+
41
+ [0]=>
42
+
43
+ array(6) {
44
+
45
+ ["file"]=>
46
+
47
+ string(50) "/Applications/MAMP/htdocs/staff/staff_add_done.php"
48
+
49
+ ["line"]=>
50
+
51
+ int(25)
52
+
53
+ ["function"]=>
54
+
55
+ string(11) "__construct"
56
+
57
+ ["class"]=>
58
+
59
+ string(3) "PDO"
60
+
61
+ ["type"]=>
62
+
63
+ string(2) "->"
64
+
65
+ ["args"]=>
66
+
67
+ array(3) {
68
+
69
+ [0]=>
70
+
71
+ string(46) "mysql:dbname=shop;host=localhost;charset=utf-8"
72
+
73
+ [1]=>
74
+
75
+ string(4) "root"
76
+
77
+ [2]=>
78
+
79
+ string(0) ""
80
+
81
+ }
82
+
83
+ }
84
+
85
+ }
86
+
87
+ ["previous":"Exception":private]=>
88
+
89
+ NULL
90
+
91
+ ["errorInfo"]=>
92
+
93
+ NULL
94
+
95
+ }
16
96
 
17
97
  ```
18
98
 

2

var_dump($e) を exit(); 以前に移動しました。

2020/04/14 14:47

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -80,9 +80,9 @@
80
80
 
81
81
  print 'ただいま障害により大変ご迷惑をおかけしております。';
82
82
 
83
+ var_dump($e);
84
+
83
85
  exit();
84
-
85
- var_dump($e);
86
86
 
87
87
  }
88
88
 

1

さっそくのご指摘ありがとうございます。$eをvar_dump()しましたが、エラー結果の表示が出ていないです。php.iniの設定は変更しているのですが・・・。

2020/04/14 14:41

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -82,6 +82,8 @@
82
82
 
83
83
  exit();
84
84
 
85
+ var_dump($e);
86
+
85
87
  }
86
88
 
87
89