Re: PHP+IIS - POST data propagate along redirect with header (Location: ....)
| From: | The.Rock | Date: | Mon, 07 Jul 2003 18:31:43 +0000 |
| Subject: | Re: PHP+IIS - POST data propagate along redirect with header (Location: ....) | ||
| References: | 1 2 3 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-20723@lists.php.net to get a copy of this message | ||
You don't have restart IIS if your running in CGI mode.
"Stephen March" <steve@enerds.ca> wrote in message
news:3F095E11.6050207@enerds.ca...
> Sorry, I should also mention you will have to restart your IIS
> server. From a command prompt,
> (on the server) issue the command:
>
> net stop iisadmin
>
> (type Y - if you have the publisher service active)
>
> net start w3svc
>
> Or reboot it, if you like :)
>
> ~Steve
>
> Stephen March wrote:
>
> > In your php.ini (c:\windows\php.ini for 9x, xp, c:\winnt\ for
> > NT4, 2000 => around line 365)
> > make sure Register Globals = Off.
> >
> > Register globals does just that, creates global variables from any
> > data posted to from a form.
> > As you've noticed it's not the most secure thing, to have these
> > variables accessible to all your
> > scripts.
> >
> > Cheers,
> > ~Steve
> >
> > Sebastian Baran wrote:
> >
> >> Hello,
> >>
> >> Has anybody experienced such problem? Let's have script "a.php" with
> >> form
> >>
> >>
> >> <form name="myform" action="a.php" method="POST">
> >> <input name="field" ...>
> >> ....
> >> </form>
> >>
> >>
> >> Script "a.php" receives POST data and process them, then executes
> >> redirect:
> >>
> >> header("Location: b.php");
> >>
> >> And then on most configurations (like Apache+PHP, no matter on windows
> >> or unix) script "b.php" has no idea about data from form "myform".
> >> But I've
> >> found that "my" server, wich is IIS, sends somehow POST data to
> >> "b.php"!!! More, if we "b.php"="a.php" we have a loop!
> >> Cause "a.php"
> >> checks if there is something in POST and then redirects to itself.
> >>
> >> *********** a.php BEGIN *********
> >> <?php
> >> if ($_POST["field"]) {
> >> (do something)
> >> ...
> >> header("Location: a.php");
> >> }
> >> ?>
> >> <form action="a.php" method="POST">
> >> <input name="field" ...>
> >> ....
> >> </form>
> >>
> >> ************ END ****************
> >>
> >> How to get lost of POST data? Is it a bug in IIS, php or something
> >> else?
> >>
> >> Thanks in advance!
> >>
> >>
> >> my configuration:
> >>
> >> PHP Version 4.3.2
> >>
> >> System Windows NT WEB 5.0 build 2195 Server API CGI/FastCGI
> >> SERVER_SOFTWARE Microsoft-IIS/5.0
> >>
> >>
> >>
> >>
> >
> >
> >
>
>