PHP:Al intentar ejecutar PHP me da este error: "Security Alert! The PHP CGI cannot be accessed directly"

De Foros del Web

En instalaciones de PHP como CGI, caso de PHP bajo PWS, IIS, OmniHTTPd y varios mas incluido Apache si es como CGI ... Suele presentar este error de configuración:

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.

La solución está en configurar php.ini con la siguiente directiva:

Directiva php.ini:

; cgi.force_redirect = 1


dejarlo a:

cgi.force_redirect = 0

Reiniciar el servidor HTTP que se use y listo.


--Cluster 17 Ene 2003

Este artículo es parte de las FAQs de PHP y el Manual de PHP.

Herramientas personales