Skip to content
Advertisement

Tag: session

PHP passing array in session variable

I am trying to get an array to pass in a session variable from one page to another. I am setting the session variable equal to my the $_POST data collected from my form. Printing the variable for test shows me that it is getting set initially on Page 1. Page 1 On Page 2 I am trying to set

PHP SESSION variable get’s deleted each reload

Does anybody know what can cause the $_SESSION variable to be cleared? The session variable is used to keep track of products in the cart. Everything worked perfect on the development and production server. Out of a sudden the production server looses the session variable – without any changes updated. The production server is hosted with 1&1. I added some

PHP Session variable not getting set

In one page of our site, I have this code: and further down, this button control: Now, in the register template, I have this code: But it only shows the value as /. What could be going on that is causing this? Answer What I ended up doing was sending a post variable to the page. The difference in the

php-fpm and nginx session problems

I’ve been having this problem for the past week or so. I’ve been working on a PHP project that relies HEAVILY on Sessions. For some reason we’ve been having troubles with the sessions saving the past few days. Any idea why? Here’s the error: nginx version: PHP-FPM config: nginx.conf: Answer I found that my php.ini was attempting to save sessions

how to get session variables using session id

I have the session id of my application. now i want to get all the session variables by using this session id. I used <?php echo session_id()?> to get the session id but how to get all the session object values by using this session id? Answer According to php.net: There are several ways to leak an existing session id

Why is PHP session_destroy() not working?

I tried to destroy all session variable by using the session_destroy() method, but after using this method, the values are not destroyed. Why is session_destroy() not working? Is there any other way …

Different session ID every time session_start is executed

I have the following source code session1.php session2.php when I access session1.php then access session2.php, I get a different ouput. Why is this doing it? Answer The browser is not sending the session cookie back to the server. This can have two reasons. The browser is configured not to send cookies to the server. You cannot force the browser to

Advertisement