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

  • Home
  • SEARCH
  • 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 573649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:44:46+00:00 2026-05-13T13:44:46+00:00

Trying to get a simple PHP/Zend Framework setup to create a SQLite databse and

  • 0

Trying to get a simple PHP/Zend Framework setup to create a SQLite databse and manipulate it.

<?php
require_once("Zend/Db.php"); // Zend framework
$db = Zend_Db::factory('Pdo_Sqlite', array("dbname" => "./test.sqlite3"));

$sql = "CREATE TABLE IF NOT EXISTS ".$db->quoteIdentifier("configs")." (".$db->quoteIdentifier("name")." TEXT NOT NULL PRIMARY KEY, ".$db->quoteIdentifier("value")." TEXT NOT NULL);";
echo $sql;
$db->query($sql);

The SQL echoes out as “CREATE TABLE IF NOT EXISTS "configs" ("name" TEXT NOT NULL PRIMARY KEY, "value" TEXT NOT NULL);“, which looks right.

But I get a ‘Zend_Db_Statement_Exception‘ with message ‘SQLSTATE[HY000]: General error: 14 unable to open database file’. I’ve tried taking off the leading “./” on the “dbname” variable, and ensured that the folder the PHP file is in has write permissions for everyone. I even tried creating the file with “touch test.sqlite3” and ensured it was writable by everyone.

This is using PHP v5.2.10

  • 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-13T13:44:46+00:00Added an answer on May 13, 2026 at 1:44 pm

    your code is working here (on windows). so the array("dbname" => "./test.sqlite3") syntax is not the problem. as others, i assume it’s a permission issue.

    some ideas:

    • if you are running the program with php as apache module: does it work if run from the command line? what are the permissions of the file created? adjust the permissions to the apache user accordingly.
    • if above does not work: strace your script (strace php test.php) and check the output for permission errors.
    • the directory where ./test.sqlite3 is to be created must be readable and writable by the user running php. it is not enough to have a readable and writable test.sqlite3, because sqlite also reads and writes a temporary test.sqlite3-journal file in this directory. make sure it is.
    • try using an absolute path for the database name.
    • make sure the pdo and pdo_sqlite extensions are loaded (check the output of phpinfo()). also, see that are no conflicts between the system and the php bundled sqlite libs.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 315k
  • Answers 316k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer My guess would be that while you run eclipse itself… May 13, 2026 at 11:23 pm
  • Editorial Team
    Editorial Team added an answer Use Content-Length, definitely. The server utilization from this will be… May 13, 2026 at 11:23 pm
  • Editorial Team
    Editorial Team added an answer it depends 100% on the position of the wildcard. At… May 13, 2026 at 11:23 pm

Related Questions

First of all, I am able to successfully authenticate using Oauth. I am using
I'm trying to get a simple client/server XMLRPC server setup but I am having
I am trying out the debugger built into Zend studio . It seems great!
I know I'll get a thousand Depends on what you're trying to do answers,
I am trying to get this simple php mail script to send mail to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.