我一直在尝试在HHVM上运行phpmyadmin.通常的php文件正常运行,但每当我尝试访问localhost:8080/phpmyadmin时它会给我一个没有错误消息的空白页面.我假设它必须处理mysql.PS:mysql已安装在我的系统上.
这是server.hdf
PidFile = /var/run/hhvm/pid
Server {
SourceRoot = /var/www/
DefaultDocument = index.php
}
Log {
Level = Warning
AlwaysLogUnhandledExceptions = true
RuntimeErrorReportingLevel = 8191
UseLogFile = true
UseSyslog = false
File = /var/log/hhvm/error.log
Access {
* {
File = /var/log/hhvm/access.log
Format = %h %l %u % t \"%r\" %>s %b
}
}
}
Repo {
Central {
Path = /var/log/hhvm/.hhvm.hhbc
}
}
#include "/usr/share/hhvm/hdf/static.mime-types.hdf"
StaticFile {
FilesMatch {
* {
pattern = .*\.(dll|exe)
headers {
* = Content-Disposition: attachment …
Run Code Online (Sandbox Code Playgroud) 我正在使用计算机语言基准游戏中的代码; 即nbody.php.
在没有HHVM的情况下运行时,性能如下:
$ time php -n n.php
real 0m5.247s
user 0m5.235s
sys 0m0.008s
Run Code Online (Sandbox Code Playgroud)
在服务器模式下使用HHVM运行并将页面重新加载30次以上时,速度为:
real 0m6.905s
user 0m0.001s
sys 0m0.000s
Run Code Online (Sandbox Code Playgroud)
我正在运行HHVM: hhvm -m server -v Eval.JitWarmupRequests=3 n.php
我错过了HHVM的一些"特殊"配置吗?或者,它和nbody一样慢吗?我的PHP测试是5.5.3,没有任何类型的操作码缓存.
如何从HHVM恢复到PHP.
我知道从php迁移到hhvm你只需要:
$ sudo /usr/bin/update-alternatives --install /usr/bin/php php /usr/bin/hhvm 60
Run Code Online (Sandbox Code Playgroud)
如果我想恢复到PHP怎么样?
$ php -v
HipHop VM 3.0.0 (rel)
Compiler: tags/HHVM-3.0.0-0-g59a8db46e4ebf5cfd205fadc12e27a9903fb7aae
Repo schema: 48906efe08d29a403bbe13414f32ccd256708e0b
Run Code Online (Sandbox Code Playgroud)
可以只是执行ln
命令指向原始的PHP?
为什么这段代码有效?
<?hh // strict
function test(Vector<int> $v):void {
print_r($v);
}
test(Vector {1, array("I'm an array"), 3});
Run Code Online (Sandbox Code Playgroud)
它不应该抛出错误吗?什么是<int>
应该的?
我正在Ubuntu 14.04计算机上按照这些步骤安装HHVM.
我得到的结果是:
The following packages have unmet dependencies:
hhvm : Depends: libboost-filesystem1.53.0 but it is not installable
Depends: libboost-program-options1.53.0 but it is not installable
Depends: libboost-system1.53.0 but it is not installable
Depends: libboost-system1.53.0 but it is not installable
Depends: libboost-regex1.53.0 but it is not installable
Depends: libicu48 but it is not installable
Depends: libtasn1-3 but it is not installable
Depends: libboost-thread1.53.0 but it is not installable
Run Code Online (Sandbox Code Playgroud)
输出:dpkg -s libboost-dev | grep 'Version'
=Version: 1.54.0.1ubuntu1
我究竟做错了什么?
谢谢!
美好的一天,
我有问题.我想在hacklang中模拟一些错误.
<?hh
namespace Exsys\HHVM;
class HHVMFacade{
private $vector = Vector {1,2,3};
public function echoProduct() : Vector<string>{
return $this->vector;
}
public function test(Vector<string> $vector) : void{
var_dump($vector);
}
}
Run Code Online (Sandbox Code Playgroud)
函数echoProduct()返回字符串的Vector.但私有财产$ vector是整数的向量.当我调用echoFunction并返回值用作函数test()的参数时.我明白了
object(HH\Vector)#35357 (3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }
Run Code Online (Sandbox Code Playgroud)
为什么?我期待一些错误,因为类型不匹配.
nginx 新手,在重写时遇到了一些问题。
我有一个链接到子域 test.mydomain.com 的网站。我当前的 nginx 配置:
server {
listen 80 default_server;
root /test/public;
index index.html index.htm index.php;
server_name localhost;
access_log /var/log/nginx/localhost.laravel-access.log;
error_log /var/log/nginx/locahost.laravel-error.log error;
charset utf-8;
location /admin/ {
alias /test/public/admin/public/;
try_files $uri $uri/ /admin/index.php?$query_string;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; }
error_page 404 /index.php;
include hhvm.conf; # The HHVM Magic Here
# Deny .htaccess file access
location ~ …
Run Code Online (Sandbox Code Playgroud) 在ubuntu 14.10上的nginx + mysql 5.5 + hhvm工作正常.我安装了phpmyadmin:sudo apt-get phpmyadmin
我有这个版本:4.2.6-1.
从phpmyadmin登录页面后,我在网址中得到一个这样的空白页面: /phpmyadmin/index.php?token=7e858f9ed3b783b34d4c2274d721f125&SID
我在hhvm错误日志中收到此错误消息:
\nFatal error:未捕获异常'异常',消息'端口不是数字':\n堆栈跟踪:\n#0():mysqli-> real_connect()\n#1/usr/share/phpmyadmin/libraries/dbi /DBIMysqli.class.php(114):mysqli_real_connect()\n#2 /usr/share/phpmyadmin/libraries/dbi/DBIMysqli.class.php(191):PMA_DBI_Mysqli - > _ realConnect()\n#3/usr/share/phpmyadmin/libraries/DatabaseInterface.class.php(2078):PMA_DBI_Mysqli-> connect()\n#4 /usr/share/phpmyadmin/libraries/common.inc.php(978):PMA_DatabaseInterface-> connect()\n#5 /usr/share/phpmyadmin/index.php(12):include()\n#6 {main}
我怎样才能解决这个问题?
我刚用puphpet创建了一个非常简单的配置.它包括一个nginx和一个hhvm和一个mysql.还没有别的.当我开始运行流浪汉时,它每次都会失败并显示相同的消息.
这是输出:
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'puphpet/ubuntu1404-x64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'puphpet/ubuntu1404-x64' is up to date...
==> default: Setting the name of the VM: vagrant-hhvm_default_1441131243385_35080
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 6632 (adapter 1)
default: 22 …
Run Code Online (Sandbox Code Playgroud) 它是否支持 hhvm 3.15.1 和编译器 ID:tags/HHVM-3.15.1-0-g87901df9ba74204dda149af0cfbbb016d85df67e 当前 php 版本 7.0.99-hhvm
您如何看待用于编程 Hack 的 Visual Studio 代码?如果是这样,为什么?我问是因为他的语法错误系统方法,因为我找不到关于这种语言的基本信息。
我看到只有 Visual Studio 代码和 vim,但我想你们是否还有另一个代码,所以我不确定。
我正在学习 hacklang,并且在不同文件中使用界面时遇到问题。这是我的代码。
IpAuthorizedController.php
<?hh
namespace App\Controller\Interface;
interface IpAuthorizedController {
}
Run Code Online (Sandbox Code Playgroud)
HomeController.php
<?hh
namespace App\controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use App\Controller\Interface\IpAuthorizedController;
class HomeController extends Controller
{
/**
* @Route("/", name="index")
*
*/
public function index()
{
die(var_dump(return $this->render('index.html.twig')));
}
}
Run Code Online (Sandbox Code Playgroud)
错误信息
FatalThrowableError
syntax error, unexpected T_INTERFACE, expecting '{'
in HomeController.hh (line 5)
Run Code Online (Sandbox Code Playgroud)
我是这门语言的新手,因此非常感谢任何帮助,谢谢。