session

controll the hibernate session(when to close it manually)

I am new in hibernate,after read the hibernate api and tutorial,it seems that the session should cloesd when not used. Like this: Session sess=getSession(); Transcration tx=sess.beginTranscration(); //do something using teh session sess.save(obj); tx.commit(); sess.close; I have no question when using it in a standlone application. ...

Oracle mutiple session for an application

Hi ! I have a problem. Well, I have an VB6 app that connects to an oracle database. Normally it uses just one session to connect to the database, but after running an update query on a table, it opens another one, on wich it runs just one query : SELECT VALUE FROM SYS.NLS_DATABASE_PARAMETERS WHERE PARAMETER = 'NLS_NCHAR_CHARACTERSET'...

Magento (session or cache) problem causing products disappear until page is refreshed

I am running Magento 1.3.2.4 (MySQL 5.1.5 and PHP 5.2.4) and am finding that products do not show up in categories until the page is refreshed. This means that when you access a category page for the first time, it is empty, then when you refresh the page, the products appear. The URL of the site follows. If you navigate to any subcateg...

Drupal $_SESSION issue (value not being retained)

I have 2 php files that are being used to set and retrieve a very specific session variable. The initial script sets the value like: require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION); if(($_POST['region'])){ $_SESSION['region'] = $_POST['region']; print '1'; }else{ print '0'; } an...

Get $_SESSION position with &

Why this code doesn't work? public function get($key) { return isset($_SESSION[$key]) ? &$_SESSION[$key] : false; } Error Parse error: syntax error, unexpected '&' in C:\Arquivos de programas\EasyPHP-5.3.3\www\myphpblog\code\sessionstorage.class.php on line 12 Thank you. ...

Destroy CakePHP session when close browser.

I need to keep Security.level set on medium for Ajax reason. But I want that If the user close browser his session will destroy. How can I do that? Thanks in advance! ...

Drupal trigger on Session-timeout

Is there a way to set up a Drupal trigger to fire off on Session time out? I've seen iTweak login, but that trigger only fires if the user has clicked/visited logout. I need something to fire even if they hold the power button and hard shut their PC. Is there a Drupal solution for this out there? ...

session_set_save_handler - Why isn't this code working?

Hello, I've been trying to save PHP session data in a MySQL database, but can't get it to work. For a simple example, here's code that should increment a counter with each visit. I've seen other examples, etc. but can someone please tell me why this code isn't working? (Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5....

How does .NET session handling work? Sessions eat up all memory if cookies are disabled.

Hi, In my project I have configured .NET's sessions to go into database. I also have a global.asax which implements Session_Start(). In Session_Start() I write three things to the session: The time the session started. The user's host address. A serializable device object wrapping the user's agent. The problem is now that users whic...

Store the session of Facebook from WebView

Hi all, I'm trying to avoid that when a user has connected to Facebook from my webview, the next time he do it, doesn't need to put the email and password. I'm getting the cookie from the "facebook.com" domain with this sentence: String cookie = CookieManager.getInstance().getCookie("facebook.com"); and storing it in a SQLite database...

Save new object with Hibernate using supplied ID

I want to save some Objects to database with predefined IDs using Hibernate. Is it possible to do it using save method of Hibernate session? I know there are following workarounds: 1) execute SQL script with necessary insert statements: insert into MyObj(id,name) values (100,'aaa'), (101,'bbb'); 2) use SQL query in Hibernate: pub...

Reliability of ASP Session Timeout warning

I'm looking to warn the user when his or her session times out (I'm having weird timeout problems) and I found the following code: <% advanceWarning = 2 jsTimeout = (session.timeout - advanceWarning) * 60000 %> <script> window.setTimeout("alert('Session is about to expire');",<%=jsTimeout%>); </script> Is this reliable? ...

asp classic setting session in session_onstart

I have the following excerpt from my global.asa that should set the session timeout to 900 minutes: Sub Session_OnStart Session.Timeout=900 End Sub The sessions, I suspect based on user responses, aren't lasting 900 minutes. It would make more sense if the values are in seconds. Is there an IIS (Windows 2000 server) setting I can...

Using PHP Sessions

Hi All, So, I've been playin' around with sessions in PHP today, and after procrastinating over whether I should use sessions or not since I started PHP about 6 months ago (it looked scary), I've found it to be quite simple. But I am using time() as a session id, I'll explain why... I found a page on session reference in php.net websit...

php session lost when using paginate

Hi my PHP session is lost when using a pagination script. can someone explain why this would happen? I tried putting session_start() at the top off all the paginate script file but that did not work. session_start(); $_SESSION['user'] = $line['UserName']; $_SESSION['pass'] = $line['Password']; $_SESSION['session_...

Disable session creation in Django

I'm looking to disable the automatic session creation in Django for certain URLs. I have /api/* and each client that hits that gets a new Django session. Is there a way to ignore certain urls? ...

How to access ASP.Net Session object outside the web project (class library)

I am implementing a custom membership and role providers where I need to store all the role/membership information in the user's session. I am implementing these custom providers inside a class library project (different from the website project) and need to access the session in them. The idea is to store the role/membership related in...

Does opening and closing sessions impact performance?

I have a PHP script that is run through an AJAX call, and it can sometimes take very long (up to 30 seconds) for some people. To help keep the visitor's attention, I show a progress bar of how far along the process is, as well as listing random facts about the what the web app does, etc etc. In order to update the progress bar to show e...

Session loss analysis

Hi, our web application frequently losses it's session state (user is being logged out very often). I predict that the reason of such behavior are some exceptions thrown and unhandled in side threads of application or whole application restart. I'm pretty sure that it's not caused by recycle worker, because it happens in irregular peri...

Session Tracking Servlet

I have 2 applications(EARs) . In App1 I have a few jsps and at a point I want to save the details of a person I have a button which has a the javascript to save the details. But now I am asked to authenticate the user with another app App2. So I send a callback url from App1 so that once the user is successfully authenticated I can come ...