Well, I just started with hhvm / hack. But I wanted to display errors in the browser, but it did not work.
I set the ini options as follows
error_reporting(E_ALL); ini_set('display_errors', '1');
According to the var_dump ini_get parameter, the values ββwere set to
string(5) "32767" string(1) "1"
But when I did
<?hh error_reporting(E_ALL); ini_set('display_errors', '1'); throw new InvalidArgumentException('test');
When I visited the page through a browser, I would just get a white screen and 500 http headers. Therefore, no explanation for fatal error / exclusion exists.
If I were going through the terminal hhvm index.php It would show:
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'test' in /var/www/public/index.php:3 Stack trace: #0 {main}
So now the question. How does this happen? I do not receive any messages in the browser, but do in cli? And secondly, how can I make it work in the browser to show messages.
I came across this question and this . But first, well, the same thing, but without an answer. And the second says something about static validation. IE, what int is given, etc. At least that is what I think it means.
Another question I came, which looked like me, but again did not answer.
And according to the docs it should work, I think.
Read more about the documents I received through
Although display_errors can be set at runtime (with the ini_set () function), this will not affect if the script has fatal errors. This is because the desired action is not performed at runtime.
So, I thought the exception was a fatal error, so I just made $test = $bar + 1;
Let it be in cli <
Notice: Undefined variable: bar in /var/www/public/index.php on line 8 int(1)
Again in the browser
int(1)
Therefore, I also do not receive notifications.
When I restart hhvm service hhvm restart , I also get the error Log file not specified under daemon mode. error Log file not specified under daemon mode. don't know if he has anything to do with him