Re: Can't open SQLite DB... but only when using mod_php??

From: Date: Wed, 03 Oct 2007 16:43:26 +0000
Subject: Re: Can't open SQLite DB... but only when using mod_php??
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-44116@lists.php.net to get a copy of this message
I run into this: http://www.php.net/manual/en/ref.pdo-sqlite.php while searching for a solution to this exception: PDOException: SQLSTATE[HY000]: General error: 1 Take a look at it bacause this might be happenning due to version incompatibilities. For example only sqlite version 3.1.4 and after can read file formats 1,2 and 3. Is you database format new?| | -- Thodoris O/H Markus Wolff έγραψε: > Chris schrieb: >>> It can't be file permissions, I've even tried to set the database file >>> to 777... no change at all. >> >> My guess is still permissions. If you try a raw fopen instead of >> using pdo, what happens? >> >> <?php >> error_reporting(E_ALL); >> ini_set('display_errors', true); >> $fp = fopen(dirname(__FILE__).'/frontend.db', 'r'); >> if ($fp) { >> echo "Opened db<br/>\n"; >> } else { >> echo "Unable to open db<br/>\n"; >> } >> fclose($fp); >> ?> > > Hey Chris, > > mmh wonder what could possibly be wrong when even trying 777? :-) > > Anyway, just to make sure (and because I'm desperate enough to grasp for > straws right now), I tried exacly what you proposed and it still yields > the same results. > > Thanks for your suggestion anyway, sometimes one forgets to try the most > obvious things first :-) > > CU > Markus >

« previous php.db (#44116) next »