|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-03-15 23:05 UTC] ramac10 at hotmail dot com
Following the instruction with the CGI/Manual instalation does not work with PWS on a Win98 system. 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. You may disable this restriction by recompiling the PHP binary with the --disable-force-cgi-redirect switch. If you do this and you have your PHP CGI binary accessible somewhere in your web tree, people will be able to circumvent .htaccess security by loading files through the PHP parser. A good way around this is to define doc_root in your php.ini file to something other than your top-level DOCUMENT_ROOT. This way you can separate the part of your web space which uses PHP from the normal part using .htaccess security. If you do not have any .htaccess restrictions anywhere on your site you can leave doc_root undefined. If you are running IIS, you may safely set cgi.force_redirect=0 in php.ini. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 08:00:01 2025 UTC |
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: ShelleyHello shelley win2000 + iis + php I had the same problem with header("Location....) redirects. And I don't have a solution only have one ugly code to do the same... echo "<script language='javascript'> document.location.href=$url</script>"; I hope change this code on the future, when somebody will have a solution. DJF