?
Solved

PHP 5 Installation Problems-- Security Alert! even when cgi.force_redirect = 0

Posted on 2004-08-08
7
Medium Priority
?
1,305 Views
Last Modified: 2013-12-13
Hi,

Trying to Install PHP 5 on Windows Server 2003 IIS 6. I've used the latest PHP5 installer and chosen all the correct options. PHP is installed to e:/PHP.

I receive the following:
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.

I've read all the posts on this which suggest that this is caused by an incorrect cgi.force_redirect = setting. I can confirm that c:/windows/php.ini has cgi.force_redirect = 0 set and machine has been rebooted. I tried ISAPI installation as well but did not get any joy whatsoever so have reverted to cgi. I even tried reinstalling PHP from the installer, but continue to receive the same error.

IIS shows, under app configuration, .php has exec path e:\PHP\php-cgi.exe and confirms php is added as a web service extension set to allowed with the same path.

Any thoughts?
0
Comment
Question by:jbreg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 27

Expert Comment

by:Diablo84
ID: 11746605
This is an issue that i have seen come up a lot with IIS however usually the problem is fixed with cgi.force_redirect = 0

My advice is switch to Apache, a more reliable web server in my opinion. http://httpd.apache.org/download.cgi
I recommend you get version 1.3.
0
 

Author Comment

by:jbreg
ID: 11747439
Unfortunately that is simply not an option--in addition to the php requirement we have a bespoke web application tailored to IIS. There must be a solution (other than switching to PHP4) as I have another server in the same rack with the same OS with PHP4.x that works fine; everything virtually identical...
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 11751555
You could try using the ZendWinEnabler?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:jbreg
ID: 11751694
This *should* be resolvable without resorting to third-party software, no?
0
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 1000 total points
ID: 11751798
Maybe!

But I'd hardly call Zend tools third party. Why are you not using the ISAPI module? There are a lot of benefits.

Least of all databse connection caching. Avoids (nearly) all those complicated licensing modules you need for a MS SQL server.
0
 

Author Comment

by:jbreg
ID: 11751820
i gave ISAPI a shot, following exactly the instructions on another ee posting, but couldn't even get anything to work out of that. Possibly because the instructions dealt with PHP 4, but I don't know--are there any really good step by steps for ISAPI on W2003 server with PHP 5?
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 11752853
Should not be any different.

I use Sambar Server and PHP5.

Takes less than 5 minutes to get them both installed and running. Apache takes a little longer (about 8 minutes).

I've never managed to get IIS to work.

If you have a chance, try sambar (www.sambar.com) or apache.

Sambar is a VERY small server. Nothing in Windows\system32 or the registry other than the uninstall links for Add/Remove programs.

Richard
0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question