SQLSTATE[HY000] [14] unable to open database file

For programming and general questions on Zend Framework
Post Reply
kula1922
Posts: 3
Joined: Wed Dec 09, 2009 5:55 pm

SQLSTATE[HY000] [14] unable to open database file

Post by kula1922 » Wed Dec 09, 2009 6:21 pm

Hello. I am doing zend quickstart and when i try create a database using commend in terminal "load.sqlite.php --withdata" i can see some problems. For example, firs error massage was obout not present POD_SQLITE on my computer (it is really odd because i have use linux system operation (ubuntu 8.04.3) and ubuntu have pod_sqlite in it standard components (in terminal commend sqlite is working)). Activate pod_sqlite and sqlite in php.ini didn't any result (btw i am using xampp). helpful was installing php5-sqlite in terminal but when i try open load.sqlite.php again i have see next problem look like subject this topic "SQLSTATE[HY000] [14] unable to open database file". I am looking solution in google (natural reaction i think) but i didn't find anything interesting about it. There is no database.db file somewhere think but how repair it? install slqite manager for firefox doesn't gave any result (ubuntu 8.04.3 use older version firefox so i am download new version and install slqite manager).

I have no idea what to do now :P meaby someone have any helpful information?

elvis8631
Posts: 1
Joined: Wed Jan 06, 2010 12:25 pm

Re: SQLSTATE[HY000] [14] unable to open database file

Post by elvis8631 » Wed Jan 06, 2010 12:32 pm

got a same problems on xp. Simple reason was I had 'data' directory in wrong place, ie in 'application' directory, should have been one up - next to 'application'. :-). Of course must make sure all permissions are right for both data and db dir as well.

anagai
Posts: 1
Joined: Tue Apr 27, 2010 5:44 am

Re: SQLSTATE[HY000] [14] unable to open database file

Post by anagai » Tue Apr 27, 2010 5:44 am

This doesn't work for me.

still get same error message.

qalkozai
Posts: 2
Joined: Fri Jul 02, 2010 10:53 am

Re: SQLSTATE[HY000] [14] unable to open database file

Post by qalkozai » Sat Jul 03, 2010 1:19 am

SQLSTATE[HY000] [14] unable to open database file - I have this problem too using wamp and vista anyone can help?

pmaisonn
Posts: 1
Joined: Tue Jul 27, 2010 9:33 am

Re: SQLSTATE[HY000] [14] unable to open database file

Post by pmaisonn » Tue Jul 27, 2010 9:38 am

Hi,

I had the same issue that I've just solved : in fact, the zf configure db-adapter syntax into the tutorial was wrong.

To solve it, edit your php.ini file :

Change : resources.db.params.dbname = APPLICATION_PATH '/../data/db/guestbook-dev.db'
With : resources.db.params.dbname = APPLICATION_PATH /../data/db/guestbook-dev.db

Do the same for the remaining db (prod + testing)

Just by removing the quotes, when running the "php scripts/load.sqlite.php --withdata" command, the db is correctly created into /data/db

Hoping it will help you.

shawnkwilder
Posts: 1
Joined: Mon May 07, 2012 8:20 pm

Re: SQLSTATE[HY000] [14] unable to open database file

Post by shawnkwilder » Mon May 07, 2012 8:22 pm

I was going over this quick start guide myself and ran into the same issue. After trying the suggestions above in didn't work still, it seems documentation tells you to put you data folder in /application/data. That is not the case, it goes into /data. To get mine to work I moved that folder and manually created the db folder and it works now!

1) Move /application/data to /data
2) Create /data/db folder
3) Run script

Hopefully that worked!

zagapong
Posts: 1
Joined: Fri Aug 10, 2012 3:44 pm

Re: SQLSTATE[HY000] [14] unable to open database file

Post by zagapong » Fri Aug 10, 2012 3:45 pm

Thanks shawnkwilder that's works perfectly ;-)

chekdis1owt
Posts: 1
Joined: Mon Dec 31, 2012 11:05 am

Re: SQLSTATE[HY000] [14] unable to open database file

Post by chekdis1owt » Mon Dec 31, 2012 11:06 am

Thanks shawnkwilder. Your solution worked for me as well. *Whew* *Relief*

Post Reply