douyabu1528 2015-07-16 15:32
浏览 29
已采纳

HHVM WSOD(白屏),SOME页面没有错误

I have try to move from Apache + cli_php to NGINX+HHVM(3.8) on Debian. The problem is HHVM couldn't load some includes (/var/www/site/inc/inc.php).

/var/www/site/index.php
             /inc/inc.php

Browser error is 502 Bad Gateway.

I tried to set these options in server.ini with no luck. Does it make any sense?

hhvm.sandbox.directories_root = /
hhvm.source_root = /
hhvm.sandbox.home = /
hhvm.server.always_use_relative_path = false

nginx:

server {
        server_name localhost;
        root /var/www/site;
        index index.php;
        location / {
                try_files $uri $uri/ /index.php?$args;
        }
        include hhvm.conf; #standard 3.8
}

In addition, did I mention right that in error messages HHVM remove first part of the include path before actually site-root?

  • 写回答

1条回答 默认 最新

  • douxiu6835 2015-07-17 14:37
    关注

    The problem was in DOS endline characters. Look like HHVM doesn't interpret it right. In browser you get 502 Bad Gateway error, but terminal hhvm error is file not found. Also strange -- if there is echo output in that included file -- problem disappear.

    So I convert included file with dos2unix and problem has been solved.

    To find out all php files and convert it to unix-style, run this in the root directory of the site:

    apt-get install dos2unix    
    find . -name "*.php" -exec dos2unix {} \;
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 求快手直播间榜单匿名采集ID用户名简单能学会的
  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历