The server is not the client. I've tried the same code on two different
servers, browing with various versions of IE, Netscape, Mozilla, and
Konqueror.
However, I can live with this, because I put the beta version (a rewrite) of
the code on the new webserver, and it works. I find it very odd that the old
one doesn't though, considering that it's the same Apache/PHP configuration,
and the same code, on both machines. Only difference is PHP v4.0.6 on the
old one, vs. PHP v4.1.1 on the new one.
If anyone is interested, I can send a tarball of the old code.
- Casey
On Tuesday 15 January 2002 10:22 am, Richard Crawford wrote:
> On the new machine, does your code work in Netscape or Mozilla or Opera?
>
> Does it work in IE on other machines?
>
> If yes, then double-check the security settings in the new installation
> of IE on the new computer.
>
> Casey Allen Shobe wrote:
> > I've set up a new machine in a production environment to roll over an
> > existing PHP script onto. Unfortunately, I'm running into a strange
> > error:
> >
> > I have a login form, using fields named 'username' and 'password'. These
> > are also used as variables. Using IE, the cookie never shows up as I
> > would expect it to in the cookies directory. Additionally, I can't login
> > as the variables are returned as null values to the script.
> >
> > Even stranger...I made a test.php that just echoes $username. I call it
> > with ?username=test, and it works. Then I try the script that sets
> > cookies, and it doesn't work. Then I go back to the same test.php
> > request, and it doesn't show the value I passed to it (though it will
> > show ones of other names that I didn't try to set in a cookie)!
> >
> > I know the code is valid, as it's working fine on 2 other production
> > machines.
> >
> > I had PHP compiled into Apache, and just rebuilt both using APXS...same
> > results.
> >
> > This is the code that I'm passing $username to, that totally screws
> > things up, but works on other machines:
> >
> > if ($username != null) {
> > $time = mktime()+3600;
> > $date = gmdate("D, d-M-Y H:i:s", ($time));
> > header ('Set-Cookie: username='.$username.'; expires='.$date.' GMT;
> > path=/; domain='.$SERVER_ADDR);
> > }
> >
> > Restarting IE makes the test.php page work again...nothing else. Please,
> > if anybody could assist or ask me for any other information required to
> > diagnose, I would be very thankful. I need to get this working ASAP, and
> > have been fighting it to no avail for the past few hours.
--
Casey Allen Shobe
[EMAIL PROTECTED]
'Why do people with closed minds always open their mouths?'
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]