You are not logged in.
Hi guys, I'm trying to set up wTorrent with lighttpd and I'm very close, except that whenever I run the install.php script, I get this error:
PHP Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /srv/http/wtorrent/lib/cls/PDOe.cls.php:52
Stack trace:
#0 /srv/http/wtorrent/lib/cls/PDOe.cls.php(52): PDO->__construct('sqlite:db/datab...', NULL, NULL)
#1 /srv/http/wtorrent/cls/install.cls.php(187): PDOe->__construct('sqlite:db/datab...', NULL, NULL, Array)
#2 /srv/http/wtorrent/cls/install.cls.php(75): install->saveConfig(Array)
#3 /srv/http/wtorrent/lib/cls/Web.cls.php(106): install->__construct()
#4 /srv/http/wtorrent/install.php(32): Web::getClass('install')
#5 {main}
thrown in /srv/http/wtorrent/lib/cls/PDOe.cls.php on line 52
Which, of course, made me think that I'd forgotten to add extensions=blah blah in my php.ini, but I checked and they're there.
Besides, if I call the script:
<?php
if ($db = new SQLiteDatabase('filename')) {
$q = @$db->query('SELECT requests FROM tablename WHERE id = 1');
if ($q === false) {
$db->queryExec('CREATE TABLE tablename (id int, requests int, PRIMARY KEY (id)); INSERT INTO tablename VALUES (1,1)');
$hits = 1;
} else {
$result = $q->fetchSingle();
$hits = $result+1;
}
$db->queryExec("UPDATE tablename SET requests = '$hits' WHERE id = 1");
} else {
die($err);
}
?>
From a console it works, but via my browser (and thus lighttpd), it doesn't work.
Also doing a phpinfo() from the console and grep'ing for PDO support tells me that it's enabled and has PDO drivers for SQLite, just what I want. Where as phpinfo() through my browser doesn't give that information.
I've exhausted every option I can and I just have no idea what I can do. Any help would be greatly appreciated.
Edit: Found the problem. For whatever reason, whenever I restarted lighttpd, it didn't stop previous instances of php-cgi as you might expect it would. Stopping lighttpd, then killing all the php-cgi instances, and starting lighttpd again fixed it.
Last edited by Hiram (2011-01-18 22:35:00)
Offline