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 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 Macbookpro 连接热点正常上网,连接不了Wi-Fi。
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题