Welcome Guest, Not a member yet? Register   Sign In
How to send flashdata to a different session
#1

Hi Team,

We are using CI v3 with a file based session management scheme.

We have a situation where a user initiates a web transaction which results in a callback to our ubuntu apache2 web server. The callback is dealt with by its own controller.

What I would like to do is somehow connect the new instance back to the originating session so that I can set some flashdata to be displayed on the next page rendering.

In the bad old days session_id was available in userdata() but now its not. The callback has the originating session id as part of the URL, and I am struggling to find any help on how to achieve what I want.

I read something about using session_id() in PHP but it made reference to doing this before session_start() and we autoload the session library.

Can it be done please, and if so how?

Help appreciated, regards Paul
Reply
#2

Is their any mileage in saving the users instance and posting flash data to it from the new controller session?
Reply
#3

Well clearly no one has tried it or I am stupid to ask! For info if anyone faces same problem my own efforts were as follows:
1) I did try writing the __ci_vars structure into the required session file and it messes up the session as per comment in the configure file
2) Next I considered using sessionStorage but could not find a way of accessing it from my php environment3) lastly I simply wrote a “flag” file to the file system which was watched for by a timed repaying Ajax request which we use for all sorts of user updates and that achieves my user notification successfully from the disconnected callback controller.
Apologies if I have wasted anyone’s time.
Reply
#4

You could store the information in the browsers local storage or in a cookie.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB