Re: [PHP-DB] Can't open SQLite DB... but only when using mod_php??

2007-10-04 Thread Markus Wolff - NorthClick
Am Donnerstag, den 04.10.2007, 10:53 +1000 schrieb Chris: mmh wonder what could possibly be wrong when even trying 777? :-) Some hosts check for and disable access to files that have wide-open permissions - usually when php is running as a cgi but I've seen it when using mod_php too. Hi

Re: [PHP-DB] Can't open SQLite DB... but only when using mod_php??

2007-10-04 Thread Markus Wolff - NorthClick
Am Mittwoch, den 03.10.2007, 20:25 +0300 schrieb Thodoris: I came up with this try to edit your php.ini and in case you use pdo_sqlite extension then change the order of the loaded modules to this: extension=pdo.so extension=pdo_sqlite.so extension=sqlite.so Still no

Re: [PHP-DB] Can't open SQLite DB... but only when using mod_php??

2007-10-03 Thread Thodoris
Well the directory that houses the database should be writable. Running the script from command line it gives you write access probably but it won't work using mod_php because the web server probably can't write. Try it and give us some feedback. -- Thodoris O/H Chris έγραψε: Markus

Re: [PHP-DB] Can't open SQLite DB... but only when using mod_php??

2007-10-03 Thread 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 =

Re: [PHP-DB] Can't open SQLite DB... but only when using mod_php??

2007-10-03 Thread Thodoris
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

Re: [PHP-DB] Can't open SQLite DB... but only when using mod_php??

2007-10-03 Thread Markus Wolff
Hey there, I've double-checked on three different machines now, and I'm always getting the same error. All having different versions of PHP, Apache, PDO and SQLite. So I figure it must be something that I'm doing wrong. I just can't figure out what it is - and I'm puzzled because I had used

Re: [PHP-DB] Can't open SQLite DB... but only when using mod_php??

2007-10-03 Thread Thodoris
Hi again Markus, This is realy confusing but since the command line execution works for you then the problem should be php configuration for the mod_php. I came up with this try to edit your php.ini and in case you use pdo_sqlite extension then change the order of the loaded modules to

Re: [PHP-DB] Can't open SQLite DB... but only when using mod_php??

2007-10-03 Thread Chris
Markus Wolff wrote: 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

[PHP-DB] Can't open SQLite DB... but only when using mod_php??

2007-10-02 Thread Markus Wolff - NorthClick
Hey there, I'm trying to open an SQLite3 database from a PHP very simple PHP script: $db = dirname(__FILE__).'/frontend.db'; $pdo = new PDO('sqlite:'.$db); $pdo-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $pdo-query(SELECT * FROM page LIMIT 1); echo Deleting pages\n;

Re: [PHP-DB] Can't open SQLite DB... but only when using mod_php??

2007-10-02 Thread Chris
Markus Wolff - NorthClick wrote: Hey there, I'm trying to open an SQLite3 database from a PHP very simple PHP script: $db = dirname(__FILE__).'/frontend.db'; $pdo = new PDO('sqlite:'.$db); $pdo-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $pdo-query(SELECT * FROM page LIMIT 1);