Jul 052007
PHPをCGIモードで動かそうと先頭に#!/usr/bin/php
を書いて拡張子を.cgiにしたら以下のエラーになりました。
Security Alert! The PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.
For more information as to why this behaviour exists, see the manual page for CGI security.
For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.
.phpの拡張子のままでCGIとして動かすか、php.iniでcgi.force_redirect = 0
を設定すればとりあえず回避できますが…。セキュリティ上問題があるのかな。もうちょっと調べよう。
Sorry, the comment form is closed at this time.