Installing PHP on IIS 6.0 (Windows 2003)?
07-06-2004, 12:26
|
#1
|
|
Inactive
Join Date: Jun 2003
Location: UK
Posts: 4,988
|
Installing PHP on IIS 6.0 (Windows 2003)?
I've just installed the latest PHP version ( PHP 4.3.7 installer [1,048Kb] - 02 June 2004) on my windows 2003 server.
I'm now getting an error, which seems Apache related
Quote:
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.
|
Any clues on how to fix this?
|
|
|
07-06-2004, 12:38
|
#2
|
|
Inactive
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
Did you copy php.ini to c:/windows/ ?
It's best to use php.ini-recommended, copy this to c:/windows/ then rename it to php.ini.
|
|
|
07-06-2004, 12:40
|
#3
|
|
Inactive
Join Date: Jun 2003
Location: UK
Posts: 4,988
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
Yeah php.ini is there. Don't know where php-ini-recommended is tho?
|
|
|
07-06-2004, 12:43
|
#4
|
|
Inactive
Join Date: Jun 2003
Location: Belfast
Age: 46
Posts: 4,594
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
http://www.phpbuilder.com/lists/php-...02122/0038.php
Quote:
From the webpage....
I have posted the solution to this on the php-windows mailing list. When
you install PHP on .Net (rather, IIS 6.0) you have to manually add in the
ISAPI or CGI into the IIS Control Panel. Once you have done that, there
is
a "Web Service Extensions" or something to that effect in the IIS Control
Panel. You have to manually setup a rule to allow the php.exe to run.
Once
you have this done, php should be able to run without problem. If you
need
any further help, please feel free to contact me and I'll walk you through
the setup.
|
|
|
|
07-06-2004, 13:00
|
#5
|
|
Inactive
Join Date: Jun 2003
Location: UK
Posts: 4,988
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
I tried that and no help
tbh, I then read the link and the post asking help is already in reply to the above help...so it was never going to help anyway!
|
|
|
07-06-2004, 13:04
|
#6
|
|
Inactive
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
Is there any reason why you can't use Apache on this machine?
|
|
|
07-06-2004, 13:11
|
#7
|
|
Inactive
Join Date: Jun 2003
Location: UK
Posts: 4,988
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
I use IIS for an ASP applilication. I need PHP and MYSQL for VBulletin.
No, I suppose but I feel reluctant to install it. I simply don't have time.
|
|
|
07-06-2004, 13:20
|
#8
|
|
Inactive
Join Date: Jun 2003
Location: Belfast
Age: 46
Posts: 4,594
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
What about this?
http://forums.susserver.com/index.ph...opic=638&st=75
Quote:
mostly its a setting in the php.ini file, normaly placed in %WINDIR% .
there is a switch called cgi.force_redirect, this switch has to be zero.
cgi.force_redirect = 0
|
Heres another link about it which says pretty much the same
http://forums.devshed.com/archive/t-44144
|
|
|
07-06-2004, 13:23
|
#9
|
|
Inactive
Join Date: Jun 2003
Location: UK
Posts: 4,988
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
It's 0 (zero) by default
|
|
|
07-06-2004, 13:26
|
#10
|
|
Inactive
Join Date: Jun 2003
Location: Belfast
Age: 46
Posts: 4,594
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
Quote:
|
Originally Posted by Caspar
It's 0 (zero) by default 
|
Its not commented out or anything is it?
|
|
|
07-06-2004, 13:30
|
#11
|
|
Inactive
Join Date: Jun 2003
Location: UK
Posts: 4,988
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
Nope there's no ; before it?
Can I just confirm that 0 (zero) means OFF, it's not some dodgy PHP inverted thing ao anything!!!
|
|
|
07-06-2004, 13:45
|
#12
|
|
Inactive
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
Correct.
|
|
|
07-06-2004, 13:50
|
#13
|
|
Inactive
Join Date: Jun 2003
Location: Belfast
Age: 46
Posts: 4,594
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
Did you restart the server after making the change?
|
|
|
07-06-2004, 13:53
|
#14
|
|
Inactive
Join Date: Jun 2003
Location: UK
Posts: 4,988
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
I have, even rebooted the server a few times
|
|
|
07-06-2004, 13:55
|
#15
|
|
Inactive
Join Date: Jun 2003
Location: Belfast
Age: 46
Posts: 4,594
|
Re: Installing PHP on IIS 6.0 (Windows 2003)?
Are you sure its reading the correct ini file? try this, if this doesn't work I've no idea. sorry
12. How do I know if my php.ini is being found and read? It seems like it isn't as my changes aren't being implemented.
To be sure your php.ini is being read by PHP, make a call to phpinfo() and near the top will be a listing called Configuration File (php.ini). This will tell you where PHP is looking for php.ini and whether or not it's being read. If just a directory PATH exists than it's not being read and you should put your php.ini in that directory. If php.ini is included within the PATH than it is being read.
If php.ini is being read and you're running PHP as a module, then be sure to restart your web server after making changes to php.ini
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 09:41.
|