facebook / facebook/hhvm

fastcgi_param PHP_VALUE not working in Apache/Nginx

オープン
#3,730 コメント 8 件 リアクション 1 件 担当者 1 名 @paulbiss に割り当て済み GitHub で見る
php5 incompatibility probably easy webserver
主要言語
C++
スター
18.7k
フォーク
3.1k
平均マージ
1時間 47分
マージ済み PR(30日)
2

説明

According to several comments on various sites, it should be possible to set PHP/HHVM configuration values via the fastcgi_param settings of your webservers host file.

I tried this with Apache 2.4 and nginx 1.4.1 on Ubuntu. In both cases the contents of the variable PHP_VALUE showed up within my script's $_SERVER variable, but had no effect on any ini setting.

Sample Nginx config:

```
location ~ \.(hh|php)$ {
fastcgi_keep_conn on;
fastcgi_pass unix:/var/run/hhvm/sock;
# fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "include_path=\"$document_root/../includes\" \n error_log=\"$do
fastcgi_param SERVERTYPE dev;
include fastcgi_params;
}
```

Tried as local and TCP Socket. Both with PHP_VALUE and PHP_ADMIN_VALUE. Tried as a single setting and as multiple settings seperated by \n with and without quotes. No change whatsoever.

Tested with this PHP code:

```
include_path="/var/www/default/root/../includes"
error_log="/var/www/default/root/../log"
// shortened
)
```

The expected result would be that all settings in PHP_VALUE/PHP_ADMIN_VALUE are used as configuration settings.
A documentation page about what can and what can not be used and how would also be great.

```
Version: HipHop VM 3.0.1 (rel)
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。