Doc #54274 [NEW]: SQLite class is not available on FreeBSD default installation
| From: | enterco at yahoo dot com | Date: | Wed, 16 Mar 2011 13:16:53 +0000 |
| Subject: | Doc #54274 [NEW]: SQLite class is not available on FreeBSD default installation | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-6082@lists.php.net to get a copy of this message | ||
From:
Operating system: FreeBSD
PHP version: 5.3.5
Package: SQLite related
Bug Type: Documentation Problem
Bug description:SQLite class is not available on FreeBSD default installation
Description:
------------
---
From manual page: http://www.php.net/book.sqlite3
---
FreeBSD uses a 'port system' to install third party packages, including
PHP. At this time, FreeBSD's port system is installing PHP as a 'main
component' (the php binary, and/or apache module, etc) and every extension
is installed separately.
PHP 5.3.5 documentation states that 'SQlite class is installed by default',
but this does not happen on FreeBSD, probably because ./configure script is
run with the following arguments:
'Configure Command => './configure' '--with-layout=GNU'
'--localstatedir=/var' '--with-config-file-scan-dir=/usr/local/etc/php'
'--disable-all' '--enable-libxml' '--with-libxml-dir=/usr/local'
'--with-pcre-regex=/usr/local' '--with-zlib-dir=/usr'
'--program-prefix='
'--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php'
'--with-zend-vm=CALL' '--enable-zend-multibyte' '--prefix=/usr/local'
'--mandir=/usr/local/man' '--infodir=/usr/local/info/'
'--build=amd64-portbld-freebsd8.2'
I have not tried a full source install instead of FreeBSD's default ports
system, but I assume that '--disable-all' triggers '--without-sqlite3', so
sqlite extension is no longer installed 'by default'.
A documentation update would be appreciate, so FreeBSD users will be
informed about the reasons why SQLite3 is not available on this operating
system by default.
I expect SQLite3 will be enabled as an extension on FreeBSD by php port
maintainters.
Test script:
---------------
<?php
$db_file = "sample.db";
$db = new SQLite3($db_file);
$sql="SELECT a, b FROM table1;";
$result = $db->query($sql);
while($res = $result->fetchArray(SQLITE3_ASSOC)) {
echo $res['a']." ".$res['b']."\n";
}
?>
Actual result:
--------------
PHP Fatal error: Class 'SQLite3' not found in
/test/sqlite/sqlite-error.php on line 3
Fatal error: Class 'SQLite3' not found in /test/sqlite/sqlite-error.php on
line 3
--
Edit bug report at http://bugs.php.net/bug.php?id=54274&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54274&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54274&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54274&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54274&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54274&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54274&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54274&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54274&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54274&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54274&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54274&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54274&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54274&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54274&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54274&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54274&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54274&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54274&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54274&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54274&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54274&r=mysqlcfg