session

PHP not saving sessions on subdomain, ok on domain

We have a CentOS 5.4 server serving a number of our websites. The server is managed by Plesk 9.2.3. Our websites are developed in php. We have our main domain ourapplication.co.uk in /var/www/vhosts/ourapplication.co.uk/httpdocs, and our subdomain api.ourapplication.co.uk in /var/www/vhosts/ourapplication/subdomains/api/httpdocs The fo...

Need help identifying a subtle bug.. in IIS? The Session? Elsewhere..?

I have a very subtle bug that I'm having trouble identifying. Background: We have 2 sites running off the same application on the same web server. SiteA -- accessed by www.SiteA.com SiteB -- accessed by www.SiteB.com When the request first comes in, the siteId is identified based on the Host and stored in the Session as follows:...

Would an AJAX script persist a session in PHP?

I've been asked to develop a social networking site to tie in with a game. The game is in Flash (so delivered as just a .swf file) and will be hosted on the social networking website. One of the issues that's arisen during testing and developing is sessions timing out. I know session length can (theoretically) be modified using php.ini ...

How to access session custom action data (properties) during install and uninstall in Wix?

Can you please tell me what is wrong with the following code? I am able to access the custom action data during install and I add their values to session custom action collection. However, during uninstall I the value pairs are not in the collection. public class CustomActions { //This action is only called during application instal...

Storing user variables in database vs session in asp.net

Hello, I'm working with an asp.net application that stores most data in a database and not session. I'm wondering of the pros and cons of each and which is the better way to go. For example, you have a pretty busy site and instead of storing user specific variables in session, there is a DB table called user data and it can store all use...

Updating Method in Web-Based application - Java Servlets

I'm writing a servlet based back-end for a mobile phone app and I'm pretty new to web programming in general. Anyways my issue is I have a data model that associates users to a general feed and when that feed is updated by any one user I want the rest of the users associated with the feed to receive the updated model. From what I gat...

Maintaining state between browser tabs in PHP

I'm building a web application that allows users to run a query against one of two databases. They are only allowed to submit 1 query to each database at a time. Currently, I'm setting $_SESSION['runningAdvancedQuery'] (for instance) to let me know if they're running a query. This is to prevent someone from opening up a 2nd browser tab a...

PHP SESSIONS Question.

When a user logs in should I sanitize there logged in $_SESSION['user_id'] user id or not? for example, like in the following code below. mysqli_real_escape_string($mysqli, htmlentities(strip_tags($_SESSION['user_id']))); ...

prevent user fom logging back in after logging out by hitting back button

I am using a PHP login script that challenges user for username & password. Once authenticated program stores a session value. On logout, session value is set to blanks. Once logged out I want to avoid allowing user hitting the back button a few times and and betting allowed to see screen of data or accidentaly logging himself back in....

php - test if sessions are started

How do you test to see if sessions are on. This is not the way... <?php session_start(); if(isset($_SESSION)) { echo "sessions ON<br>"; } else{ echo "sessions OFF<br>"; } session_destroy(); if(isset($_SESSION)) { echo "sessions ON<br>"; } else{ echo "sessions OFF<br>"; } ?> ...

PHP Session Variables - At Wit's End

I'm just getting in to MySQL and PHP--and I'm just trying to create a simple login system for a project we're testing. I've connected and created the login logic just fine, but now I can't for the life of me get the session variables to carry over to the new pages. Could someone please show me the correct way to do this? Here is my lo...

Does Forms Authentication work with Web Load Balancers?

I'm working on a web application that is using Forms authentication. <authentication mode="Forms"> <forms slidingExpiration="true" loginUrl="~/User.aspx/LogOn" timeout="15" name="authToken" /> </authentication> I'm seeing this cookie set in my browser when I log in: The question is what h...

session variable php login realm

I am wondering whether its possible to change/set/delete my session variable AS A USER. I am re-thinking the way that I do login realm in PHP. The way that I do it now is that I check whether a certain session variable is set or not. However, this would break if someone can just change his/her session variable. ...

Which MySQL database engine is better for storing sessions and session data: MyISAM or InnoDB?

Pretty straightforward question. I use InnoDB for everything else, for a couple of reasons. Is it a performance hit over MyISAM for a 'high-traffic' table? ...

How to end the session and make sure the logged out process is correct?

Hi, I new to .aspx and now the thing is since i am doing a web enabled project, I have this login from an user. I drag dropped the login template and then used the Session["Authentication"] = username.Tostring(); to store the current logged user's info and so. Now i even used a hyperlink "Logout" at the top right corner and then made...

how can I sync JS timeout and ASP.NET session timeout?

Ok. I can't really solve what I want - so if you can please advise me on how to: I have a page of each every click has ajax call to my server (hence, the ASP extends the session) I have ASP.NET session set to Xmin. I want when X+1 min expires, I have expiration page. what I did was to set the JS timer to validate every x+1min to see if...

Sql Alchemy connecion time Out

I am using sqlalchemy with Mysql, and executing query with sql expression . when executing a number of query then it time out. I found an answer but it is not clear to me -- Answer link . plz any one can help me? TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30 ...

Register a function to be run in PHP when sessions are destroyed

I would like a function to run whenever a session is destroyed. I've looked into using session_set_save_handler but I don't want to manually handle the storage of sessions, I just want to do a little processing when they're destroyed. Is there any way to do this without using session_set_save_handler? ...

User + session handling with ASP.NET and mySQL solution

Hey! I've been reading around the web about different alternatives to keeping track of users but I can't seem to find the "perfect" solution for my situation. The app will (hopefully) be high-volume so I'd like to design with scalability in mind. It might be necessary to host the site using several web-servers so session mode InProc won...

sessions in multiple tomcats

How do I make multiple tomcats on different servers sharing sessions? I have a balancer sitting in front of 2 tomcat on two different servers, so when user starts a session, it's only associated with one of the tomcats. He might or might not get the session in the next request. ...