session-variables

Session Storing Images for Temporary and retrive and store into model

为君一笑 提交于 2020-01-17 08:41:29
问题 I've been searching for long time of solving the limitation in asp file uploading as the case in my question File Upload: Fail to assign value into File, it still not answered by anybody. At this moment, can i know is there anybody here know how to use session to store an image for temporary, and thereafter retrieve it back to the stream and put it into the model ? 回答1: You could convert the image into a byte array then convert it to a base64 string and save that into the session. Then

Mule session-variable missing from the message, when reading from JMS Queue inside a Component

两盒软妹~` 提交于 2020-01-17 06:41:37
问题 I have requirement where in I need to read message from a JMS Queue from inside a Component. But during this process the session variables associated with the message are missing. But the session variables are available when the same message is read from JMS:inbound-endpoint instead of from inside a component. Here are my sample flows. Main flow sets a session-variable into MuleMessage and posts it onto a JMS:outbound-endpoint <flow name="main-flow" > <some inbound> ... < Some processing >

Grails 2.1.0 app tomcat 7.0.22 Session empty after redirect

馋奶兔 提交于 2020-01-13 16:25:27
问题 I am just learning grails and have a problem with an app that works fine when I run it in Netbeans but shows strange behavior when deployed to Tomcat 7.0.22 on a Centos 5.4 server. I am using the proxy_ajp to make the app available with apache. The problem seems to be with the session not being maintained after a redirect so that I lose the login information causing the app to try to login again. My proxy_ajp settings are <Location /PreyerBooks > ProxyPass ajp://localhost:8011/PreyerBooks

Codeigniter - get all users session data

假装没事ソ 提交于 2020-01-12 18:57:10
问题 I need to get all sessions data and take some actions upon them, is there any possible way to get them, I found how to solve it in php but codeigniter use's it own custom sessions library. Native php $_SESSION How can I do it in codeigniter 回答1: To get all session data you can use $this->session->all_userdata(); To print all your session variable use this line anywhere in your code : echo '<pre>'; print_r($this->session->all_userdata());exit; 回答2: You can use db session. So data will be

Safari and php sessions not working in facebook iframe

馋奶兔 提交于 2020-01-12 02:22:12
问题 I'm having a problem to make my facebook app working on Safari. The issue is related to the PHP session variables. I am aware that Safari has a problem dealing with cross domain sessions (inside an iframe) and i found around 2 types of solutions: Setting the p3p header: i've tried many p3p header found around but no one of them worked [for example: header('P3P: CP="NOI ADM DEV COM NAV OUR STP"'); ]. Sending a post to the iframe, using javascript. This creates interaction and sessions should

php $_SESSION variables disappear and reappear randomly

扶醉桌前 提交于 2020-01-11 07:32:10
问题 Preface : this is a "development" from an earlier question of mine, whose answers didn't solve my problem in the end. But through trying all the suggestions and also trying other stuff, I discovered that the real problem is something else, so I rephrase my question here I have a login page/system which has worked correctly for years, leaving the user logged in until he/she either closes the browser window or logs out manually. But lately after only a few minutes of inactivity the session

Cache data in PHP SESSION, or query from db each time?

久未见 提交于 2020-01-11 04:54:05
问题 Is it "better" (more efficient, faster, more secure, etc) to (A) cache data that is used on every page load in the $_SESSION array (but still querying a table for a flag to reload the data fresh), or (B) to load it from the database each time? I'm using the cache method (A), but I'm worried that with hundreds of users, memory could become an issue? It's just simple data, like firstname, lastname, birthday, etc. With either method, there's still a query being run. Thoughts? 回答1: If your data

Use variable set by psql meta-command inside of DO block

£可爱£侵袭症+ 提交于 2020-01-10 05:11:21
问题 Here's what I would like to do: \set values foo,bar,baz DO $$ DECLARE value TEXT; values TEXT[] := string_to_array(:'values', ','); BEGIN FOREACH value IN ARRAY values LOOP raise notice 'v: %', value; END LOOP; END $$ LANGUAGE plpgsql; Which results in the following error: ERROR: syntax error at or near ":" SELECT string_to_array(:'values', ',') INTO values... ^ Here's the solution I have currently, but it feels hacky: \set values foo,bar,baz PREPARE get_values AS SELECT string_to_array(:

Where to store Facebook access token in ASP.NET MVC?

做~自己de王妃 提交于 2020-01-07 03:15:07
问题 In my ASP.NET MVC app, when I authenticate the user with OAuthWebSecurity, Facebook sends back an ExtraData which contains the access token. Initially I thought of storing this in the database, but it says in the FB docs: You should also remove the stored access token. ...when logging the user out. So the token should be handled as a session variable, but in ASP.NET MVC I don't have session variables (or there are ways, but it's not a good pattern). What is the best way to store the FB user

Delay in populating session.upload_progress data

你离开我真会死。 提交于 2020-01-06 15:07:25
问题 I'm trying to check the progress of files uploaded. I'm using the Kohana framework which has a Session class, but for the upload progress I'm using native PHP sessions. I'm calling session_start() in Kohana's bootstrap.php, which means session_start() will be called on every page request. After the upload form is submitted, I wait 1 second and then begin calling a PHP file to check the upload progress using jQuery $.ajax() . The problem is that $_SESSION[$key] ($key contains the key for the