hhvm

PHP - static type checking a-la PhpStorm

血红的双手。 提交于 2019-12-20 09:56:23
问题 I am a strongly-typed language supporter but I am working on a big PHP project. I have been using PhpStorm and I love the extra type hinting you can provide, with comments like these: /** @var \Payments $payment */ /** @property \Payments $payment */ PhpStorm is great because it gives you some warning when types don't match. I was wondering if it is possible to have this kind of check also statically, outside of PhpStorm. Some kind of command line precompiler that would go through the code,

Debugging in nGinx yields 1 line and infinite frustration- How to Debug the Debugger

做~自己de王妃 提交于 2019-12-14 03:17:48
问题 Yay for experimental projects! I decided to try setting up my blog with Facebook's new hhvm-fastcgi and wordpress. Followed instructions and am using the following nGnix configuration: server { listen *:80 default; server_name _; access_log /home/blogs/logs/nginx/access.log; error_log /home/blogs/logs/nginx/error.log debug; location / { deny all; } } server { listen *:80; server_name www.site.com; root /home/blogs/wordpress/; index index.html index.php index.htm; access_log /home/blogs/logs

extremely slow HHVM, Wordpress, Nginx

删除回忆录丶 提交于 2019-12-14 00:22:59
问题 I might be doing something wrong but I am doing a bit of testing between a php-fpm wordpress setup and a HHVM wordpress setup. I've heard & seen many mind blowing results from HHVM, but I'm just shocked at the results I'm getting. Using the following apache testing command I'm getting a much higher performance rate from php-fpm than HHVM. ab -n1000 http://127.0.0.1:8080/ For php-fpm I am getting 109.98 requests/second. Unfortunately for me I'm getting only ~12.33 requests/second with HHVM.

Apache rewrite rule to NGINX for HHVM

删除回忆录丶 提交于 2019-12-13 22:03:41
问题 We're moving from apache to NGINX and Hip Hop Virtual Machine (HHVM). I can't seem to get our rewrite rules lined up and working properly in NGINX. Here is the current working apache rule set: RewriteEngine On RewriteBase / #send www.domain.com -> domain.com RewriteCond %{HTTP_HOST} ^www\.domain\.com$ RewriteRule ^(.*)$ http://domain.com%{REQUEST_URI} [R=301,L] RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ -

How to always use ignore-platform-reqs flag when running composer?

▼魔方 西西 提交于 2019-12-13 12:25:00
问题 On my local machine, I have php v7.0.3. A project of mine has a dependency on php v5.5. So as expected, a simple run of composer install crashes: Your requirements could not be resolved to an installable set of packages. Problem 1 - This package requires php ~5.5 but your PHP version (7.0.3) does not satisfy that requirement. I know I can ignore the platform via: composer install --ignore-platform-reqs yet I often forget to add the flag. Yet since the application runs inside a docker

Why is KernelEvents::TERMINATE blocking the response to the user?

梦想的初衷 提交于 2019-12-13 02:07:51
问题 In a Silex application running on HVVM I have setup a dummy event listener on Kernel TERMINATE : $app['dispatcher']->addListener( KernelEvents::TERMINATE, function () use ($app) { usleep(10000000); $app['logger']->alert("I AM REGISTERED!"); } ); I was expecting my application to render the response as fast as possible within a second and after 10s I expected the message "I AM REGISTERED" to appear in my log. Yet strangely the response is sent after the event has been executed, meaning the

HHVM can't use pcntl_fork

被刻印的时光 ゝ 提交于 2019-12-13 00:29:37
问题 I've install hhvm 3.5 in my CentOs 6.5, and it could be run correctly. But I found when I use pcntl_fork() function to do something. The hhvm will throw an error as Fatal error: forking is disallowed in server mode. It's happened just in nginx + hhvm, in cli mode everything seems alright. Does the pcntl_fork() can only run in cli mode? If not, how to make it alright? 回答1: The error message looks pretty clear to me: you cannot fork in server (i.e., FastCGI) mode. As to why, I can only

HHVM with Homestead - HHVM refusing NFS

白昼怎懂夜的黑 提交于 2019-12-12 01:07:23
问题 I'm trying to set up Homestead with VirtualBox and the HHVM option. My host is Mac OS, and I'm not enabling the nfs option in Homestead.yaml. However, as soon as I add a Hack file and run hh_client, hh_server dies because it refuses to run on NFS I understand the rational of not supporting NFS but I'm wondering why is NFS actually involved here, and what could be done to workaround this? 回答1: VirtualBox shared folders are effectively a network folder, causing the same problems as NFS. This

When I turn on “hhvm” on Homestead, I don't get any syntax error or missing class error, just blank page

拥有回忆 提交于 2019-12-11 02:23:35
问题 I am using homestead as my development environment, I turned on the hhvm option for the site sites: - map: homestead.app to: /home/vagrant/Code/wheremyprojectis hhvm: true I found that when there is an exception, everything is fine, but If I forgot to use namespace, got syntax error in the blade templates, I got nothing, blank page. I go check the logs and still nothing, the debug option is true. It's quite frustrating until I turned off the hhvm option. I know it is not a big deal, but I

Automatically restarting HHVM when it stops responding but process not dead

你。 提交于 2019-12-08 02:29:25
问题 I'm having a problem where every 12-24 hours, HHVM crashes but it seems to leave the process running. It seems most providers just use php5-fpm as a failover within nginx for stability. However, this won't restart the non-responsive hhvm instance. Since the process is left running, most server monitoring solutions will see it as a live daemon, and not restart it. HTTP monitoring can be slow to react. Is it possible to trigger the hhvm restart on failover? If not, what would be the best