perl/PHP sessioning

L

Lee

Hi, I wanted to know how to use PHP sessioning with Perl.

In short, I am using sessioning to keep track of particular variables
between SOAP calls. The SOAP server is being run with PHP and cannot
be changed to another language because of the PHP infrastructure that
has already been built. When I use a PHP client, it remembers the
variables. When I use SOAP::Lite, it does not remember the session
variables. How can I make Perl interface with PHP's sessioning?
Thank you for any help.

My problem is detailed very well on the PHP forum at
http://groups.google.com/group/comp.lang.php/browse_thread/thread/7657d5bf882f287b
 
R

RedGrittyBrick

Hi, I wanted to know how to use PHP sessioning with Perl.

In short, I am using sessioning to keep track of particular variables
between SOAP calls. The SOAP server is being run with PHP and cannot
be changed to another language because of the PHP infrastructure that
has already been built. When I use a PHP client, it remembers the
variables. When I use SOAP::Lite, it does not remember the session
variables. How can I make Perl interface with PHP's sessioning?
Thank you for any help.

My guess is that you need your Perl client to preserve and regurgitate
cookies

http://cookbook.soaplite.com/#using cookies

I don't plan on joining a PHP newsgroup - sorry.
 
L

Lee

Cookies was exactly right, thank you. Here is the solution that
worked.

use strict;
use warnings;
use Data::Dumper;
use HTTP::Cookies;
use SOAP::Lite;# on_debug => sub{print@_};

my($response,$value);

my $cookieFile="./cookie.txt";
my $cookie=HTTP::Cookies->new(ignore_discard=>1,file=>
$cookieFile,autosave=>1);

my $soap = SOAP::Lite
-> uri('http://mgip2.biology.gatech.edu')
-> proxy('http://mgip2.biology.gatech.edu/api/apiServer4.php')
;
$soap->transport->cookie_jar($cookie);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top