Purchase OIOpublisher now for just $47.

Take control of your ad space.

Click here to purchase

    • CommentAuthorfanaticweb
    • CommentTimeOct 12th 2012
     

    Hi Simon,
    As suggested, I found the line for the oiopub_session_start in the "include/functions.php" file

    //update settings?
    if(function_exists('ini_set')) {
    @ini_set('session.cookie_path', "/");
    @ini_set('session.use_trans_sid', 0);
    @ini_set('session.use_only_cookies', 1);
    @ini_Set('session.cookie_lifetime', 0);
    @ini_set('session.gc_maxlifetime', 7200);
    @ini_set('session.gc_probability', 1);
    @ini_set('session.gc_divisor', 100);

    I'm assuming this was the line to tackle, so I tried chaning it to:
    @ini_set('session.gc_maxlifetime', 990000);
    and
    @ini_set('session.gc_maxlifetime', 48*60*60);

    Yet I'm still being logged out too soon, not sure how to calculate the time increase to allow longer sessions or even infinite if possible or maybe just 24 hours let's say.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeOct 12th 2012
     
    Project Admin

    I'm assuming you're using OIO as a standalone application, in this context?

    session.gc_maxlifetime - this can certainly affect session timeouts - although 7200 means 7200 seconds (2 hours) and therefore I'd have thought wouldn't be the likely cause. Try increasing it though, just in case.

    session.cookie_lifetime - with a value of zero, if you close your browser then the session will expire. I'm assuming you're not doing that, but just an FYI.

    The rest of those options shouldn't affect it, as far as I'm aware.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorfanaticweb
    • CommentTimeOct 12th 2012
     

    Yup, standalone version, I actually did try increasing the @ini_set('session.gc_maxlifetime', 7200); to 990000 and 48*60*60 (after digging online for different ways to set a timestamp) to no avail in both cases, as for session.cookie_lifetime, it was already set to 0 by default, didnt touch that one, that would've been preferred actually to only end the session when the browser is closed, but no matter what, I'm still being logged out after those 7200 seconds)

    Now I went back and set the session.gc_maxlifetime to 86400 (equivalent to 24*60*60* = 24 hours) since its calculated based on 60 secs as per your feedback, will see if it makes a difference.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorfanaticweb
    • CommentTimeOct 13th 2012
     

    Help, it's not kicking in, I'm even getting logged out right in the middle of updating an ad :(

    The modified code
    if(function_exists('ini_set')) {
    @ini_set('session.cookie_path', "/");
    @ini_set('session.use_trans_sid', 0);
    @ini_set('session.use_only_cookies', 1);
    @ini_Set('session.cookie_lifetime', 0); // already set to 0
    @ini_set('session.gc_maxlifetime', 86400);
    @ini_set('session.gc_probability', 1);
    @ini_set('session.gc_divisor', 100);

    session.cookie_lifetime was already set to 0 by default.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeOct 13th 2012 edited
     
    Project Admin

    On the cookie_lifetime option, that was just an FYI on what the default value does (in case you were closing your browser and expecting the session to persist when opening it again).

    Probably the best way to deal with it is to go back to the very basics. In OIO's "include/functions.php" file, rename the oiopub_session_start function to oiopub_session_start_old, and then underneath it add the following function:

    function oiopub_session_start() {
    global $oiopub_set;
    //session exists?
    if(@session_id()) {
    return true;
    }
    //start session
    return @session_start();
    }

    This will ensure that the session uses the default server settings.

    It would also be worth completely clearing your browser cookies / cache, before logging back in again.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorfanaticweb
    • CommentTimeOct 14th 2012 edited
     

    Done but with 2 errors which I dont get because it's referring to the right function name:

    Fatal error: Call to undefined function oiopub_session_start() in /homepages/39/d284855853/htdocs/asylum/advertise/include/admin.php on line 28

    Fatal error: Call to undefined function oiopub_session_start() in /homepages/39/d284855853/htdocs/asylum/advertise/purchase.php on line 33

    admin.php line 28 code
    //session
    function session() {
    oiopub_session_start();
    }

    The modified code in functions.php
    //session start (old)
    function oiopub_session_start_old() {
    global $oiopub_set;
    //session exists?
    if(@session_id()) {
    return true;
    }

    //session extended
    function oiopub_session_start() {
    global $oiopub_set;

    //session exists?
    if(@session_id()) {
    return true;
    }
    //start session
    return @session_start();
    }

    purchase.php line 33 code
    var $allowed_exts = array('gif', 'jpg', 'jpeg', 'png', 'swf');

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeOct 14th 2012
     
    Project Admin

    The only reason that message would appear is if the old function was renamed (check), but the new function either wasn't saved in that file or was named incorrectly.

    My guess would be the 'new' version isn't in the "include/functions.php" file.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorfanaticweb
    • CommentTimeOct 14th 2012 edited
     

    WOW I took a wild shot at this one, I simply reversed the display order of the lines in functions.php and now I can actually access the admin login page, no erros so far, does that make sense? The fact that I pushed the legacy code "oiopub_session_start_old" under the newly updated one "oiopub_session_start"?

    //session start extended
    function oiopub_session_start() {
    global $oiopub_set;
    //session exists?
    if(@session_id()) {
    return true;
    }
    //start session
    return @session_start();
    }
    //session start old
    function oiopub_session_start_old() {
    global $oiopub_set;
    //session exists?
    if(@session_id()) {
    return true;
    }

    The admin.php file remained as is:
    //session
    function session() {
    oiopub_session_start();
    }

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorfanaticweb
    • CommentTimeOct 14th 2012
     

    Its still timing me out :(

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeOct 15th 2012
     
    Project Admin

    Strange, not sure what's causing that off the top of my head. Either the session cookie or the session data must be getting deleted too quickly.

    Does the same thing happen if you try different browsers?

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorfanaticweb
    • CommentTimeOct 16th 2012
     

    I was suing Chrome, tried it through IE8 and sadly same results, its not a major concern Simon and I hate to break your head with minor things, its just that in my case, I constantly work with OIO and it's a bit frustrating when I'm editing an ad, then pause for five minutes because I get sidetracked and then when I go back, i'm logged off due to the timeout.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeOct 17th 2012
     
    Project Admin

    Do/did you have any other installations of OIO on the same server? Do/did they suffer from the same problem?

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorfanaticweb
    • CommentTimeOct 17th 2012
     

    I do of course but using the WP install and those ones, I'm always logged in because of the WP sessions, I'll go ahead and install the latest version on a different domain as standalone and see if it does the same thing.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeOct 21st 2012
     
    Project Admin

    Ok, let me know if it does the same thing.

    Need help?  Quick start guide | Troubleshooting | All help topics