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?
Replace All Zero Sequences Whose Length Less Than 5 Into Number 1 With Same Length?
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.