I've only gotten confused about it. I've read about changing some settings or adding code in my php.ini file but I have no idea what I'm doing when it comes to that. I'm starting the session simply by having session_start(); at the top of each of my pages. I'm including a copy of my entire php.ini file here so that you can see what I have already. Can someone please help me to figure out what I would need to do to make my sessions last at least 8 hours?
Code: [Select]register_globals = off allow_url_fopen = off [code]....
I'm building a very simple stats package for a website im doing, currently I hold the
Time Date URL IP Address
Each time someone goes onto a page, then the above details are captured and stored in an sql database.
What I want to do is to store the length of time someone has been on each page, so as well as capturing the "Time", "Date", "URL" & "IP Address", I want to capture "Length" and store this like 00:04:23.
Is it possible to store the length of time someone has been on a page?
I need to write a formatting function for the number of seconds a member has been on a site. the system already counts the seconds and handles sessions and everything. here is the code I have now. Code:
I'm trying to figure out how many days there are to an annual date (e.g., I need to know whether I'm approaching a yearly invoice date). The approach seems simple, but I've not been able to figure out this 'logic' problem. I assume this task needs to account for the year of the invoice date and today's date. Then it seems as though I just need to determine the number of days between those two dates once the year has been taken out of the equation.
A user visits a page, after they finish with that page (By leavin to another location) It starts a timer that wont allow them to reaccess the page for 10 whole long boring minutes. It has to be with sessions but it cant conflict with any of the previous sessions set! Can anyone help?!?! And dont send me to php.net please, because I have read the stuff thier and I dont understand how it works!
Is there a maximum length of a value stored in a session variable? I have written a basic shopping cart in PHP and am adding the selected products and options to a single session variable (probably not the best idea, but i don't know what else to do) and i wonder if it would be possible that this string gets too long and products are "forgotten"? I know there is a cut-off length when posting variables from a form using GET, but i am using POST, then combining the data into one (long) string and storing it in
$_SESSION['cartcontent'] = "mylongstringhere|seconditemhere|thirditemhere|fourthitemhere" I have googled for "PHP Max Length Session Variable" and not found any info about this.
for a current webapp i need a "outlook-like" calendar... Here are some requirements for the calendar:
We need the calendar for the Zend Framework, so if the Calendar doesn't already support the ZF, the source needs to be editable! do you know any calendar which fits my needs? or do you have any tipps for developing one by myself?
My session variables seem to only last for the first page after log in, and disappear on subsequent pages. I tried different things, and finally added session_start() to every page. Is this the correct fix, or will this cause problems down the road and impact session time out?
I have a string contains sequences of 0 and 1. I need to replace all zero sequences whose length less than 5, into number 1 with same length. The zero sequences with length 5 or more should be left as is.
For example source : 11000001100010011000001 result : 11000001111111111000001 <snip/>
I am storing and retrieving username, listingid, and user type using session. On my machine It works fine but on the internet server session expires after some time.I want to set session time for each category. do someone knows how to set it. thanks.
Second confusion question is when user login in like in car website and enter a car details when he click on submit button then after submitting, if session get destroy because of its time limit and listingid can not get into the mysql table. what possiblity can be make to avoid such situation.
I activate a session when a script is processed to get results from mysql. And I will save the "total_items" and "last_query" in the session variables when the visitor send the query for the first time, so that when the same query is sent again by the same visitor, the script will modify the query by adding "LIMIT, start, itemsperpage" to only get the needed number of rows from the database.
I would like to make my website to allow only one session at a time. For example, let say user has login to my website on firefox, if the user login again to another browser like opera on the same computer or different computer, the session on firefox will be destroyed. However, the session on firefox remained if it remains as one session. May I know how can I do that? I am using php and apache.
I am tracking with a variable in db called 'Logged' and setting it to 1 if a user logged in and setting session at this point as well. If the user logout then it is set to 0. This way I am allowing only one login per user name & Password.
But I have a problem that If the user didn't log out, them the 'Logged' flag is not changed. thus preventing the user logging in again.
Question : How can I know if the user just closed the browser, Or inactive for more than 20min.
I just had a brainwave. I leave a session cookie on someone's machine so that I recognise them (with their session ID in the cookie) when they come back, I also offer them the option to have an email sent to their email address with a link that sets the session ID to the one in the emailed link so that they can open their account from another computer.
Now, my question is, can you have two users on different computers be on the website at the same time with the same session ID?
I made a simple script with some session variables. When I work in the application, and when I don't use the application for some time, the session vars are erased... even when I set the session time out for 4 hours....
The PHP error logs says [24-Apr-2005 21:48:09] PHP Notice: Undefined index: button1 in D:WWWphp\_login-sisimytest.php on line 10 or [24-Apr-2005 21:48:28] PHP Notice: Undefined index: button2 in D:WWWphp\_login-sisimytest.php on line 11 depending on the button I pressed.
I have a form. I want if a user does not do any activities for say 20 min. all the data should save and close the window. please write some example code as how to check session time and after that there will be auto save action and close the window.
I have this sms application on my website, and i want to limit the number of sms'es that the users can send to 5 per day. After a successfull sending of the sms, the user is directed to a page that confirms that the sms has been sent. Code:
I'm trying to build a thing that lets people log in and uses session variables to permit or deny access. The trouble is, if a user leaves his desc for five minutes or so then comes back, the session variables have expired and they have to log in again. Does anyone know how to cure this?
I'm looking for a recommended way to time limit sessions. I'd like to limit them both application wide and user. Would it be appropriate (secure/best practice) to use "session.gc_maxlifetime" and/or "session.cache_expire"?
I want to keep track of the session time out from the web page. How do I do it? Let say, a client is on the order product page and for some reason after 10mins without clicking order the product or exit the order page, the time out window pop up. If something like that happened (time out issue), I want to catch it and update the information to our database? How do I do it?