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
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.
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?
\n";
} else {
echo "Unable to open db\n";
}
fclose($fp);
?>
Hey
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 this:
Hi Thodoris,
I've checked on one of the three boxes now and the SQLite version used
by both the commandline client and PDO is 3.2.8. I know the other two
boxes have different versions, but I always created the database anew on
each box.
I also tried chown/chmod on the parent directory, no ch
Hey Markus,
You should try to "chown apache:apache" and "chmod +w" to the directory
that includes frontend.db . And the link that I posted says:
|/*
** file_format==1Version 3.0.0.
** file_format==2Version 3.1.3.
** file_format==3Version 3.1.4.
**
** Version 3.0 can only use files w
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
S
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
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?
\n";
} else {
echo "Unable to open db\n";
}
fclose($fp);
?>
Hey Chris,
mmh wonder w
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 Wo
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");
11 matches
Mail list logo