質問編集履歴

2

環境等の追記

2019/10/23 00:50

投稿

yme2zk
yme2zk

スコア21

test CHANGED
File without changes
test CHANGED
@@ -122,9 +122,9 @@
122
122
 
123
123
 
124
124
 
125
- win10、vagrant、CentOS7、php7.3、CakePHP3.7.9
125
+ win10、Vagrant + Virtualbox、CentOS7、php7.3、CakePHP3.7.9
126
-
126
+
127
- まったく同じvagrant環境をmacで実行すると、問題なく動作していました。
127
+ 同じvagrantをmacで実行すると、問題なく動作していました。
128
128
 
129
129
  (`vagrant up`を行った段階で、`composer install`も済んでいる状態です)
130
130
 

1

Application.phpの中身を追記

2019/10/23 00:50

投稿

yme2zk
yme2zk

スコア21

test CHANGED
File without changes
test CHANGED
@@ -137,3 +137,163 @@
137
137
  また、今のところOSでの挙動の違いしかわかっておりません。
138
138
 
139
139
  他に確認すべきところなどありましたらご教授いただけると幸いです。
140
+
141
+
142
+
143
+ ### 追記
144
+
145
+
146
+
147
+ Application.php
148
+
149
+ ```
150
+
151
+ class Application extends BaseApplication
152
+
153
+ {
154
+
155
+ /**
156
+
157
+ * {@inheritDoc}
158
+
159
+ */
160
+
161
+ public function bootstrap()
162
+
163
+ {
164
+
165
+ // Call parent to load bootstrap from files.
166
+
167
+ parent::bootstrap();
168
+
169
+
170
+
171
+ if (PHP_SAPI === 'cli') {
172
+
173
+ $this->bootstrapCli();
174
+
175
+ } else {
176
+
177
+ // Load more plugins here
178
+
179
+ $this->addPlugin('Froala');
180
+
181
+ }
182
+
183
+
184
+
185
+ /*
186
+
187
+ * Only try to load DebugKit in development mode
188
+
189
+ * Debug Kit should not be installed on a production system
190
+
191
+ */
192
+
193
+ if (Configure::read('debug')) {
194
+
195
+ $this->addPlugin(\DebugKit\Plugin::class);
196
+
197
+ }
198
+
199
+ }
200
+
201
+
202
+
203
+ /**
204
+
205
+ * Setup the middleware queue your application will use.
206
+
207
+ *
208
+
209
+ * @param \Cake\Http\MiddlewareQueue $middlewareQueue The middleware queue to setup.
210
+
211
+ * @return \Cake\Http\MiddlewareQueue The updated middleware queue.
212
+
213
+ */
214
+
215
+ public function middleware($middlewareQueue)
216
+
217
+ {
218
+
219
+ $middlewareQueue
220
+
221
+ // Catch any exceptions in the lower layers,
222
+
223
+ // and make an error page/response
224
+
225
+ ->add(new ErrorHandlerMiddleware(null, Configure::read('Error')))
226
+
227
+
228
+
229
+ // Handle plugin/theme assets like CakePHP normally does.
230
+
231
+ ->add(new AssetMiddleware([
232
+
233
+ 'cacheTime' => Configure::read('Asset.cacheTime')
234
+
235
+ ]))
236
+
237
+
238
+
239
+ // Add routing middleware.
240
+
241
+ // If you have a large number of routes connected, turning on routes
242
+
243
+ // caching in production could improve performance. For that when
244
+
245
+ // creating the middleware instance specify the cache config name by
246
+
247
+ // using it's second constructor argument:
248
+
249
+ // `new RoutingMiddleware($this, '_cake_routes_')`
250
+
251
+ ->add(new RoutingMiddleware($this));
252
+
253
+
254
+
255
+ $cookies = new EncryptedCookieMiddleware(['rememberMe'], Configure::read('Security.cookieKey'));
256
+
257
+ $middlewareQueue->add($cookies);
258
+
259
+
260
+
261
+ return $middlewareQueue;
262
+
263
+ }
264
+
265
+
266
+
267
+ /**
268
+
269
+ * @return void
270
+
271
+ */
272
+
273
+ protected function bootstrapCli()
274
+
275
+ {
276
+
277
+ try {
278
+
279
+ $this->addPlugin('Bake');
280
+
281
+ } catch (MissingPluginException $e) {
282
+
283
+ // Do not halt if the plugin is missing
284
+
285
+ }
286
+
287
+
288
+
289
+ $this->addPlugin('Migrations');
290
+
291
+
292
+
293
+ // Load more plugins here
294
+
295
+ }
296
+
297
+ }
298
+
299
+ ```