freelanceprogrammers.org Forum Index » PHP
Sharing cgi cookies
Joined: 22 Nov 2005
Posts: 2
Sharing cgi cookies
Hi all!
I have a problem. I have an application runing built in perl-cgi, now i want to
develope it further in PHP. But I dont want to re-invent the wheel, I mean I
want the working application running in cgi. Once a user logs in using cgi it
maintains a cookie. Now if I want to share that session I must have access to
that cookie. But problem is that this cookie is not accessible in php. Does any
one has solution?
Regards
Saleem
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
Joined: 06 Sep 2005
Posts: 16
Sharing cgi cookies
Any cookies in the local domain shold be equally available to perl, php
or javascript as well as anything else that handles cookies (or http
headers.)
On Nov 22, 2005, at 5:37 AM, Salim Ahmed wrote:
> Hi all!
> I have a problem. I have an application runing built in perl-cgi, now
> i want to
> develope it further in PHP. But I dont want to re-invent the wheel, I
> mean I
> want the working application running in cgi. Once a user logs in
> using cgi it
> maintains a cookie. Now if I want to share that session I must have
> access to
> that cookie. But problem is that this cookie is not accessible in
> php. Does any
> one has solution?
> Regards
> Saleem
[Non-text portions of this message have been removed]
Joined: 22 Nov 2005
Posts: 2
Sharing cgi cookies
Have you ensured that the session cookie name in the php.ini is set
correctly?
default would be PHPSESSID so you might need to change it because the
cgi session cookie might have another name.
--- In php-objects@yahoogroups.com, Salim Ahmed <salimkamboh@y...> wrote:
>
> Hi all!
> I have a problem. I have an application runing built in perl-cgi,
now i want to
> develope it further in PHP. But I dont want to re-invent the wheel,
I mean I
> want the working application running in cgi. Once a user logs in
using cgi it
> maintains a cookie. Now if I want to share that session I must have
access to
> that cookie. But problem is that this cookie is not accessible in
php. Does any
> one has solution?
> Regards
> Saleem
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
>
Joined: 06 Sep 2005
Posts: 16
Sharing cgi cookies
umm, actually I bet the cookie is being formed with a default path to
the current directory, which might be /cgi-bin? I like firefox`s web
developer toolbar, it has a button to show all cookie data and answer
such questions for me. Anyhow, your perl cgi may need to set the path
of the cookie to "/" to make it available to a php or javascript served
from another directory. I`ve also had occasion to need to set a cookie
for ".domain.tld" where www.domain.tld was my own server`s pages and
members.domain.tld was another server which had the member login data
apps on it.
At any rate, the bottom line is that you can manage to do an enormous
bunch of things with cookies but it isn`t always very straightforward.
It does need to be within the same domain - and domain.tld does not
equal www.domain.tld (but *.domain.tld does.) Setting up proper dns
records and setting proper paths in your cookies can squeeze a whole
lot more functionality out of them.
-m
On Nov 22, 2005, at 7:24 AM, Michael Slavin wrote:
> Any cookies in the local domain shold be equally available to perl, php
> or javascript as well as anything else that handles cookies (or http
> headers.)
>
[Non-text portions of this message have been removed]
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







