0
votes
1answer
4 views

Codeigniter sessions errors and workarounds

So after reading the documentation on the session library for CodeIgniter, I'm finding it rather confusing. My problem has arisen from the need to store a few bits of information (a filename, a ...
0
votes
2answers
40 views

Ajax doesn't change my $_SESSION variable

I have main.php page with a $_SESSION variable, i call ajax to modify this var, on the ajax the $_SESSION var changes but when I check it on my main.php it didn't. I have session_start(); on each and ...
0
votes
1answer
20 views

Cookie dies after Browser restart

I set up the cookies on my site with an 1 year expiration date, but they die when I quit and restart my browser. Is the expiration date too high, or what can be other problems related to that? My ...
0
votes
0answers
9 views

Drupal session/cookie to non drupal session/cookie

I'll try to simplify this as much as possible and add details if needed. I have two pages: page A and page B. page A has drupal included and I'm logged in. page B doesn't have the drupal includes so ...
0
votes
1answer
25 views

session expiring after refreshing page PHP

I am having problems with a custom start session.For security reasons I decide to look for a method that is safe when starting a session and I came across this tutorial and implemented the method ...
0
votes
0answers
14 views

Can't login to website using facebook's API when site is kept idle for 10-15 minutes [on hold]

On immediate page load or refresh, I can login successfully using fb API. But getting trouble log in when I keep my site idle for 10-15 minutes. Note:PHP session has been set to 2hrs.
0
votes
1answer
19 views

Can't use method return value in write context; session data

I know lots of people have asked this question but the answers I looked at didn't help. I have data set in the session that I need to send to the view but obviously only if the data is there. This ...
2
votes
1answer
26 views

Why do my session variables unset when I don't call the href that unsets it

In my PHP program I have a few links that all link to the same page. What it does is update the current site depending on my action and I send new information through a GET or if I need to unset my ...
0
votes
0answers
33 views

CodeIgniter using header() and session

I am building a small CodeIgniter application and I seem to have hit a snag. When I set my session and use a header() or redirect() it eats the session and refreshes it, leaving me with no data in ...
4
votes
3answers
30 views

CakePHP: Check if SPECIFIC flash message is set

I have a page with several sections with forms that are submitted from the same page. The forms collapse to save space, but I want to conditionally keep them open if there is an error on submission. ...
0
votes
1answer
22 views

Sessions issue while using two sites at the same browser

I used CodeIngniter framework to build two simple web application and add login pages according to this link. Everything is working fine. But when I use both application on the same browser, both of ...
0
votes
0answers
9 views

Prevent Google OpenID from storing login information after logging out

I'm implementing a google openid script but whenever I log out and try to log back in, instead of redirecting me to the google landing page, it just logs me in with the last login I used. I need the ...
1
vote
0answers
17 views

Laravel Redis Session Driver doesn't work

I'm having difficulties using the laravel 4 "redis" session driver. The problem is nothing gets actually stored. Things i've checked: I've set the driver to redis in Session-config file and ...
0
votes
1answer
18 views

PHP not recognizing session passed via PHPSESSID URL param

I'm trying to run some benchmark tests on my Zend Framework 1 based web application. So I've enabled session.use_trans_id=1 and disabled session.use_only_cookies=0 so that I can pass in a valid ...
1
vote
1answer
49 views

$_SESSION Variables appear to not transfer

So I have a site the displays one menu if the client is not logged in, and then another if they are logged in. As I updated my server to the latest version of PHP my old way of doing this no longer ...
0
votes
0answers
30 views

get value of select onChange To session php

how to get the following values into session php exmple : First Choice,Second Choice &Third Choice This is my script: http://shrib.com/au2M7ozn base on ...
0
votes
1answer
32 views

Codeigniter sessions die

After a little bit of use (25min - 1.5 hour) in my system, users experience a kick. For some reason my sessions are kind of dyeing. I think that the cookie on the client side somehow looses the ...
-1
votes
2answers
24 views

print_r($_SESSION) gives &gt and some data in wierd format?

My Code: session_start(); echo '<pre>';print_r($_SESSION);echo '</pre>'; exit(0); Output: <pre>Array ( [User_ID] =&gt; 124 [user_info] =&gt; ...
0
votes
1answer
16 views

php.ini - session_save_path not working on all pages

I have a php.ini file in the root folder with the following: php.ini file: session.gc_maxlifetime = 86400 session.save_path = "/home/user/public_html/_tmp" I have a header file which checks the ...
1
vote
3answers
28 views

CakePHP - session timeout

I use in core.php for logout after 30 minutes this: Configure::write('Session', array( 'defaults' => 'php', 'timeout' => 30, // auto logout after 30 minutes ...
0
votes
3answers
34 views

how to store temp data in any method php

i have facing a problem with my temp data . i am getting values from while loop and want to store it temporary for other pages . for example $select=mysql_query("SELECT * FROM book"); ...
0
votes
4answers
31 views

Session destroy on browser close

I have heard many times that a session get destroy as our browser close. Then how I keep logged in after closing and reopening my browser. Please help
-3
votes
0answers
38 views

I need to make a php quiz with “ANSWER NOW” and “SKIP” stored in PHP SESSION [on hold]

I have this array for a quiz test: session_start(); $_SESSION['current_id']=0; $_SESSION['id_ok_question_in_db']= array(0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5); i ...
0
votes
2answers
36 views

Sessions, one login per user: logout old session or prevent login on new session

I want to prevent the same account being logged in in multiple browser sessions. The how has already been answered. For example: How to restrict user to be logged only one time per session? and PHP ...
1
vote
2answers
44 views

PHP sessions wont work? using variables on multiple pages

What i want i that i can use a variable to use on multiple pages. The only problem is, is that it doesn't work cause i did something wrong i believe. After a couple of hours looking at it thinking ...
0
votes
3answers
24 views

how can i extend the cookie expiration time in php everytime i i regenerate the session id?

i am having a session manager page as sessmgr.php. This page is supposed to validate the user log in information and set the cookies and keep the session variables alive by updating the cookies ...
0
votes
1answer
31 views

Having trouble checking for existing session

So I'm making a very rudimentary login system on my website, and I'm having trouble using session_status to check for an active session. Here's how it's going: I have a registration page which ...
0
votes
1answer
27 views

getting post data and creating session variable in wordpress

hi I am new to wordpress. I have few problems fromlong while. What I am trying to do is.. I have put some normal javascript code to send post data using AJAX..which is fine I have tested them out ...
0
votes
3answers
56 views

How do I use SESSION_START to keep a user logged into my website [SOLVED]

So I'm trying to make a website but I'm stuck on the login no matter what I try I login go to the home page and immediately get logged out please help I really want to get this website up and running ...
1
vote
1answer
40 views

PHP Form Using Session Showing the Link after Submit

My goal to this form is to use SESSION (I've finished the COOKIE section from w3school website) in order for a user to log in using simple PHP no database but in doing so can only have one session ...
1
vote
4answers
45 views

PHP session variable not passed while processing with AJAX

I am working on a script that echoes an answer based on a selected value. This will be multiple values later on but for now i'm just testing. The php script is called trough AJAX so the results will ...
0
votes
0answers
26 views

Logout not destroying session properly

I am fairly new to PHP, and on my first try to log a user out, it's not working. login.php: <?php include_once("config.php"); ?> <?php $login = @$_POST['login']; $un = ...
0
votes
2answers
30 views

$_SESSION variables are not accessible within a file

I have a web server with a particular $_SESSION variable set containing a user ID. I have a particular file (possibly a directory) that I can't seem to access this session variable inside of. My ...
-2
votes
2answers
32 views

is there a way to filter/suppress HTML from making it to the client?

i'm new to php, and i'm having a hard time establishing proper session mgmt. controls to prevent unauthorized access to a specific section of my site. I'll give an example... ...
0
votes
2answers
52 views

How to insert this php script in one tag and establish session login

I have this php login script which contain three users (Root, Secretary and Accountant) which does perfectly. But as u can see every account has its php tag to allow certain user to login, My aim is ...
0
votes
1answer
19 views

Session management in Symfony

I have two controller files in my project. In first one, LoginProfileController, and inside LoginProfileAction function, i write $session = new Session(); $session->start(); then i need ...
0
votes
2answers
44 views

PHP Session not carrying

I know this has been asked multiple times, I've scoured SO, tried every combination provided and every method I can think of, and I'm still at loss.. Here's the scenario: I've just wrote up and fully ...
0
votes
6answers
43 views

Where exactly do I put a SESSION_START? [duplicate]

So I'm starting my own website and I have the login file pretty much made. I just need to figure out where to put the session_start to keep the user logged in. Where exactly do I put the ...
-1
votes
4answers
58 views

Sessions in php [closed]

Hi guys I was wondering if could see what is wrong with my sessions, I have been trying to study sessions for almost 3 days but no luck. this is log in page <form ...
-1
votes
5answers
43 views

PHP use a variable from a different file

I have a login page which records the username that the user enters and adds it to a variable of $uname. However when the page after the login page loads, I cannot echo the $uname. For example, when i ...
1
vote
3answers
37 views

PHP - Session variables not saving from page to page

BEFORE YOU MARK THIS AS DUPLICATE, I have read through all the answers on this topic and Non of them worked for me, this is why I am posting this. So the problem is that the data for $_SESSION is not ...
0
votes
2answers
27 views

Cannot send session cookie - headers already sent by error in my wordpress site

I'm facing this errors on my wordpress site. Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at ...
0
votes
2answers
32 views

issue with php session destroy

I am facing an issue with PHP session. PHP session is destroyed if I leave the page before it fully loads. I have two link pages like so: page_1 and page_2. Both pages are visible after login. If I ...
-2
votes
2answers
48 views

mysql_num_rows() giving a Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\check_user.php on localhost [duplicate]

<?php session_start(); include('config.inc'); //for selecting database and connecting to phpmyadmin $redirect_page = "Login_page.php"; if(isset($_POST['email']) ...
-1
votes
3answers
47 views

My $_SESSION variables are only getting the first letter of each index in my array

I am working on a class project and I need some help with my PHP. I am trying to return a products table then store the information regarding the products into an array. I then use the array to store ...
0
votes
0answers
44 views

Auto-Increment Form Input Names With $_SESSION

I want to use PHP $_SESSION to access user form-inputted data. The flow looks like this: STEP 1 User fills out form. <form method="post" action="review.php"> <input type="text" ...
0
votes
1answer
12 views

force a specific user to logout in codeigniter with destroying it's session

I want to force a user to logout when I change it's status to 'inactive' using session in codeigniter. I used the method below, but it destroyed my own session: function deactivate($user_Id) { ...
-1
votes
1answer
33 views

I need help on PHP session on login

Pls i am writing a php login script. and i really need help. i have tried it for days without success. I have this line of code on top of my login page <?php ob_start(); if ...
1
vote
4answers
54 views

PHP Session won't work after refresh

I've tried adding a PHP session, so they don't have to fill in the same password all the time. If I go to the page and fill in the code it will show the page with the correct session but when I ...
1
vote
1answer
40 views

echo php variable in backbone.js template

I m trying to access my session variable in backbone template which render with underscore.js template : _.template(template) i am working on login module . after login i set session in backend ...

15 30 50 per page