David Okwii
David Okwii

Reputation: 7840

working with php session variables for an xmlrpc client in php

am working on a menu-drived USSD app developed in php. My app communicates with a telecom's ussd server using xmlrpc client-server interactions. so each time a mobile user sends a request to the telecom network which inturn re-routes that request to my php through the telecoms USSD gateway/server, my websever(apache) interpretes each request as an entirely new session, so the session variable values i set for one request are not passed on the next request even if it's still the same session. Am wondering why this is so and how i can solve this problem, so that i have my session values set for as long as the session is not ended. Thanks in advance.

Upvotes: 1

Views: 1095

Answers (1)

HorusKol
HorusKol

Reputation: 8706

How do you define "session"?

The XML-RPC client in this case needs to inform the server that it has a session - this is usually done silently by a cookie (PHP will send a Set-Cookie on session start with the id), or by a GET parameter in the URL. You could even do it yourself within the RPC response/request (although you'd have to write your own session handlers to extract the session ID).

Without that identifier - your server will treat each new request as a new session.

Upvotes: 1

Related Questions