session

What are the best practices for storing PHP session data in a database?

I have developed a web application that uses a web server and database hosted by a web host (on the ground) and a server running on Amazon Web Services EC2. Both servers may be used by a user during a session and both will need to know some session information about a user. I don't want to POST the information that is needed by both serv...

Error using Session in IIS7

After deployment of my website to IIS I'm getting a following error message when trying to access session: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state modul...

session management: problem displaying username in the header

hi, I am working on a simple login and logout module for my website without any security. I am using wamp on a windows xp machine. I am creating session when a user submits the login informaton it redirects to a process.php file which creates the session variables and starts session. Now if the login is successful user is redirected to ...

By using ejb 3 , jsf and jboss is it possible to call a ejb method from web module?

Even if I have different modules in my jee application including myproject-web and myproject-ejb; is it possible to call (or inject) my ejb session bean which is in the ejb module from a managed bean which is in the web module? When I asked before, I see the following declaration: @EJB private BeanInterface yourbean However, I wanna lea...

IIS6: PHP Sessions

I have installed PHP to work with IIS6 (with FastCGI). I am capable of viewing a sample test website that shows the PHP info with the following code: <?php phpinfo(); ?> Now that this works I tried to migrate my PHP website to IIS6 and here is a list of the errors/warnings I got: PHP Warning: session_start(): open(C:\WINDOWS\Temp\sess...

How can I persist sessions between a Ruby on Rails mongrel cluster and a Tomcat server?

Title says it all. I have a hybrid Ruby on Rails/GWT system and need to persist session data between the two servers, such that when a user is logged into the Rails system they are "logged in" to the GWT/Tomcat system, and vice versa. Anyone know of a simple way to do this? ...

adding additional items in a ecommerce application to save in session.

hi, i want to use this site as a reference to explain what im trying to figure out. http://www.shop-script.com/demo/store/index.php?lang=eng if you select a product then enter a value higher than 1 for the quantity of a product that you want then press add to cart. i know that this information goes into a session but how is it added? ...

PHP urlencode() tacking on ?SID=xxx ... Why?

I am trying to output a simple link. This works great: $url = 'http://www.google.com'; echo $url; This doesn't work great: $url = 'http://www.google.com'; echo urlencode($url); The second example tacks on "?SID=xxx" to the end of the URL for some reason. How do I prevent this from happening? Note: The code to generate the URL ha...

Session variables return completely after unsetting.

I have a script that should log the user out of the site. It unsets all $_SESSION and $_COOKIE variables related to the login data of the user. But somehow, it seems impossible to log out. I checked the $_SESSION array at the end of the logout script, and at the beginning of each page. At the end of the logout script it says 'array()', b...

How to get session variables from php server with Ajax function? (PHP HTML JS Ajax)

so in my php I have something like this $_SESSION['opened'] = true; But It will not be set to true until user will perform some actions with some other html\php pages So I need on some Ajax function to be able get this session variable. And some PHP sample of function to get variable in form ready for Ajax to get it. so I need someth...

To maintain session accross xyz.com and www.xyz.com.

I have a rails website on www.xyz.com. After I log in to www.xyz.com, if if move to xyz.com, I need to log in again, ie the session is not maintained. How to make www.xyz.com and xyz.com use the same session. ...

Drupal sessions table getting huge

Over the last few months, my drupal sessions table has ballooned to several GB. It seems to have started when I upgraded to drupal 5.20 (previously I thought drupal automatically cleaned out old sessions). So I created a cron job to delete sessions older than two weeks, but this takes far too long to execute (the sessions table grows b...

Spider/Crawler for testing an AJAX web app that requires a session cookie?

We have a web app that is heavy on AJAX and it is very customizable so we need something that will click on every link in it to make sure that none of the forms/pages break. I know that there are lots of spiders/crawlers out there but we haven't been able to find one thats easy to implement and works with AJAX and allows you to have a se...

deny direct access to a php file by typing the link in the url

hi, I am using php session for a basic login without encryption for my site. I want to prevent a user from directly accessing a php page by typing the url when he/she is not signed in. But this is not happening. I am using session_start(), initializing session variables and aslo unsetting and destroying sesssion during logout. Also if I ...

How to get Session Data with out having HttpContext.Current, by SessionID

I am searching to find a way to read and write on session data but with out having the HttpContext.Current. Why I won to do that ?, because I wish to make some action with the user Session after the page have been close and unloaded. For example, a user load and see a page, then I create a thread to make some action and let user go. I...

Losing Session between Classic ASP and ASP.NET

The company that I work for is making a transition between classic ASP programs and ASP.NET programs for our intranet software. Eventually, everything will be written in ASP.NET, but because of time constraints, there are still a number of programs that use classic ASP. To compensate we've written features that allow for redirects and ...

Best way to get session id in Kohana 3?

What is the best way to get the current visitors session id in Kohana v3? session_id() doesn't seem to work and only returns null for me.. At the moment Im using cookie::get('session'), but that doesn't work on the first time you access the site, which I need to do. I know you could do $this->session->id() in Kohana v2, but that doesn'...

PHP http include not saving sessions

Basically I hate a satellite website that is including form.php from an entirely different server. <?php include("http://blah.com/form.php"); ?> The form.php on the other sessions loads classes and all kinds of other things and generates a form dynamically based on a ton of MySQL data. Unimportant. My issue is that when the form i...

GZIP .htaccess and php session problem

Hi, I am trying to implement GZIP compression for my website. I copied the below code in my .htaccess file: ExpiresActive On ExpiresDefault A604800 Header append Cache-Control "public" <IfModule mod_deflate.c> <FilesMatch "\.(js|css)$"> SetOutputFilter DEFLATE </FilesMatch> </IfModule> what happens is when I type userna...

How to check whether user is login in web application?

I want to learn the whole details of web application authentication. So, I decided to write a CodeIgniter authentication library from scratch. Now, I have to make design decision about how to determine whether one user is login. Basically, after user input username & password pair. A cookie is set for this session, following navigations...