LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices



Reply
 
Search this Thread
Old 06-19-2009, 06:10 AM   #1
RattleSn@ke
Member
 
Registered: Oct 2007
Location: Netherlands, ZH
Posts: 32

Rep: Reputation: 15
Strange PHP/SQLite problem


Hi All,

I have a strange PHP/SQLite problem.
When I try to execute a query to a SQLite DB on ServerA, I get this error:
Code:
Query failed.
Last Error: database is locked
Then I copy the DB to another server (ServerB) with exact the same installation of PHP/SQLite, the query succeeds.

Versions:
PHP: 5.2.8
SQLite: PECL Module version 2.0-dev $Id: sqlite.c,v 1.166.2.13.2.11 2008/12/01 12:28:27 felipe Exp $
SQLite Library 2.8.17
SQLite Encoding UTF-8
OS: FreeBSD6.3

It seems really be caused by the server, I just installed sqlite (cli) and then when I run:
Code:
# sqlite db1.sqlite
SQLite version 2.8.17
Enter ".help" for instructions
sqlite> .databases
Error: database is locked
sqlite> quit
Is there some lockfile somewhere that I don't know about?

The file is located on NFS, and when I try to open it on ServerB, there is no lock.

So for some reason ServerA is buggy, but I really can't pinpoint the problem. I've already been working on this for over a week and already tried to reinstall SQLite several times with no luck.

I someone can point me at least in the direction of troubleshooting that would be great!

Thanks!
Onno.

Last edited by RattleSn@ke; 06-19-2009 at 06:21 AM. Reason: Extra Info
 
Old 06-25-2009, 05:51 PM   #2
tekhead2
Member
 
Registered: Apr 2004
Distribution: slackware/FreeBSD/Vector
Posts: 291

Rep: Reputation: 52
I'm no expert, but I beleive that SQLite writes a journal file in the same directory as the database so make sure you have write permissions on the directory for the NFS.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
strange php problem frieza Programming 3 03-04-2009 06:38 PM
PHP 5.1.2 / Apache 2.2 / SQLite install error on FC4 Ravo Linux - Software 3 03-09-2006 04:16 PM
strange apache php problem lbharti Linux - Software 3 05-20-2005 11:39 AM
Strange PHP problem!!! Birgi Programming 3 03-08-2005 01:07 PM
strange php problem dsiguy Linux - Software 2 02-18-2003 06:07 PM


All times are GMT -5. The time now is 01:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration