sessionid

Check if PHP session_id is in use

房东的猫 提交于 2019-12-18 16:54:57
问题 I am building a web-app that users can upload certain files and work on them through the web-app interface. I need to store these files for the length of a users session. I am creating a folder for each user using the session_id as the folder name and storing the files in there. The problem: There is nothing to indicate that a user walked away from my site and the session is going out of use. I need a cleanup script that takes the name of each folder and checks if that session_id is still

Unset a specefic session using session id

女生的网名这么多〃 提交于 2019-12-17 20:58:29
问题 I am the admin of the the site.I want unset a particular session, i know its session id The users just stating the session like this session_id("usernumber"); session_start(); Let say user A has usernumber "123" i want to destroy all the values of the user A , user A will not regenerate the sessio_id() after setting that as session_id("123"); How can i unset destroy only for user A.? 回答1: Without reverse enginering the session handler.... <?php session_id($_GET['killsid']); session_start();

Get UserId from the Session Id and Server URL

a 夏天 提交于 2019-12-14 03:27:05
问题 I have a requirement, where I will be getting the Session Id and Server URL(parameters of a webservice method). Say like this: Session ID : 00D900000xxxxxx!ARUAQOb4VVoQR1UXlY_Hvuy1DdKdN6nSfnNJKYwPTF9R3tYuA2jzBsWXHIGDQUFL13iebnYSDKKC45H98TzVxxxxxxxxxx Server URL : https://ap1.salesforce.com/services/Soap/u/12.0/00D900000xxxxxx Now i need to get the User Id(or any other user details) from these two. Thanks in Advance!! Nitin 回答1: You could use the SOAP API, which has a GetUserInfo method.

Session ID of a sql query

流过昼夜 提交于 2019-12-13 18:18:12
问题 How can I know the session ID of a sql query? If I have an SELECT query running, then how acn I know the session ID of that sql query? 回答1: Assuming Oracle from your question history; select sys_context('USERENV', 'SID') from dual 回答2: on Oracle, this query gives you some useful details about the active SQLs SELECT sa.sql_id, sa.sql_text txt, ''''||sid||', '||s.serial#||'''' sid_serial, pid, process client_pid, p.spid spid, blocking_session, BLOCKING_SESSION_STATUS, S.seconds_in_wait, s

Force php to pass the SID in url - even if cookies are accepted in the browser

安稳与你 提交于 2019-12-13 06:33:51
问题 I'm trying to get php to automatically pass the session ID via url, even if the browser accepts cookies. I know url session id are normally considered a security risk, but I have a very specific application in mind which requires several separate users to be able to log in to the same php session, despite what cookie settings their browsers have. Sharing the url is my aim here, rather than a threat. There will be several "groups" of users, each group should have a unique shared session, so

Jquery File Upload change session id

佐手、 提交于 2019-12-13 06:12:56
问题 I've been trying to solve this problem for days without success. I am using blueimp Jquery File Upload and everything works fine but I need to save my pictures in different folders depending on a parameter send by url like /index.php?customer=160 <input type="hidden" name="customer" value="<?php print $_GET["id_cliente"];?>"> I created the hidden field in the form and got it in the uploadhanndler.php. /files/'.$_POST['customer'].' , here everything goes ok, the file is saved on the folder I

Needing guidance on how to redirect a user if not logged in on admin panel

谁说胖子不能爱 提交于 2019-12-13 03:11:17
问题 At the moment I have an extremely basic admin login system. I am able to login in through my admin_login.php page which has a script from my login.php page I can update records from the admin_control_panel.php. My main concern is the fact that anyone can type these URL's straight into the address bar and bypass the login procedure. My code at the moment isn't based around security (I am just trying to get all my basic functionality and features up and running, I will then focus on security).

Session Variables Expiring

笑着哭i 提交于 2019-12-13 02:49:36
问题 I have a shopping cart app using a temporary MySQL table to store cart contents. Each row of the cart table has the session value saved to uniquely identify that row. I'm setting the initial value using the following: $session_id = session_id(); Each time a user adds an item to their cart, I run a query to count the number of products in their cart and save that value using the following: $_SESSION["total_cart_products"] = $cart_total_products['total_cart_products']; On the web site, the cart

SessionId cookie in CakePHP causing the page to hang

跟風遠走 提交于 2019-12-13 01:24:15
问题 I have been having problems with my CakePHP application. Sometimes (not everytime) my application hangs (continues to load forever) in Chrome (Although I don't think it happens in other browsers). I can fix this by removing the sessionId cookie but I need a permanent solution. I have tried this solution by pixelastic: http://www.pixelastic.com/blog/273:losing-session-request-cakephp-chrome but that didn't seem to fix the problem. Does anyone have any ideas? If you need me to provide

PHP OOP :: passing session key between classes

拟墨画扇 提交于 2019-12-12 11:59:30
问题 I am trying to work out the most appropriate design to pass a session key between classes in PHP 5.3. The session key is retrieved from a 3rd-party API and my application makes various API calls that all require this session key to be passed in. I have created classes to hold related API calls e.g.Class cart holds methods that, when called, will fire off request to the API to return data from calls such as API_GetCart(), API_AddItem() etc. I am storing the session key in a single cookie (the