From nobody@FreeBSD.org  Tue Jul 26 14:36:52 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E47E01065677
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 26 Jul 2011 14:36:52 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id D4D858FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 26 Jul 2011 14:36:52 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p6QEaqk5088840
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 26 Jul 2011 14:36:52 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p6QEaqWu088839;
	Tue, 26 Jul 2011 14:36:52 GMT
	(envelope-from nobody)
Message-Id: <201107261436.p6QEaqWu088839@red.freebsd.org>
Date: Tue, 26 Jul 2011 14:36:52 GMT
From: Mark Johnston <markjdb@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: the MDB2 SQLite driver only supports SQLite 2
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         159209
>Category:       ports
>Synopsis:       databases/pear-MDB2_Driver_sqlite: the MDB2 SQLite driver only supports SQLite 2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 26 14:40:06 UTC 2011
>Closed-Date:    Fri Aug 26 04:55:49 UTC 2011
>Last-Modified:  Fri Aug 26 04:55:49 UTC 2011
>Originator:     Mark Johnston
>Release:        8.2
>Organization:
>Environment:
FreeBSD oddish.mark-home 8.2-STABLE FreeBSD 8.2-STABLE #0: Mon May 16 18:43:29 EDT 2011     root@oddish.mark-home:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
The MDB2 driver for SQLite (databases/pear-MDB2_Driver_sqlite) only
supports SQLite 2; in particular, it doesn't work with SQLite 3. The
driver documentation itself doesn't go out of its way to make this
obvious, and I thought it would be good to document this in the pkg-descr
so that other people don't waste too much time trying to figure out why
it doesn't work with SQLite 3.
>How-To-Repeat:
Try the following script with a SQLite 3 database called "./db".

<?php

require_once 'MDB2.php';

$dsn = 'sqlite:///db';
$db = MDB2::factory($dsn);
if (MDB2::isError($db)) {
        die("Error: " . $db->getMessage() . "\n");
}

$db->connect();
if (MDB2::isError($db)) {
        die("Error: " . $db->getMessage() . "\n");
}

?>

When I run this, I get

$ php mdb2_sqlite.php 
Opening dberror is sqlite_open(): file is encrypted or is not a database
>Fix:
I don't think this driver will ever support SQLite 3 since it would need
to use PDO. Hopefully the extra note in the pkg-descr will help.

Patch attached with submission follows:

--- pkg-descr	2007-02-08 02:41:29.000000000 -0500
+++ pkg-descr.new	2011-07-26 10:04:44.000000000 -0400
@@ -1,3 +1,3 @@
-This is the SQLite MDB2 driver.
+This is the SQLite MDB2 driver. It currently only supports SQLite 2.
 
 WWW: http://pear.php.net/package/MDB2_Driver_sqlite/


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Fri Aug 26 04:55:49 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159209 
>Unformatted:
