# Keeping state on the server

**URL:** <https://forum.kirupa.com/t/keeping-state-on-the-server/290211>\
**Category:** flash\
**Created:** [June 11, 2009, 10:01am UTC](https://forum.kirupa.com/t/keeping-state-on-the-server/290211 "2009-06-11T10:01:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![icio](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/icio/32/484_2.png) [@icio](https://forum.kirupa.com/u/icio)\
**Post date:** [June 11, 2009, 10:01am UTC](https://forum.kirupa.com/t/keeping-state-on-the-server/290211/1 "2009-06-11T10:01:23Z")

</div>

I understand that this a server-based question, but it’s much more suited to Flex developers who have server-side programming experience. The thread does belong here.

I am in the process of writing a Flex AIR application which is quite large and complex and as such I am using the Cairngorm framework to organise the application. So far, it’s working quite nicely.

I am using RemoteObject requests to the server (using Zend\_AMF on PHP) to get and receive data from the client. This is also what I’m using for the login method, where I send a partially filled UserVO (username and password are the only fields set) value-object and it returns a full UserVO if the login is valid and `null` if the login is invalid. This is working fine.

The problem comes in storing the information between requests. I initially set about using sessions (Zend\_Session implementation) but the sessions don’t seem to be maintained between requests whether I use cookies or not.

**Can sessions be used in RemoteObject service requests? How? If not, what can I use?**

I understand that RemoteObject instances have `setCredentials` functions but I can’t seem to find much about how these work in the back-end.

Thanks!
