#16111 [Com]: IIS/CGI only gives "Security Alert! PHP CGI cannot be accessed directly."
| From: | shelley at databyte dot com | Date: | Mon, 26 Aug 2002 21:32:54 +0000 |
| Subject: | #16111 [Com]: IIS/CGI only gives "Security Alert! PHP CGI cannot be accessed directly." | ||
| References: | 1 | Groups: | php.bugs php.doc |
| Request: | Send a blank email to phpdoc+get-969348368@lists.php.net to get a copy of this message | ||
ID: 16111
Comment by: shelley@databyte.com
Reported By: ramac10@hotmail.com
Status: Open
Bug Type: Documentation problem
Operating System: Windows
PHP Version: 4.2.1
New Comment:
I read bug this bug and have changed my security setting on IIS and it
makes
no difference. I'm also using Zend, Smarty & ADODB. In addition I'm
running on a pentium 4. I am
having major problems in our login program and took the code out into
a
seperate test problem, and am still having the same redirect problems.
I have been checking the Forums in the PHP community for the last week
and
find this seems to be a problem. I've tested the following code and it
only will re-direct 1 time out of 5 or 6 times, of executing the
code(with
no code changes). It gives an error message the other times.
Here is my test program:
<?
include_once("config.inc"); // Include files smarty etc.
include_once("conn.inc"); // ADODB Connection
session_start();
$sess_key=session_id();
$access = 'grant';
$page_name='page1.php';
$login='shelley';
$HTTP_SESSION_VARS['saccess'] = $access;
$HTTP_SESSION_VARS['susername'] = 'Shelley Jones';
$HTTP_SESSION_VARS['suserid'] = $login;
$HTTP_SESSION_VARS['suseris'] = 'Cust';
$HTTP_SESSION_VARS['spage'] = $page_name;
header("Location:page2.php?K=".$sess_key."&L=".$login);
flush();
exit;
Error Msg recieving.
CGI Error
The specified CGI application misbehaved by not returning a complete
set of HTTP headers. The headers it did return are:
Shelley
Previous Comments:
------------------------------------------------------------------------
[2002-06-18 05:48:22] derick@php.net
Leaving this open as a doc problem.
Derick
------------------------------------------------------------------------
[2002-06-18 05:39:30] michael@phpdevshed.com
Ok .. Big Oops
No BUG!
Big lesson:
This is to do with permission settings when installing php. Make sure
your IIS user or everybody has permissions to access php and dlls in
the php directory.
Sorry guys :)
------------------------------------------------------------------------
[2002-06-18 05:15:53] michael@phpdevshed.com
>The problem was the php.exe was not reading the php.ini
>in the system32 directory as per normal.
Sorry I meant to say "winnt" folder and not "system32"
------------------------------------------------------------------------
[2002-06-18 04:05:09] mfischer@php.net
It's c:\winnt\ as stated in
http://cvs.php.net/co.php/php4/win32/install.txt
------------------------------------------------------------------------
[2002-06-18 03:59:42] michael@phpdevshed.com
Ok people here is the problem.
I had the same the problem on a newly built server Win2K SP2 with the
latest PHP release. After hours of messing around to get this thing to
work - I finally found the problem.
The problem was the php.exe was not reading the php.ini in the system32
directory as per normal.
I ran a phpinfo() from the commmand line (DOS Window) checked the
"Configuration File (php.ini) Path" and surely enough the path was
pointing to where my php scripts where located on the webserver doc
root (e.g. c:/www/www.umm.com/doc/php.ini), so I moved the php.ini file
to this folder - and guess what? it worked.
I can't see anywhere where I can set the configuration file path - and
i don't think its very wise to store php.ini in the web folder.
Is this a bug? If so please can you fix this ASAP - this is truly a
show-stopper!
------------------------------------------------------------------------
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