#16111 [Com]: IIS + PHP CGI == special administrative concerns
| From: | amr at msexpert dot com | Date: | Mon, 14 Mar 2005 00:02:13 +0000 |
| Subject: | #16111 [Com]: IIS + PHP CGI == special administrative concerns | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969366960@lists.php.net to get a copy of this message | ||
ID: 16111
Comment by: amr at msexpert dot com
Reported By: ramac10 at hotmail dot com
Status: Open
Bug Type: Documentation problem
Operating System: Windows
PHP Version: 4.2.1
New Comment:
i tried all that on win2003 machine , noting works at all
full permissions , restart , file copy and the =0 option and register
globals .
I closed the window and opened the door and still not working . any
ideas ?
Previous Comments:
------------------------------------------------------------------------
[2004-09-21 07:10:25] rajesh at glidemail dot com
To Everyone complaining that cgi.force_redirect = 0 is not working, I
must say that remove ; (semi-colon) before that line. That is for
comment. Remove line and it might work.
------------------------------------------------------------------------
[2004-07-13 11:03:15] chooilai at yahoo dot com
i using php 4.3.0 with PWS on a Win98 system.
when i try to run phpinfo to test for the installation it comes like
below:
Security Alert! 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. This variable is set, for example, by Apache's Action
directive redirect.
i try a lot of way to do but still the same. t set the
cgi.force_redirect to 0 , the error will ( no file selected) i am sure
that pws is not the problem because i already test for which i type
http://localhost.
pls help me to solve this problem , i already try for two but still
cannot solve it.
thanks
------------------------------------------------------------------------
[2004-06-21 17:19:55] c dot clix at tiscali dot it
I have the solution for the reported problem by "domingodjf at terra
dot es":
He says that with iis+php he had to generate redirects by javascript.
I also had the same problem.
I solved the problem when I switched to full absolute URL. For
example:
header( 'Location: http://' . $_SERVER['HTTP_HOST']
. $path );
I hope this will help.
------------------------------------------------------------------------
[2003-05-12 14:06:43] philip@php.net
The issue of IIS permissions is related to this report but is difficult
(at least for me) to come up with a straight forward comment on the
issue. In doing some research it appears there are many factors that
come into play here most of which fall under "IIS Administration". A
few PHP related resources:
http://www.iis-resources.com/modules/news/article.php?storyid=4
http://forums.devshed.com/archive/5/2002/10/3/45479
Basically the IIS user (usually IUSR_MACHINENAME) needs permission to
read various files and directories, such as php.ini, docroot, and the
session tmp directory... I don't feel comfortable documenting this
without raising potential security issues (aka chmod 777 everything!!!)
but will reopen for future comment. Maybe someone has a nice solution
to this problem and actually knows the topic (I don't).
Also some people have treated this report as a support forum, well,
it's not. Do not ask support questions here.
------------------------------------------------------------------------
[2003-05-12 11:48:36] bcecile at nemak dot com
I was having the same problem, and the it was related to improper NT
permissions. Please be sure that your IUSR_MACHINENAME has read
permissions to the php.ini file. When I had this file in the c:\winnt
folder, only Administrators and the System accounts had read access.
This was fine while running PHP as an ISAPI module because IIS was
loading the DLL using the System account, but once I switched to a CGI
module, I started having problems. This was because IIS was now
launching the exe file as IUSR_MACHINENAME which is did not have
correct read access to the php.ini file.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/16111
--
Edit this bug report at http://bugs.php.net/?id=16111&edit=1