Bug 428787

Summary: php-sqlite problems
Product: [Fedora] Fedora Reporter: Andrew Tch <qwaser>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-13 11:53:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Tch 2008-01-15 08:41:42 UTC
Description:
php-sqlite module not avliable. pecl install sqlite gives error:

/root/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_NONE' undeclared here (not in a
function)
/root/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_FORCE' undeclared here (not in a
function)
/root/SQLite-1.0.3/sqlite.c:125: warning: initialization from incompatible
pointer type
/root/SQLite-1.0.3/sqlite.c:126: warning: initialization from incompatible
pointer type

Fix:

download sqlite via pecl download sqlite, extract the package

edit sqlite.c, comment out line 56:

/*static unsigned char arg3_force_ref[] = {3, BYREF_NONE, BYREF_NONE,
BYREF_FORCE };*/

and alter lines 124-127 to the following:

function_entry sqlite_functions[] = {
        PHP_FE(sqlite_open, third_arg_force_ref)
        PHP_FE(sqlite_popen, third_arg_force_ref)

then you will be able to compile sqlite via phpize && ./configure && make.

Please include php-sqlite into fedora core distribution since it is a vital
server package!

Comment 1 Joe Orton 2008-02-13 11:53:44 UTC
The sqlite module shipped in PHP only supports sqlite 2.x.  Any compilation
problems with PECL modules should be reported upstream.

Fedora includes the SQLite 3.x backend for PDO in the php-pdo package.