Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Goto page: [-1] 1 - 2

Bottom
Session initialisation failed FIX WALKTHROUGH
  • Posted: 20.10.2005, 23:00
     
    danocorno
    rank:
    Freshman Freshman
    registered:
     November 2004
    Status:
    offline
    last visit:
    21.10.05
    Posts:
    2
    Have you tried all of these procedures and you still receive the message, 'Session initialisation failed'? Here's another solution that worked for me.

    I tried optimizing and then repairing the 'session_info' table. I tried emptying the table. I tried dropping and creating it. I looked at my 'config.php' file to make sure that the database name, username, and password was correct. It was all correct.

    I downloaded the PostNuke Swiss Army Knife (PSAK), and thought that I'd try out those options. When I clicked on 'Theme Reset', it gave me an error: 'Database Error 1226 Occurred -- User 'basecamp_pn' has exceeded the 'max_questions' resource (current value: 50000)'.

    That made me think about looking in phpMyAdmin at the list of database users. I decided to delete the database USER that was tied to PostNuke, and then added the user right back in the list as it was before. This seemed to clear or reset this 'max_questions' error--at least temporarily. I can't imagine that it is a permanant solution. Here is a post from another person with this error: http://forums.postnu…xquestions+resource I'll check with my host to see what they say.

    At any rate, if all else fails, try deleting and then adding the database user in phpMyAdmin to 'cure' the 'sessions' problem.
  • Posted: 22.10.2005, 20:54
     
    jeremykd
    rank:
    Freshman Freshman
    registered:
     March 2004
    Status:
    offline
    last visit:
    19.01.06
    Posts:
    16
    I too have been struck by the "Sessions" problem. I am a total rookie and totally stumped. I run two PostNuke sites and am considering copying the sessions_info table from one to the other.

    Anyone know if this will cause huge damage. Does anyone know how I do this in phpMyAdmin? Desperate for help on where to start!

    The weeks before I was receiving pnSecurity email for Porn posted on the Article Comments, thought it may be a biproduct of the webporn industry? :?
  • Posted: 22.11.2005, 04:53
     
    ShadowMan
    rank:
    Freshman Freshman
    registered:
     March 2005
    Status:
    offline
    last visit:
    25.11.05
    Posts:
    16
    I also started to get the "session initialization failed" error , can anyone please guide me exactly on how to try and repearing the 'session_info' table thru the myphpadmin util?
    Thanks
  • Posted: 23.11.2005, 05:55
     
    viking
    rank:
    Freshman Freshman
    registered:
     December 1969
    Status:
    offline
    last visit:
    26.10.08
    Posts:
    46
    Someone give me this solution..
    You can try this.. but remember to delete it after it work..
    Try at your own risk..

    1. Create new ***.php file


    Code

    <?
    //
    // WARNING !! This is very important - Delete this file after use
    //

    $dbhost = "localhost";
    $dbuname = "Your_mySQL_db_Username";
    $dbpass = "Your_mySQL_db_Password";
    $dbname = "Your_mySQL_db_name";
    $prefix = "pn";

    mysql_connect($dbhost, $dbuname, $dbpass, $prefix);
    mysql_select_db("$dbname") or die ("
    <font class=\"verdana\">Unable to select the database.</font>"
    );

    echo "
    Connecting to database server..."
    ;
    echo "<br>
    - Try to drop session_info table."
    ;

    $query = "DROP TABLE IF EXISTS ".$prefix."_session_info";
    $result = mysql_query($query)
    or die("
    Failed to drop session_info table"
    );

    echo "...done!<br>
    - Create session_info table."
    ;

    $query = "CREATE TABLE ".$prefix."_session_info ("
    ." pn_sessid varchar(32) NOT NULL default '',"
    ." pn_ipaddr varchar(20) NOT NULL default '',"
    ." pn_firstused int(11) NOT NULL default '0',"
    ." pn_lastused int(11) NOT NULL default '0',"
    ." pn_uid int(11) NOT NULL default '0',"
    ." pn_vars blob,"
    ." PRIMARY KEY (pn_sessid)"
    .")";

    $result = mysql_query($query)

    or die("
    Failed to create session_info table"
    );

    echo "...done!<br>
    - Finished!"
    ;
    ?>


    2. Save..upload and run it at your root site...
  • Posted: 10.03.2006, 23:45
     
    trancer72
    rank:
    Freshman Freshman
    registered:
     March 2006
    Status:
    offline
    last visit:
    10.03.06
    Posts:
    12
    Tried the above file and still a no go.
  • Posted: 20.03.2006, 13:09
     
    zmcnulty
    rank:
    Helper Helper
    registered:
     June 2004
    Status:
    offline
    last visit:
    07.10.07
    Posts:
    108
    Would it be possible to create something in PHP that parses my homepage for the "Session initialisation failed" text, then drops/adds the sessions_info table if it detects the text?

    Place the file outside the web root for added security, then you could tell the PHP script to run every hour (or whatever) via a cron job. Maybe it will still run if someone does something like posts "Session initialisation failed" on the forums, but this isn't a very common phrase so it shouldn't be a big deal.

    I'm going on a trip for a week, and I'll be unable to check on my site since I won't have internet access. I've had the Session initialisation failed error twice in the past 2 weeks. It's a nasty feeling to wake up in the morning to see that your site (and income stream) has been down for 6 hours... you know it when you check your e-mail and there are 600 messages from your pnForum installation that say "Lost connection to mySQL server during query."

    I'm positive it will again be an issue while I'm gone. I obviously want my website to be operational even while I'm away, so I need some sort of failsafe that will keep things operational for me.

    edit: better yet, couldn't you just make the site drop/add the sessions_info table instead of producing the "Session initialisation failed" error in the first place?
  • Posted: 23.07.2006, 07:58
     
    mdemeusy
    rank:
    Freshman Freshman
    registered:
     February 2005
    Status:
    offline
    last visit:
    22.07.06
    Posts:
    14
    Just a note for anyone who is still having this problem after trying all the suggestions. I had this problem intermittently for a while and none of the suggestions worked until I saw someone mention a possible query limit from the hosting provider. That was it! Deleting/readding the MySQL database user instantly fixed the problem (until a mass of queries came and I blasted past the limit again).

    This is just something you might want to check into. I'm planning to move to another provider, but for now I just created a bunch of users and used the hack to randomize the user each time.
  • Posted: 18.06.2007, 10:03
     
    xchido
    rank:
    Helper Helper
    registered:
     October 2002
    Status:
    offline
    last visit:
    17.09.08
    Posts:
    219
    MARKWEST solutions works perfectly in my case.

    But is there a way to better secure PN so this wont happen again???

    It has happened several times and I am just getting a bit anoyed at this.

    Thanks,

    --
    "I'm an idealist. I don't know where I'm going, but I'm on my way."
  • Posted: 28.05.2008, 13:36
     
    GerryK
    rank:
    Registered User Registered User
    registered:
     May 2005
    Status:
    offline
    last visit:
    28.05.08
    Posts:
    1
    icon_confused HI, I had the same Session initialisation failed issue and resolved it by reapairing the session_info table using phpMyAdmin. The syntax is REPAIR TABLE nuke_session_info

    Hope this helps - it worked instantly.

Goto page: [-1] 1 - 2

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula