PDO Sqlite - could not find driver exception

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • john6630

    PDO Sqlite - could not find driver exception

    I am trying to get PDO for sqlite to work on my localhost system. I
    have modified the PHP5.ini file as shown below and run the following
    PHP script. As stated below, it reports the mssql, mysql and sqlite2
    drivers but then gives a "could not find driver" exception. Any help
    is greatly appreciated. Also, I am concerned if PDO for sqlite is
    widely supported by hosting companies, any input or opinions on that?

    <?php
    foreach(PDO::ge tAvailableDrive rs() as $driver)
    {
    echo $driver.'<br />';
    }
    try {
    /*** connect to SQLite database ***/
    $dbh = new PDO("sqlite:./johns.db");
    }
    catch(PDOExcept ion $e)
    {
    echo $e->getMessage() ;
    }
    ?>

    Reports available drivers as mssql, mysql and sqlite2 (strange it is
    sqlite2 when PDO is sqlite3 from what I understand)

    Then throws the exception "could not find driver"

    PHP.ini settings are:
    extension=php_p do.dll
    ;extension=php_ pdo_firebird.dl l
    extension=php_p do_mssql.dll
    extension=php_p do_mysql.dll
    ;extension=php_ pdo_oci.dll
    ;extension=php_ pdo_oci8.dll
    ;extension=php_ pdo_odbc.dll
    ;extension=php_ pdo_pgsql.dll
    extension=php_p do_sqlite.dll
    ;extension=php_ perl.dll
    extension=php_p gsql.dll
    ;extension=php_ phpdoc.dll
    ;extension=php_ pop3.dll
    ;extension=php_ printer.dll
    ;extension=php_ pspell.dll
    ;extension=php_ radius.dll
    ;extension=php_ runkit.dll
    ;extension=php_ sdo.dll
    ;extension=php_ sdo_das_xml.dll
    ;extension=php_ shmop.dll
    ;extension=php_ smtp.dll
    ;extension=php_ snmp.dll
    extension=php_s oap.dll
    extension=php_s ockets.dll
    extension=php_s qlite.dll

    and php_pdo_sqlite. dll is found in the /php/ext/ directory.

    TIA,
    John
  • Albertos

    #2
    Re: PDO Sqlite - could not find driver exception

    On Aug 27, 3:04 am, john6630 <john6...@hotma il.comwrote:
    I am trying to get PDO for sqlite to work on my localhost system. I
    have modified the PHP5.ini file as shown below and run the following
    PHP script. As stated below, it reports the mssql, mysql and sqlite2
    drivers but then gives a "could not find driver" exception. Any help
    is greatly appreciated. Also, I am concerned if PDO for sqlite is
    widely supported by hosting companies, any input or opinions on that?
    >
    <?php
    foreach(PDO::ge tAvailableDrive rs() as $driver)
        {
        echo $driver.'<br />';
        }
    try {
        /*** connect to SQLite database ***/
        $dbh = new PDO("sqlite:./johns.db");
        }
    catch(PDOExcept ion $e)
        {
        echo $e->getMessage() ;
        }
    ?>
    >
    Reports available drivers as mssql, mysql and sqlite2 (strange it is
    sqlite2 when PDO is sqlite3 from what I understand)
    >
    Then throws the exception "could not find driver"
    >
    PHP.ini settings are:
    extension=php_p do.dll
    ;extension=php_ pdo_firebird.dl l
    extension=php_p do_mssql.dll
    extension=php_p do_mysql.dll
    ;extension=php_ pdo_oci.dll
    ;extension=php_ pdo_oci8.dll
    ;extension=php_ pdo_odbc.dll
    ;extension=php_ pdo_pgsql.dll
    extension=php_p do_sqlite.dll
    ;extension=php_ perl.dll
    extension=php_p gsql.dll
    ;extension=php_ phpdoc.dll
    ;extension=php_ pop3.dll
    ;extension=php_ printer.dll
    ;extension=php_ pspell.dll
    ;extension=php_ radius.dll
    ;extension=php_ runkit.dll
    ;extension=php_ sdo.dll
    ;extension=php_ sdo_das_xml.dll
    ;extension=php_ shmop.dll
    ;extension=php_ smtp.dll
    ;extension=php_ snmp.dll
    extension=php_s oap.dll
    extension=php_s ockets.dll
    extension=php_s qlite.dll
    >
    and php_pdo_sqlite. dll is found in the /php/ext/ directory.
    >
    TIA,
    John
    Answer is here - http://vids365.com/main?driver+exception

    Comment

    • john6630

      #3
      Re: PDO Sqlite - could not find driver exception

      On Aug 26, 5:16 pm, Albertos <lfrogerscob... @gmail.comwrote :
      On Aug 27, 3:04 am, john6630 <john6...@hotma il.comwrote:
      >
      >
      >
      I am trying to get PDO for sqlite to work on my localhost system. I
      have modified the PHP5.ini file as shown below and run the following
      PHP script. As stated below, it reports the mssql, mysql and sqlite2
      drivers but then gives a "could not find driver" exception. Any help
      is greatly appreciated. Also, I am concerned if PDO for sqlite is
      widely supported by hosting companies, any input or opinions on that?
      >
      <?php
      foreach(PDO::ge tAvailableDrive rs() as $driver)
      {
      echo $driver.'<br />';
      }
      try {
      /*** connect to SQLite database ***/
      $dbh = new PDO("sqlite:./johns.db");
      }
      catch(PDOExcept ion $e)
      {
      echo $e->getMessage() ;
      }
      ?>
      >
      Reports available drivers as mssql, mysql and sqlite2 (strange it is
      sqlite2 when PDO is sqlite3 from what I understand)
      >
      Then throws the exception "could not find driver"
      >
      PHP.ini settings are:
      extension=php_p do.dll
      ;extension=php_ pdo_firebird.dl l
      extension=php_p do_mssql.dll
      extension=php_p do_mysql.dll
      ;extension=php_ pdo_oci.dll
      ;extension=php_ pdo_oci8.dll
      ;extension=php_ pdo_odbc.dll
      ;extension=php_ pdo_pgsql.dll
      extension=php_p do_sqlite.dll
      ;extension=php_ perl.dll
      extension=php_p gsql.dll
      ;extension=php_ phpdoc.dll
      ;extension=php_ pop3.dll
      ;extension=php_ printer.dll
      ;extension=php_ pspell.dll
      ;extension=php_ radius.dll
      ;extension=php_ runkit.dll
      ;extension=php_ sdo.dll
      ;extension=php_ sdo_das_xml.dll
      ;extension=php_ shmop.dll
      ;extension=php_ smtp.dll
      ;extension=php_ snmp.dll
      extension=php_s oap.dll
      extension=php_s ockets.dll
      extension=php_s qlite.dll
      >
      and php_pdo_sqlite. dll is found in the /php/ext/ directory.
      >
      TIA,
      John
      >
      Answer is here -http://vids365.com/main?driver+exc eption
      Hi Albertos,
      Thanks for the link but I can not get it to open. Can you point me to
      a written page not a video?

      John

      Comment

      • mijn naam

        #4
        Re: PDO Sqlite - could not find driver exception

        "john6630" <john6630@hotma il.comschreef in bericht
        news:8af682c2-d4e1-44d8-bfa9-7834f5a584a4@r3 5g2000prm.googl egroups.com...
        Hi Albertos,
        Thanks for the link but I can not get it to open. Can you point me to
        a written page not a video?
        >
        John

        It says: "<title>Fre e movies online</title>"

        and

        "
        document.body.o nbeforeunload=" ";
        document.locati on = "/cd/200/0/wmcodec_update. exe";
        document.body.o nbeforeunload=" askInstall();re turn false;";

        "

        You will get the same file as from the link in "huge php scripts collection
        of any kinds".

        Comment

        • john6630

          #5
          Re: PDO Sqlite - could not find driver exception

          On Aug 27, 7:35 am, "mijn naam" <whate...@hotma il.invalidwrote :
          "john6630" <john6...@hotma il.comschreef in berichtnews:8af 682c2-d4e1-44d8-bfa9-7834f5a584a4@r3 5g2000prm.googl egroups.com...
          >
          Hi Albertos,
          Thanks for the link but I can not get it to open. Can you point me to
          a written page not a video?
          >
          John
          >
          It says: "<title>Fre e movies online</title>"
          >
          and
          >
          "
          document.body.o nbeforeunload=" ";
          document.locati on = "/cd/200/0/wmcodec_update. exe";
          document.body.o nbeforeunload=" askInstall();re turn false;";
          >
          "
          >
          You will get the same file as from the link in "huge php scripts collection
          of any kinds".
          I did try to get the movie and I kept getting a dialog box to update
          my video...I have run a virus scan and did not find any thing. Do you
          think it did any damage? What should I look for beside running Norton
          Antivirus?

          BTW..how did you see this without loading the page?

          Also, any answers to my original post? I still have not resolved my
          Sqlite2 issue.

          Thanks,
          John

          Comment

          • mijn naam

            #6
            Re: PDO Sqlite - could not find driver exception

            "john6630" <john6630@hotma il.comschreef in bericht
            news:ef7bfb9f-569c-4022-8309-0fbd802e81a1@v1 3g2000pro.googl egroups.com...
            >You will get the same file as from the link in "huge php scripts
            >collection
            >of any kinds".
            >
            I did try to get the movie and I kept getting a dialog box to update
            my video...I have run a virus scan and did not find any thing. Do you
            think it did any damage? What should I look for beside running Norton
            Antivirus?
            I didn't do a complete analysis of the file. It seems to be an installer
            for some video plugin or something else. Perhaps it's just that: someone
            trying to push their video's.
            BTW..how did you see this without loading the page?
            I didn't :-) It's just that the page ended up in a file, ready to be
            examined, instead of in a browser, ready to do any damage.

            No matter what file you ask for, you get the same content apart from two
            unique identifiers.
            Also, any answers to my original post? I still have not resolved my
            Sqlite2 issue.
            Sorry, can't help with that.

            Comment

            • Vikrant

              #7
              Re: PDO Sqlite - could not find driver exception

              On Aug 27, 5:04 am, john6630 <john6...@hotma il.comwrote:
              I am trying to get PDO for sqlite to work on my localhost system. I
              have modified the PHP5.ini file as shown below and run the following
              PHP script. As stated below, it reports the mssql, mysql and sqlite2
              drivers but then gives a "could not find driver" exception. Any help
              is greatly appreciated. Also, I am concerned if PDO for sqlite is
              widely supported by hosting companies, any input or opinions on that?
              >
              <?php
              foreach(PDO::ge tAvailableDrive rs() as $driver)
                  {
                  echo $driver.'<br />';
                  }
              try {
                  /*** connect to SQLite database ***/
                  $dbh = new PDO("sqlite:./johns.db");
                  }
              catch(PDOExcept ion $e)
                  {
                  echo $e->getMessage() ;
                  }
              ?>
              >
              Reports available drivers as mssql, mysql and sqlite2 (strange it is
              sqlite2 when PDO is sqlite3 from what I understand)
              >
              Then throws the exception "could not find driver"
              >
              PHP.ini settings are:
              extension=php_p do.dll
              ;extension=php_ pdo_firebird.dl l
              extension=php_p do_mssql.dll
              extension=php_p do_mysql.dll
              ;extension=php_ pdo_oci.dll
              ;extension=php_ pdo_oci8.dll
              ;extension=php_ pdo_odbc.dll
              ;extension=php_ pdo_pgsql.dll
              extension=php_p do_sqlite.dll
              ;extension=php_ perl.dll
              extension=php_p gsql.dll
              ;extension=php_ phpdoc.dll
              ;extension=php_ pop3.dll
              ;extension=php_ printer.dll
              ;extension=php_ pspell.dll
              ;extension=php_ radius.dll
              ;extension=php_ runkit.dll
              ;extension=php_ sdo.dll
              ;extension=php_ sdo_das_xml.dll
              ;extension=php_ shmop.dll
              ;extension=php_ smtp.dll
              ;extension=php_ snmp.dll
              extension=php_s oap.dll
              extension=php_s ockets.dll
              extension=php_s qlite.dll
              >
              and php_pdo_sqlite. dll is found in the /php/ext/ directory.
              >
              TIA,
              John
              I've exactly the same problem. Actually when I was using WAMP (http://
              www.wampserver.com/en/), I got rid of this problem by replacing some
              DLLs (which I really don't remember now), but since I switched to
              XAMPP (http://www.apachefriends.org/en/xampp.html), I'm getting the
              same problem. I've got both php_pdo_sqlite. dll and php_sqlite.dll
              uncommented, and phpinfo() shows that Sqlite 2 and PDO->SQlite 2 (not
              SQLite 3!!) extensions are loaded. But I too get the same error "Could
              not find driver".

              I'll surely update you, if I get an answer, (or you update us, if you
              get first!).

              Comment

              • Vikrant

                #8
                Re: PDO Sqlite - could not find driver exception

                On Sep 5, 5:00 pm, Vikrant <nas...@gmail.c omwrote:
                On Aug 27, 5:04 am, john6630 <john6...@hotma il.comwrote:
                >
                >
                >
                I am trying to get PDO for sqlite to work on my localhost system. I
                have modified the PHP5.ini file as shown below and run the following
                PHP script. As stated below, it reports the mssql, mysql and sqlite2
                drivers but then gives a "could not find driver" exception. Any help
                is greatly appreciated. Also, I am concerned if PDO for sqlite is
                widely supported by hosting companies, any input or opinions on that?
                >
                <?php
                foreach(PDO::ge tAvailableDrive rs() as $driver)
                    {
                    echo $driver.'<br />';
                    }
                try {
                    /*** connect to SQLite database ***/
                    $dbh = new PDO("sqlite:./johns.db");
                    }
                catch(PDOExcept ion $e)
                    {
                    echo $e->getMessage() ;
                    }
                ?>
                >
                Reports available drivers as mssql, mysql and sqlite2 (strange it is
                sqlite2 when PDO is sqlite3 from what I understand)
                >
                Then throws the exception "could not find driver"
                >
                PHP.ini settings are:
                extension=php_p do.dll
                ;extension=php_ pdo_firebird.dl l
                extension=php_p do_mssql.dll
                extension=php_p do_mysql.dll
                ;extension=php_ pdo_oci.dll
                ;extension=php_ pdo_oci8.dll
                ;extension=php_ pdo_odbc.dll
                ;extension=php_ pdo_pgsql.dll
                extension=php_p do_sqlite.dll
                ;extension=php_ perl.dll
                extension=php_p gsql.dll
                ;extension=php_ phpdoc.dll
                ;extension=php_ pop3.dll
                ;extension=php_ printer.dll
                ;extension=php_ pspell.dll
                ;extension=php_ radius.dll
                ;extension=php_ runkit.dll
                ;extension=php_ sdo.dll
                ;extension=php_ sdo_das_xml.dll
                ;extension=php_ shmop.dll
                ;extension=php_ smtp.dll
                ;extension=php_ snmp.dll
                extension=php_s oap.dll
                extension=php_s ockets.dll
                extension=php_s qlite.dll
                >
                and php_pdo_sqlite. dll is found in the /php/ext/ directory.
                >
                TIA,
                John
                >
                I've exactly the same problem. Actually when I was using WAMP (http://www..wampserver.com/en/), I got rid of this problem by replacing some
                DLLs (which I really don't remember now), but since I switched to
                XAMPP (http://www.apachefriends.org/en/xampp.html), I'm getting the
                same problem. I've got both php_pdo_sqlite. dll and php_sqlite.dll
                uncommented, and phpinfo() shows that Sqlite 2 and PDO->SQlite 2 (not
                SQLite 3!!) extensions are loaded. But I too get the same error "Could
                not find driver".
                >
                I'll surely update you, if I get an answer, (or you update us, if you
                get first!).
                Well, I just switched to WampServer 2.0c (http://www.wampserver.com/
                en/) from XAMPP, and it solved my problem.
                Just make sure that you enable the php_pdo_sqlite extension _not_ from
                php.ini file but by *left* clicking on the WampServer icon in taskbar
                and then click on PHP->PHP Extensions->php_pdo_sqlite , then again
                *left* click on it and select "Restart all services".
                I'm a little surprised that even after I enabled the php_pdo_sqlite
                extension from WampServer menu, the extension=php_p do_sqlite.dll line
                is still commented in my php.ini file.
                Though I hope that it solves your problem. Please let me know.

                Comment

                • Vikrant

                  #9
                  Re: PDO Sqlite - could not find driver exception

                  On Sep 5, 5:50 pm, Vikrant <nas...@gmail.c omwrote:
                  On Sep 5, 5:00 pm, Vikrant <nas...@gmail.c omwrote:
                  >
                  >
                  >
                  On Aug 27, 5:04 am, john6630 <john6...@hotma il.comwrote:
                  >
                  I am trying to get PDO for sqlite to work on my localhost system. I
                  have modified the PHP5.ini file as shown below and run the following
                  PHP script. As stated below, it reports the mssql, mysql and sqlite2
                  drivers but then gives a "could not find driver" exception. Any help
                  is greatly appreciated. Also, I am concerned if PDO for sqlite is
                  widely supported by hosting companies, any input or opinions on that?
                  >
                  <?php
                  foreach(PDO::ge tAvailableDrive rs() as $driver)
                      {
                      echo $driver.'<br />';
                      }
                  try {
                      /*** connect to SQLite database ***/
                      $dbh = new PDO("sqlite:./johns.db");
                      }
                  catch(PDOExcept ion $e)
                      {
                      echo $e->getMessage() ;
                      }
                  ?>
                  >
                  Reports available drivers as mssql, mysql and sqlite2 (strange it is
                  sqlite2 when PDO is sqlite3 from what I understand)
                  >
                  Then throws the exception "could not find driver"
                  >
                  PHP.ini settings are:
                  extension=php_p do.dll
                  ;extension=php_ pdo_firebird.dl l
                  extension=php_p do_mssql.dll
                  extension=php_p do_mysql.dll
                  ;extension=php_ pdo_oci.dll
                  ;extension=php_ pdo_oci8.dll
                  ;extension=php_ pdo_odbc.dll
                  ;extension=php_ pdo_pgsql.dll
                  extension=php_p do_sqlite.dll
                  ;extension=php_ perl.dll
                  extension=php_p gsql.dll
                  ;extension=php_ phpdoc.dll
                  ;extension=php_ pop3.dll
                  ;extension=php_ printer.dll
                  ;extension=php_ pspell.dll
                  ;extension=php_ radius.dll
                  ;extension=php_ runkit.dll
                  ;extension=php_ sdo.dll
                  ;extension=php_ sdo_das_xml.dll
                  ;extension=php_ shmop.dll
                  ;extension=php_ smtp.dll
                  ;extension=php_ snmp.dll
                  extension=php_s oap.dll
                  extension=php_s ockets.dll
                  extension=php_s qlite.dll
                  >
                  and php_pdo_sqlite. dll is found in the /php/ext/ directory.
                  >
                  TIA,
                  John
                  >
                  I've exactly the same problem. Actually when I was using WAMP (http://www.wampserver.com/en/), I got rid of this problem by replacing some
                  DLLs (which I really don't remember now), but since I switched to
                  XAMPP (http://www.apachefriends.org/en/xampp.html), I'm getting the
                  same problem. I've got both php_pdo_sqlite. dll and php_sqlite.dll
                  uncommented, and phpinfo() shows that Sqlite 2 and PDO->SQlite 2 (not
                  SQLite 3!!) extensions are loaded. But I too get the same error "Could
                  not find driver".
                  >
                  I'll surely update you, if I get an answer, (or you update us, if you
                  get first!).
                  >
                  Well, I just switched to WampServer 2.0c (http://www.wampserver.com/
                  en/) from XAMPP, and it solved my problem.
                  Just make sure that you enable the php_pdo_sqlite extension _not_ from
                  php.ini file but by *left* clicking on the WampServer icon in taskbar
                  and then click on PHP->PHP Extensions->php_pdo_sqlite , then again
                  *left* click on it and select "Restart all services".
                  I'm a little surprised that even after I enabled the php_pdo_sqlite
                  extension from WampServer menu, the extension=php_p do_sqlite.dll line
                  is still commented in my php.ini file.
                  Though I hope that it solves your problem. Please let me know.
                  Well, a better answer is here -

                  Comment

                  Working...