Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts

    session data not being found

    I have a session which is created mostly, by perl scripts. The only php file I have is index.php.

    Sessions work perfectly in perl but I am having trouble accessing 'sessionStartTime' using php.

    Can any of you php whizz's give me a pointer please?

    here is the code which I have already been helped with here and it seems to work fine with no errors in the logs but, it can't find 'sessionStartTime', which I know has been defined by the perl scripts.

    Code:
    <?php
    session_start(); 
    if(isset($_SESSION['sessionStartTime'])) {
        $sessionStartTime = $_SESSION['sessionStartTime'];
        echo "sessionStartTime = $sessionStartTime<br />";
      } else {
        echo "sessionStartime has not been defined";
      }
    bazz

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,151
    Thanks
    2
    Thanked 335 Times in 327 Posts
    For a session to be sharable between perl and php, the session data file location and names would need to be the same, the data format in the session data file would need to be the same, and the session cookie name (probably is the same) and value would need to be the same. Have you confirmed that all of these conditions are the same?
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Thanks you.

    I'll look into how to fumpl the data and see how they two session files compare.

    How do I find the session filename and location in perl?


    bazz


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •