S
S
Samarkand2017-05-28 07:49:28
Yii
Samarkand, 2017-05-28 07:49:28

Why does Yii ignore the CHttpException handler?

There is an error handler in config/main.php:

'errorHandler' => array(
    'errorAction'=>'site/error',
),

Why is he being ignored?
When an exception occurs, the server response is:
Warning: file_get_contents(https://site.com/404): failed to open stream: HTTP request failed! HTTP/1.1 404 CHttpException in test.php on line 3

The contents of the test.php file (the file for testing the server response):
file_get_contents('https://site.com/404');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-05-28
@webinar

test.phpwhat's this? Just a php file? Then yii does not start at all when you access it. Or is it a view? Or what is it? Not enough information for a specific answer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question