hhvm

Running phpunit tests using HHVM (HipHop)

情到浓时终转凉″ 提交于 2020-01-12 14:27:46
问题 I am trying to run PHPUnit unit tests via HHVM on a virtual Ubuntu 12.04 (64-bit Server) install. The tests usually run using a phpunit.xml file located in my tests directory, which includes a bootstrap file to handle autoloading, and the tests run fine on an ordinary php install. However, I keep getting: HipHop Fatal error: File not found: File/Iterator/Autoload.php in /usr/share/php/PHPUnit/Autoload.php on line 64 When running: hhvm -f /usr/bin/phpunit /path/to/my/testsDirectory/SomeTest

Is code written in Hack faster than code written in PHP on HHVM?

落爺英雄遲暮 提交于 2020-01-10 00:28:24
问题 Can we expect a speed gain by transitioning from PHP to Hack on HHVM? I'm thinking of the strongly typed parameters / return types, in particular scalars, does that allow HHVM to do a better job at compiling the code to native code, or is the speed gain insignificant as compared to using classic PHP and its mixed types? 回答1: I answered this on Reddit a few months back. I've copied my answer below, since the state of the world hasn't changed much since then. But keep in mind that HHVM is still

Typechecking Hack code on VirtualBox via NFS shared folder

半世苍凉 提交于 2019-12-31 07:00:24
问题 It seems prudent to first mention this issue and then this aptly-named edit which seems related and has made hh_server refuse to run on NFS file systems. I am not very familar with file systems and have never touched OCaml before, so in trying to accomplish the question title, I have tried editing what I know: /etc/hh.conf and /etc/hhvm/{php, server}.ini , adding hhvm.[server.]enable_on_nfs = true by pure guesswork. No dice. As I understand it from the issue, the change stems from the hh

Display fatal/notice errors in browser

不打扰是莪最后的温柔 提交于 2019-12-30 06:18:06
问题 Well I just started with hhvm/hack. But I wanted to display the errors to the browser but didnot got it working. I set the ini settings as followed error_reporting(E_ALL); ini_set('display_errors', '1'); According to a var_dump of ini_get 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 via de browser I would just get a white screen and a 500

Display fatal/notice errors in browser

▼魔方 西西 提交于 2019-12-30 06:18:05
问题 Well I just started with hhvm/hack. But I wanted to display the errors to the browser but didnot got it working. I set the ini settings as followed error_reporting(E_ALL); ini_set('display_errors', '1'); According to a var_dump of ini_get 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 via de browser I would just get a white screen and a 500

hhvm-fastcgi + nginx how to make it display fatal errors in the browser

时光怂恿深爱的人放手 提交于 2019-12-30 05:43:25
问题 I've been playing with HHVM config file and I have yet to be able to make it output any fatal error to the browser. It displays E_NOTICE and E_WARNING but when any E_ERROR happens it leaves the page blank and the error only appears in the HHVM log file. Is there a way to make it show in the browser? My HHVM config file is as follow: PidFile = /var/run/hhvm/pid Log { Level = Warning AlwaysLogUnhandledExceptions = true RuntimeErrorReportingLevel = 8191 UseLogFile = true UseSyslog = false File =

Error installing XHP with composer

余生颓废 提交于 2019-12-24 05:46:20
问题 I'm trying to install XHP on OSX using composer. I have a directory with composer.phar and composer.json. My composer.json file looks like this: { "require": { "facebook/xhp-lib": "~2.2" } } I also installed the latest version of HHVM. I tried running hhvm composer.phar install --verbose but got the following error: [ErrorException] Undefined index: 0 Exception trace: () at phar://composer.phar/bin/../src/../vendor/symfony/process/Pipes/AbstractPipes.php:140 Composer\Util\ErrorHandler::handle

How ignore any files using HHVM proxygen rewrite rules?

你。 提交于 2019-12-24 01:54:17
问题 I create a file like this example.ini : hhvm.server.type = proxygen hhvm.server.default_document = index.php hhvm.virtual_host[default][rewrite_rules][common][pattern] = "(.*)" hhvm.virtual_host[default][rewrite_rules][common][to] = "index.php/$1" hhvm.virtual_host[default][rewrite_rules][common][qsa] = true And calling in terminal: $ hhvm -m server -p 9000 -d hhvm.server.source_root=/home/user/project -c example.ini It's work fine, However I can still browse existing files that are in the

How to setup HHVM for PHPUnit in PhpStorm

血红的双手。 提交于 2019-12-23 20:28:00
问题 How could I run my unit tests in PhpStorm 8 with HHVM as its interpreter? PhpStorm 8 supports PHPUnit 4 which that supports HHVM and I could run my test suite on termianl with HHVM but I do not know how to config PhpStorm 8 in order to run my unit tests with HHVM. 回答1: Now by PHPStorm 8.0.2 it becomes possible: Under the PHP setting, add a new interpreter located in /usr/bin/hhvm or /usr/local/bin/hhvm 来源: https://stackoverflow.com/questions/26036090/how-to-setup-hhvm-for-phpunit-in-phpstorm

laravel 5 show blank page on server error (and no laravel log), running with hhvm and nginx

一笑奈何 提交于 2019-12-23 00:29:31
问题 I followed Fideloper post about running laravel with hhvm, step by step. There are two projects hosted on my server, one is my blog which is based on wardrobe (laravel 4.1), and another project with laravel 5. My blog has no issue with server errors and laravel log file; But the other project cannot create log files, and it won't show error page because of that. I double checked storage folder permission. It is 777 . When I run php artisan serve (native php, not hhvm) and browse to it, the