简体   繁体   English

如何启动HHVM CLI服务器

[英]How to start HHVM CLI Server

HHVM 3.19 has added something called CLI server mode: https://hhvm.com/blog/2017/04/13/hhvm-3-19.html HHVM 3.19添加了称为CLI服务器模式的内容: https : //hhvm.com/blog/2017/04/13/hhvm-3-19.html

The idea of the CLI server is that some caches can be shared and that the startup costs of HHVM can be avoided. CLI服务器的想法是可以共享某些缓存,并且可以避免HHVM的启动成本。 The documentation has no information about how to run it unfortunately: https://docs.hhvm.com/hhvm/advanced-usage/CLI-server 该文档不幸地没有有关如何运行的信息: https : //docs.hhvm.com/hhvm/advanced-usage/CLI-server

The actual code for the CLI-server can be found here: https://github.com/facebook/hhvm/blob/master/hphp/runtime/server/cli-server.cpp CLI服务器的实际代码可以在以下位置找到: https : //github.com/facebook/hhvm/blob/master/hphp/runtime/server/cli-server.cpp

But I see no callable endpoints and I can't find any other documentation about it online. 但是我看不到可调用的端点,也无法在线找到有关它的任何其他文档。 So... who's got an example of how to call it? 那么...谁有一个如何称呼它的例子?

You can see a list of ini options related with CLI-Server in the following 您可以在下面看到与CLI-Server相关的ini选项的列表

https://docs.hhvm.com/hhvm/configuration/INI-settings#cli-server https://docs.hhvm.com/hhvm/configuration/INI-settings#cli-server

According this information, you have to use the option hhvm.use_remote_unix_server in order to start CLI Server. 根据此信息,您必须使用选项hhvm.use_remote_unix_server来启动CLI服务器。 Below is an example: 下面是一个示例:

hhvm --mode server -d hhvm.server.type=fastcgi -d hhvm.server.port=9000 -d hhvm.use_remote_unix_server=yes -d hhvm.unix_server_path=/tmp/sock2 hhvm --mode服务器-d hhvm.server.type = fastcgi -d hhvm.server.port = 9000 -d hhvm.use_remote_unix_server =是-d hhvm.unix_server_path = / tmp / sock2

I use Nginx - fastcgi to use HHVM, when I run localhost/info.php I get the following information: 我使用Nginx-fastcgi使用HHVM,当我运行localhost / info.php时,我得到以下信息:

phpinfo hhvm phpinfo hhvm

I have to say that I haven't tested any CLI Server functionality, I have just tested the start options and I should do some research, But I hope this information can helps. 我不得不说我还没有测试任何CLI Server功能,我只是测试了启动选项,我应该做一些研究,但是我希望这些信息能对您有所帮助。

Best Regards Javi 最好的问候哈维

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM