Subject: Re: Problem with SQLite FastCGI module "malformed database schema"
To: Zbigniew Baniewski <zb@ispid.com.pl>
From: Francisco Valladolid Hdez. <ficovh@yahoo.com>
List: netbsd-users
Date: 07/20/2007 10:54:42
Hi, 

--- Zbigniew Baniewski <zb@ispid.com.pl> wrote:

> Sent it already to sqlite-users - but perhaps it's
> in some way tied to
> NetBSD-port of PHP and/or lighttpd?
> 

Are you using php as fastcgi under ligttpd or apache ?

> 
> While using SQLite as FastCGI module from within
> PHP-scripts, sometimes I'm
> getting error messages, like:
> 
I don't understand you are using PHP as FastCGI but
not as SQLite as FastCGI.

> (mod_fastcgi.c.2551) FastCGI-stderr: PHP Warning:
>  sqlite_open() [<a
> href='function.sqlite-open'>function.sqlite-open</a>
>  malformed database schema - unable to open a
> temporary database file
>  for storing temporary tables in
> /usr/local/www/index.php on line 25

You can explain your setup correctly please,.. !
so me can help you.

> 
> Yes, I've found several "recipes", how to fix it,
> like:
> 
>
http://hostprogressive.com/support/php_5_docs/ref.sqlite.html
> 
> "On Windows operating systems, unprivileged accounts
> don't have the TMP
> environment variable set by default. This will make
> sqlite create temporary
> files in the windows directory, which is not
> desirable. So, you should set
> the TMP environment variable for the web server"
> 
> or f.e.:
> 
>
http://www.bacula.org/dev-manual/Installin_Configuri_SQLite.html
> 
> "this is most likely caused by the fact that some
> versions of SQLite attempt
> to create a temporary file in the current directory"
> 
> 
> ...but the problem is, that:
> 
> 1. This isn't any Windows-based installation - it's
> NetBSD.
> 
> 2. The error message didn't tell, WHERE exactly it's
> trying to "open a
>    temporary database file" - but under NetBSD,
> lighttpd is working with
>    root privileges. So, even if it's trying to
> create any temporary file,
>    it's able to create it anywhere. In /tmp or
> anywhere else.
> 
> 3. The problem isn't occuring in regular manner.
> F.e. once in two weeks
>    (while the PHP scripts, which are calling SQLite
> are using each day).
>    So, currently no idea, what is causing that.
> 
> Any clues?
> 
> NetBSD 2.0 (with kernel from 2.0.2), lighttpd and
> php modules compiled from
> 2007Q1.
> -- 
> 				pozdrawiam / regards
> 
> 						Zbigniew Baniewski
> 


--- 
Therefore, if anyone is in Christ, he is a new creation; the old has gone, the new has come! - 2 Corinthians 5:17 (NIV)
-----------------------------------
Francisco Valladolid Hdez.
http://blog.bsdguy.net - http://flickr.com/photos/sigueme/


       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC