Not sure if this belongs here or at webapps... please move if appropriate.
I don't even know if such a thing is possible, but is there an extension or add-on for either Firefox or Chrome that would let me view all my PHP session variables the way there are extensions that let you view cookies?
To acces something fro ma session you could use var_dump, I dont the browser due security restrictions. http://php.net/manual/en/function.var-dump.php
I had this simple script that shows the $_SESSION variables.
Install it on a test server, name it "sess.php" or something like that, and it shows the current session. DO NOT LEAVE IT ON A PRODUCTION SERVER !!!
No. Session variables are stored on the server. The only thing that would be visible in Firefox is the ID of the session, stored in the session cookie (e.g.
PHP_SESS_ID=randomgarbage
).You'd have to explicitly write a script that would dump out the session variables, something as simple as:
dumpsession.php:
No. Session data is server-side, while cookies are client-side. The session cookie contains the session identifier, which the server (i.e.: PHP) uses to retrieve the proper session data.
It is not possible to view session data without remote access to the server, or using a script (that resides on the server).
This is why it is recommended to store "sensitive" information in session instead of cookies, because it cannot be consulted/altered easily.
You can use: Print_r ($_SESSION);
PHP session variables are stored on the server and are inaccessible to the client.