The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

session start fatal error sqlite

Discussion in 'General Discussion' started by Cristi4n, May 11, 2008.

  1. Cristi4n

    Cristi4n Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I have several cPanel installed on a VPS node.
    The problem is that my clients cannot use cPanel's phpmyadmin, they get the following error:

    Warning: session_start() [function.session-start]: SQLite: failed to open/create session database `/var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb' - malformed database schema - unable to open a temporary database file for storing temporary tables in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/session.inc.php on line 86

    Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: sqlite (path: /var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/session.inc.php on line 86

    I downloaded the latest phpMyAdmin and replace the one installed on a cPanel but still the same result.
    Can anyone give me a hint or anything that I can try to see where the problem is ?

    Thank you!
     
  2. Cristi4n

    Cristi4n Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    I have change the directory where phpmyadmin will store the session files but this is only a temporary solution, can anyone please look at this and let me know what can I do ?
    I have Virtuozzo 4 and centos 5 installed. cPanel is current, I saw in changelog that the session handler is now sqlite and for some reason it does not work for me.

    Thank you!
     
  3. Cristi4n

    Cristi4n Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    Of course, none of the applications/scripts that have been changed to use sqlite for storing sessions does not work (eg. Horde also).
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Are you using the standard internal PHP binary that cPanel provides?

    If so, what does this output:

    /usr/local/cpanel/3rdparty/bin/php -i | grep -i sqlit


    Also, what are the permissions on /var/cpanel/userhomes/<name>/sessions ?
     
  5. Cristi4n

    Cristi4n Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    I have a single VPS with a custom php, the rest are standard. They all have the same problem.
    The permissions are ok, if I remove phpsess.sdb it will create it again, I even changed the permissions of /var/cpanel/userhomes/cpanelphpmyadmin/sessions to be world writable but had no effect, same error.

    /usr/local/cpanel/3rdparty/bin/php -i | grep -i sqlit

    SQLite 2.0-dev
    SQLite Library 2.8.17

    Permissions for sessions:
    drwx------ 2 <name> <name>
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    To ensure I understand, when you state "a custom php", do you mean you customized /usr/local/cpanel/3rdparty/bin/php ?


    With a stock install, on a Xen guest, here's what /usr/local/cpanel/3rdparty/bin/php -i | grep -i sqlit reveals:

    Code:
    c4xen ~ # /usr/local/cpanel/3rdparty/bin/php -i | grep -i sqlit
    <tr><td class="e">PDO drivers </td><td class="v">sqlite2, sqlite </td></tr>
    <h2><a name="module_pdo_sqlite">pdo_sqlite</a></h2>
    <tr class="h"><th>PDO Driver for SQLite 3.x</th><th>enabled</th></tr>
    <tr><td class="e">PECL Module version </td><td class="v">(bundled) 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6.2.2 2007/03/23 14:30:00 wez Exp $ </td></tr>
    <tr><td class="e">SQLite Library </td><td class="v">3.3.17 </td></tr>
    <tr><td class="e">Registered save handlers </td><td class="v">files user sqlite  </td></tr>
    <h2><a name="module_SQLite">SQLite</a></h2>
    <tr class="h"><th>SQLite support</th><th>enabled</th></tr>
    <tr><td class="e">PECL Module version </td><td class="v">2.0-dev $Id: sqlite.c,v 1.166.2.13.2.9 2007/05/19 17:58:22 iliaa Exp $ </td></tr>
    <tr><td class="e">SQLite Library </td><td class="v">2.8.17 </td></tr>
    <tr><td class="e">SQLite Encoding </td><td class="v">iso8859 </td></tr>
    <tr><td class="e">sqlite.assoc_case</td><td class="v">0</td><td class="v">0</td></tr>
    ...
    c4xen ~ # /usr/local/cpanel/3rdparty/bin/php -v 
    PHP 5.2.3 (cgi) (built: Aug 29 2007 15:37:39)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    


    Are the /var/cpanel/userhomes directories set to the proper owners?
     
  7. Cristi4n

    Cristi4n Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    I have not changed /usr/local/cpanel/3rdparty/bin/php.
    I thought you were referring to the installed php on the system.
    Anyway I have some other VPS in Virtuozzo that have nothing changed on them, standard with a centos 5 template.

    Here is the full Output:

    Regarding sessions the owner and group is cpanelphpmyadmin and for horde cpanelhorde, i guess the permissions are right.

    I have cPanel installed also on some other dedicated servers and everything seems to work fine. The error message seems to appear only on vps. I have compared the VPS with a dedicated server, everything seems to be the same.
     
    #7 Cristi4n, May 12, 2008
    Last edited: May 12, 2008
  8. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator

    Does the /var/cpanel/usecpphp file exist?
     
  9. Cristi4n

    Cristi4n Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    Yes, it does:

    -rw-r--r-- 1 root root 0 Apr 9 16:42 /var/cpanel/usecpphp
     
  10. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
  11. Cristi4n

    Cristi4n Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    done, thank you!
     
  12. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    Any update on it ? A customer reported the same issue on a virtuozzo vps as well...
    It's running WHM 11.23.0 cPanel 11.23.1-C24255 on a FEDORA 4 i686

    Thank you :)
     
  13. shammi1234

    shammi1234 Member

    Joined:
    Jul 26, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    In the mean time, you can set the session handlers as files, instead of sqlite and specify another path for the file storage.

    It worked for me.
     
  14. net-trend

    net-trend Member

    Joined:
    Sep 17, 2002
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Am having this issue with one VPS as well. It is running the latest EDGE release.
     
  15. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Check the output of the 'mount' command. If it looks like this:

    Code:
    c4xen bin # mount
    /dev/sda1 on / type ext3 (rw,usrquota)
    none on /proc type proc (rw)
    none on /sys type sysfs (rw)
    none on /dev/pts type devpts (rw,gid=5,mode=620)
    none on /dev/shm type tmpfs (rw)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    /tmp on /var/tmp type none (rw,noexec,nosuid,bind)
    

    Then the problem is solved by doing this:

    Code:
    umount -l /tmp
    

    If that is not your problem, then please open a support ticket at https://tickets.cpanel.net/submit/

    Mark the ticket ATTN: QA SQLite


    Thank you.
     
  16. mitgib

    mitgib Well-Known Member
    PartnerNOC

    Joined:
    Apr 9, 2006
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    I had this happen today on a xen VPS

    WHM 11.23.0 cPanel 11.23.1-R24909
    CENTOS Enterprise 5 i686 on xen - WHM X v3.1.0

    umount -l /tmp did solve the problem, but will it just return on each remount of /tmp ?
     
  17. gara

    gara Member

    Joined:
    Sep 22, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    In my VPS I try this

    1. Change in php.ini the mysql.default_socket to /var/lib/mysql/mysql.sock
    2. Create /var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb
    3. Change to 777 /var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb
     
  18. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Try this:

    /scripts/cleanphpsessions



    * I'm not sure if this made it in to RELEASE yet, but I know it works on EDGE/CURRENT.
     
  19. deanstev

    deanstev Well-Known Member

    Joined:
    Jun 10, 2004
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    0
    Neither of those work for me....
     
  20. deanstev

    deanstev Well-Known Member

    Joined:
    Jun 10, 2004
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    0
    I don't have anything in /var/cpanel/userhomes/
     
Loading...

Share This Page