ha lzzy | 26 Oct 2011 11:16
Picon

How "xmlrpc_client" use session_id

hello,

Xmlrpc Server: PHP Zend Server.
Xmlrpc Client: C++.

Problem:
I want save my auth info use Session in php,just like
$_Session["login"]="ok". but if xmlrpc_client request server again,I can't
get  $_Session["login"] value.

What should I do

thanks a lot

[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/xml-rpc/join
    (Yahoo! ID required)

(Continue reading)

Gaetano Giunta | 28 Oct 2011 18:41
Picon
Gravatar

Re: How "xmlrpc_client" use session_id

ha lzzy <lzzy.ha2011 <at> gmail.com> wrote on 26/10/2011 11:16:
>
> hello,
>
> Xmlrpc Server: PHP Zend Server.
> Xmlrpc Client: C++.
>
> Problem:
> I want save my auth info use Session in php,just like
> $_Session["login"]="ok". but if xmlrpc_client request server again,I can't
> get $_Session["login"] value.
>
> What should I do
>
Use an xmlrpc client that supports session cookies.

Not all clients support sessions cookies, and not all of those who do do it automatically, you might have to
set some config in the client.
If the client does not support session cookies, on the 2nd call you will not find his session on the server any more.

If you can not change the client, you need to manage authentication in some other way:
- have the auth credentials sent in every request, do not use sessions
- have the client call a 1st service to authenticate, send him back a session token in the xmlrpc answer. In
all other calls, require the client to send the
token along with the request and validate it

Bye
Gaetano

>
(Continue reading)


Gmane