LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 05: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 05:21 AM. Reason: Extra Info
 
Old 06-25-2009, 04: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



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 05:38 PM
PHP 5.1.2 / Apache 2.2 / SQLite install error on FC4 Ravo Linux - Software 3 03-09-2006 03:16 PM
strange apache php problem lbharti Linux - Software 3 05-20-2005 10:39 AM
Strange PHP problem!!! Birgi Programming 3 03-08-2005 12:07 PM
strange php problem dsiguy Linux - Software 2 02-18-2003 05:07 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 01:49 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
Open Source Consulting | Domain Registration