Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8029985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:36:56+00:00 2026-06-05T00:36:56+00:00

UPDATED My latest code as follows: $file =sqlite:C:\New folder\\test.db; echo $file; $handle = new

  • 0

UPDATED

My latest code as follows:

$file ="sqlite:C:\New folder\\test.db";
echo $file;
$handle = new PDO($file) or die("Could not open database");

Error

sqlite:C:\New folder est.db
Fatal error: Uncaught exception ‘PDOException’ with message ‘could not find driver’ in C:\inetpub\wwwroot\NetBeans\PHP&SQLITE.php:20 Stack trace: #0 C:\inetpub\wwwroot\NetBeans\PHP&SQLITE.php(20): PDO->__construct(‘sqlite:C:\New f…’) #1 {main} thrown in C:\inetpub\wwwroot\NetBeans\PHP&SQLITE.php on line 20

I’m trying to use PDO driver however the error keep prompting me saying cant find the driver when it’s in my extension php folder. I’m at my wits now.

I’m using SQLITE version 3 and PHP version 5.4.3.


I already placed the database file inside my r/w folder but it Fatal error: Call to undefined function sqlite_open(). I already researched on the web for alot of sources but the my directory path still returns some strange error (Sorry if i’m too noob, first time learning).

My code as follows:

$db ="C:\New folder\test.db";
Test to print my directory path of the database.
echo $db;
$handle = sqlite_open($db); //or die("Could not open database");

Debug result

C:\New folder est.db
Fatal error: Call to undefined function sqlite_open() in C:\inetpub\wwwroot\NetBeans\PHP&SQLITE.php on line 18 which is “$handle = sqlite_open($db); //or die(“Could not open database”);”

Kindly advise where did I do wrong? The path I specified was correct but when I print out, it shows wrong path.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:36:58+00:00Added an answer on June 5, 2026 at 12:36 am

    one problem you have is that you are escaping (inadvertently) some of your path characters.

    As your var_dump shows.

    C:\New folder est.db
    

    change your $db variable definition to

    $db ="C:\New folder\\test.db";
    

    or just put path in single quotes so PHP won’t try and parse the string

    $db ='C:\New folder\test.db';
    

    and believe it or not in most cases unix paths will work:

    $db ="C:/New folder/test.db";
    

    as for the remainder of your problem, you need to make sure you have sqlite 2 enabled. View your php info and check to see if you a section like:

    SQLite
    SQLite support  enabled
    PECL Module version     2.0-dev $Id: sqlite.c 306939 2011-01-01 02:19:59Z felipe $
    SQLite Library  2.8.17
    SQLite Encoding     iso8859 
    

    if not, in your php.ini make sure the line

    extension=php_sqlite.dll
    

    is uncommented and present (and the .dll exists in your extension folder).

    However most people will recommend that you use the PDO driver for sqlite (and for any other database) as it will provide a more consistent paradigm across the different databases (you can use the same code with most databases).

    [edit]
    I found some comments in the php manual that may shed some light on your issues.

    It seems that the directory that contains your sqlite database must be
    writeable by the web server. Making just the file writeable won’t
    work.

    and

    Don’t forget “extension=php_pdo_sqlite.dll” has to be enabled in
    php.ini (if you use xampp is will be disabled by default) .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for a perforce integrate/get-latest command which would fetch the latest/updated-code and
UPDATED CODE TO LATEST ITERATION The following function consumes a webservice that returns address
I'm using MPOAuthConnection for Cocoa oauth. I've updated the latest from SVN, built the
I've just updated to the latest build of cruisecontrol.net (1.5.0.5972). I've a few teething
Recently I've begun to code in Objective-C for iOS 5 devices. My brand new
edit: after i update the latest code and now i see there are two
seems having updated to the latest version of the facebook php sdk the following
I just updated to the latest Firefox (4) and now our Cucumber, Capybara and
Today I updated my mac with the latest version of MonoDevelop, MonoTouch and the
I have just updated to the latest structuremap dll and now my site no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.