in reply to Re: PHP Sessions and Perl
in thread SOLVED! PHP Sessions and Perl

Hi Marto, I may be getting confused with the difference between sessions and cookies, can you confirm for me that I will have access to ALL of the session parameters by using a cookie? What I mean is, the session information in the webpage provide information such as username and session ID to following webpages if you are browsing with Chrome etc, are these accessible to Perl scripts in the same way using the cookies?

Replies are listed 'Best First'.
Re^3: PHP Sessions and Perl
by marto (Cardinal) on Mar 16, 2021 at 17:50 UTC

    You're confusion server side sessions and cookies. I think you need to read the comments of your php code:

    // Create sessions so we know the user is logged in, they basically ac +t like cookies but remember the data on the server.
      Ok, I am aware that sessions are stored on the server side, my confusion is how to access that information in Perl to use it for authorizing access to other pages.

        See: https://stackoverflow.com/questions/5593359/where-does-session-save

        Summary:

        "The session data that you read and write using $_SESSION is stored on server side, usually in text files in a temporary directory. They can not be accessed from outside."

        "The session.save_path variable influences the location on the server where the session data is stored."

        If you can find where the session is stored you may be able to retrieve the information you need.