Skip to main content

Fetch data from sqlite database

Comments

12 comments

  • Sarangi Tech Solution
    how can i get the path of SQlite3 database after WHM Upgrade for using with pdos may i know where is the location of this specific DB with cPanel & WHM 64.0
    0
  • cPanelMichael
    may i know where is the location of this specific DB with cPanel & WHM 64.0

    Hello, Yes, it's located at: /var/cpanel/eximstats_db.sqlite3 Thank you.
    0
  • Sarangi Tech Solution
    function __construct() { $this->open('/var/cpanel/eximstats_db.sqlite3'); } } $db = new MyDB(); if(!$db){ echo $db->lastErrorMsg(); } else { echo "Opened database successfully\n"; do this code need any modification ?
    0
  • cPanelMichael
    do this code need any modification ?

    That looks to be correct, however you will find more feedback on custom coding examples on websites such as StackOverflow, or through the assistance of a qualified system administrator. Assistance with custom development isn't something we can provide on the cPanel Forums. Thank you.
    0
  • Sarangi Tech Solution
    thanks Mr.cPanelMichael i have followed on stack overflow for a solution. they suggested to use PDOs .... but While using PDO Still it shows error even if PDO Driver is installed
    0
  • cPanelMichael
    Hello, Feel free to open a support ticket using the link in my signature if you'd like us to take a closer look at the affected system. You can post the ticket number here so we can update this thread with the outcome. Thank you.
    0
  • Konservin
    Try this solution, worked for me: stackoverflow.com/questions/44499844/cant-access-eximstats-sqlite3-db-after-whm64-upgrade/44517849#44517849
    0
  • Sarangi Tech Solution
    Try this solution, worked for me: stackoverflow.com/questions/44499844/cant-access-eximstats-sqlite3-db-after-whm64-upgrade/44517849#44517849

    thanks Konservin i have seen thet post and tried with the content . but still also raising the exception ' Unable to open database: unable to open database file ' even if the root user have read write permission
    0
  • Sarangi Tech Solution
    Hello, Feel free to open a support ticket using the link in my signature if you'd like us to take a closer look at the affected system. You can post the ticket number here so we can update this thread with the outcome. Thank you.

    we appreciate your assistance . and also we would like to notice you with our reply with Konservin......
    0
  • Konservin
    thanks Konservin i have seen thet post and tried with the content . but still also raising the exception ' Unable to open database: unable to open database file ' even if the root user have read write permission

    I think that's exactly the problem: root permissions are irrelevant because you're connecting not as root. Try granting rw to everybody and see if that works.
    0
  • Konservin
    I think that's exactly the problem: root permissions are irrelevant because you're connecting not as root. Try granting rw to everybody and see if that works.

    Answer at stackoverflow.com/questions/44499844/cant-access-eximstats-sqlite3-db-after-whm64-upgrade/44517849#44517849 is now updated to offer another approach in case you cannot modify privileges for these files. Briefly: copy the files (with a cron job) to somewhere you can modify the privileges, and use these files instead.
    0

Please sign in to leave a comment.