HHVM - What the "hack" should i do to see the errors in the browser ?

Pun intended, but really, what should i do to see the errors in my browser when using hhvm?

I’ve read that i have to implement my own error handler in order to see the errors on screen, i tried, didn’t work.

My hhvm logger only logs something from time to time, but not all, i.e:




# tail -f /var/log/hhvm/error.log

Failed to initialize central HHBC repository:\n  Failed to initialize schema in /var/run/hhvm/hhvm.hhbc: \n  Failed to open /usr/share/httpd/.hhvm.hhbc: 14 - unable to open database file\n

\nFatal error: Call to undefined function undefined() in /home/something/public_html/apps/init.php on line 176




Even though i have triggered multiple other fatal errors.

For what it worth, here’s my hhvm config:




# cat /etc/hhvm/server.ini

; php options

display_startup_errors = On

error_reporting = E_ALL

display_errors = On


pid = /var/run/hhvm/pid


; hhvm specific


#hhvm.server.file_socket=/var/run/hhvm/hhvm.sock

hhvm.server.port = 9000

hhvm.server.type = fastcgi

hhvm.server.source_root = /home/something/public_html

hhvm.server.default_document = index.php

hhvm.server.fix_path_info = true

hhvm.log.level = Error

hhvm.log.use_log_file = true

hhvm.log.file = /var/log/hhvm/error.log

hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc




Anyone got this working properly with Yii 2 ?

Really, no one using HHVM with Yii2?

Weird…

Maybe because yii1 is not fully compatible and there are no test for yii2?

To improve performance there are many other safer ways than solutions likes HHVM…

It’s not really about improving performance here, it’s just about experimenting with HHVM out of pure curiosity ;)

Thanks for the answer btw :)

Didn’t want to be rude, sorry , just answered quickly before going out of the office.

It seem that HHVM (looking to test list) works well with little and not complex framework.

By little and not complex I mean framework (some of them are software) that do not use a wide range of functionality of php.

All "big" (by big I mean that use wide range of php functionality) framework doctrine, Symphony, Codeigniter, Zend, yii joomla, drupal and many more it fail the tests.

I knew HHVM and that’s why I didn’t investigated further, didn’t want to loose my time.

For those that passes the test they do not even indicate the version.

For instance they say phpbb3 passed the test but there is phpbb3.0 and phpbb3.1 which one they tested?

While 3.0 require php 4.3.3, 3.1 require php 5.3.3 which is a big difference on what yii2 require that is php 5.4

I don’t think HHVM and similar are the right solution. It is like have a car and in order to make it faster rather than working on your car you put a ferrari to pull your car by hoping that the ferrari driver is going to your same destination.

In our case you make an application that works with HHVM then you go for production.

Later you implement a new component and with HHVM goes in error and you start to spend days to try to find a workaround for something that under php is working fine.

For performance improvement I’m looking at next php version, as most of you know there will not be a 6.0, this development is dead.

They go directly to 7.0 which is a merge of php-ng https://wiki.php.net/phpng with the 6.0 branch.

https://wiki.php.net/rfc/php7timeline

Just to give an idea of what php-ng is:

But the following is much more interesting as it goes further than pure performance.

I am confident that in php 7.0 it will get even better.