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 6997025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:13:53+00:00 2026-05-27T20:13:53+00:00

[ante-scriptum : this is a self answered question, you don’t need to bother answering]

  • 0

[ante-scriptum : this is a self answered question, you don’t need to bother answering]

I ran into a weird configuration problem, not documented anywhere on the specific PHP.net page or at StackOverflow.

The problem

When opening an existing sqlite database on Windows, the same error kept showing :

SQLSTATE[HY000] [14] Unable To Open Database File

Although the code executed was copy/pasted from the manual :

<?php
/* Connect to an ODBC database using driver invocation */
$dsn = 'sqlite:/full/path/to/db';
$user = 'dbuser';
$password = 'dbpass';

try {
    $dbh = new PDO($dsn, $user, $password);
} catch (PDOException $e) {
    echo 'Connection failed: ' . $e->getMessage();
}

?>

I could not open this database, as I had tried all kinds of various DSN while googling :

$dsn = 'sqlite:/c:\\full\\path\\to\\db'; // --FAILED--

$dsn = 'sqlite://c:/full/path/to/db'; // --FAILED--

  • 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-05-27T20:13:54+00:00Added an answer on May 27, 2026 at 8:13 pm

    The solution

    Notice the simple slash in the DSN sqlite:/ ? Just drop it !

    write your DSN like this :

    sqlite:name.db.

    This works with relative and absolute paths so :

    $dsn = 'sqlite:c:\full\path\to\name.db'; // --WORKS--

    $dsn = 'sqlite:..\data\name.db'; // --WORKS--

    $dsn = 'sqlite:name.db'; // --WORKS--

    Hope it will save you some time in the future !

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

Sidebar

Related Questions

I have rjecnik.txt file that looks like this mate sime, jure stipica gujo, prvi
have a string like; {uniqueKey=test20745,content={acostumbrado={tf=1,df=1},al={tf=1,df=6945},ante={tf=1,df=42},co={tf=1,df=9187},ello={tf=1,df=2},está={tf=2,df=21},falcao={tf=1,df=105},guardia={tf=1,df=2},http={tf=1,df=9893},nada={tf=1,df=24},no={tf=1,df=2493},osa={tf=1,df=429},para={tf=1,df=6382},partido={tf=1,df=50},pretorian={tf=1,df=1},que={tf=1,df=358},sebcfkeı={tf=1,df=1},su={tf=1,df=7368},t={tf=1,df=14423},tuvo={tf=1,df=3},un={tf=1,df=8511}}} how to parse this string to a map(key, list)
I'm trying to figure out how to wrap text like this: Morbi nisl tortor,
I have this HTML code (just an example): Sem vestibulum blandit nostra, nullam imperdiet,
I have a string in Rails, e.g. This is a Twitter message. #books War
I have this code but I am unable to find out how it is
I have a jquery problem, I'm a beginner at this! I want to apply
Let me start by the end and the actual question: I'm trying to write
My var_dump($gallery) looks like this: array(1) { [0]=> object(stdClass)#102 (9) { [term_id]=> string(2) 17
I'm writing an application [a Pidgin plugin, actually], which inserts an image embedded into

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.