httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Burden" <...@Burden.ca>
Subject Re: [users@httpd] Please Help With Cookies
Date Sun, 30 May 2004 16:36:56 GMT
Hmm...they both are behaving exactly the same for me. I.e. I go to the poll
page, I vote, I'm not allowed to vote any more, etc. then I go to the
phpinfo() page and the array is empty...both on your Win box and your RH
box.

Looks like you're behind a firewall for the Windows box. That might be an
important point.

----- Original Message ----- 
From: "Ryan Schefke" <ryanschefke@triomfgroup.com>
To: <jeffrey_n_Dyke@Keane.com>; <users@httpd.apache.org>
Sent: Sunday, May 30, 2004 12:11 PM
Subject: RE: [users@httpd] Please Help With Cookies


> Hi Jeff,
>
> You seem very helpful so let me explain in detail.  Please let me know if
I
> can e-mail you my "poll.php" script.
>
> Again, it works fine on one box and not on the other.  You can see the
> version of Apache/MySQL/PHP from the files below.
>
> Note, I REALLY want to avoid switching register_global to off since I have
> 100's of pages of php code written already with register_global on. All my
> forms etc. use the short form of variables.  It would be brutal if I had
to
> redo everything. Again, it works find on the windows machine but not when
I
> transitioned my code to the linux box.
>
> On working Windows Machine (cookies working):
> =========================================
> 1 - The below link contains the following code after script executed:
> http://samserver.sytes.net:8080/tgwedding/themes/orangerose/poll.php
>
> <?php
> var_dump($_COOKIE);
> echo phpinfo();
> ?>
> http://samserver.sytes.net:8080/tgwedding/phpinfo.php
>
>
>
> On Linux Machine (cookies not working):
> ========================================
> 1 - The below link contains the following code after script executed:
> http://www.tgwedding.com/tgwedding/themes/orangerose/poll.php
>
> <?php
> var_dump($_COOKIE);
> echo phpinfo();
> ?>
> http://www.tgwedding.com/tgwedding/phpinfo.php
>
>
> Now, what is really weird is that I can write a simple script and
set/write
> a cookie on the linux machine.  For example, this script,
> http://www.tgwedding.com/tgwedding/phpinfo3.php
>
> Contains the code:
> <?php
> setcookie ("test2_ck", "7"); //
> setcookie ("test_ck", "10"); //
> header ('Location: phpinfo2.php');
> ?>
>
> And phpinfo2.php (where it's redirected) contains this code:
> <?php
> echo $test2_ck; //
> echo $test_ck; //
> ?>
>
> WHICH WORKS.
>
> I'M TOTALLY CONFUSED, PLEASE HELP.  My application is worthless without
this
> fix.
>
> Thanks a lot,
> Ryan
>
>
>
> -----Original Message-----
> From: jeffrey_n_Dyke@Keane.com [mailto:jeffrey_n_Dyke@Keane.com]
> Sent: Sunday, May 30, 2004 11:18 AM
> To: users@httpd.apache.org
> Cc: 'Ryan Schefke'; Apache Discussion List
> Subject: Re: [users@httpd] Please Help With Cookies
>
>
>
>
> Hello,
>
> >My code containing cookies running on windows with a working Apache and
> Php installation executed all scripts containing cookies perfectly.
> However, I >transitioned my code to a Linux box with a fresh install of
PHP
> and Apache and now my cookies aren't working.  Below is an example of
> setting and writing >cookie values from one script.  Again, everything
> worked like a charm on my old machine.  That's why I think it has
something
> to do with the Apache or PHP >installation settings.
>
> You forgot to include the code.  What version of PHP are you running on
> each machine? Are you using $_COOKIE['cookiename'] or $cookiename? if the
> latter, try the former.  can you write a small script to set a cookie and
> display its value on the linux box? what does var_dump($_COOKIE) show?
>
> HTH
> Jeff
>
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message