SQLite PHP5 undefined function sqlite_*

Support for webhosts that use CentOS
Post Reply
adamchal
Posts: 1
Joined: 2007/04/26 02:17:02
Contact:

SQLite PHP5 undefined function sqlite_*

Post by adamchal » 2007/04/26 02:31:00

I'm using CentOS 4.4. I have the following packages installed and setup correctly:

[dev:~] # yum list|grep pdo
php-pdo.i386 5.1.6-3.el4s1.5 installed

[dev:~] # yum list|grep sqlite
sqlite.i386 3.3.3-1.2 installed
sqlite-devel.i386 3.3.3-1.2 installed

Also, I have this in my php.ini file (just to make sure that pdo.so and pdo_sqlite.so were loaded):

extension=pdo.so
extension=pdo_sqlite.so

When I look at the 'phpinfo()', I see PDO and PDO SQLite in the output:

PDO
PDO support enabled
PDO drivers sqlite, mysql

pdo_sqlite
PDO Driver for SQLite 3.x enabled
PECL Module version (bundled) 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6 2006/01/01 12:50:12 sniper Exp $
SQLite Library 3.2.8

However, when I use any of the sqlite functions, ie. sqlite_popen('sqlite_db'), I see this in the Apache error log:

...PHP Fatal error: Call to undefined function sqlite_popen()...

I get the same thing from the command line. Even more, I can use the sqlite command line utility and I have successfully created an sqlite3 db and it works completely. It seems that PHP will just not recognize those sqlite functions.

Check this out:

[dev:~] # echo ""| php|grep -i pdo
[1222] => pdo_drivers

[dev:~] # echo ""| php|grep -i pdo[dev:~] # echo ""| php
Array
(
[0] => mysql
[1] => odbc
[2] => sqlite
)

[dev:~] # echo ""| php|grep -i sqlite
[dev:~] #

Nothing.

I'm at a loss! I couldn't find any documentation anywhere about this. Anybody have any experience with this?

foxb
Posts: 1921
Joined: 2006/04/20 19:03:33
Location: Montreal/QC

SQLite PHP5 undefined function sqlite_*

Post by foxb » 2007/04/28 03:28:00

And what about php-sqlite?

jult
Posts: 40
Joined: 2007/01/04 02:10:11
Location: Amsterdam, .NL
Contact:

Re: SQLite PHP5 undefined function sqlite_*

Post by jult » 2007/05/01 09:15:48

It is strange how totally non-explanatory the php-sqlite website is. They never explain you what is needed and why, or even what it is for. They assume a lot of knowledge about sql in general.

foxb
Posts: 1921
Joined: 2006/04/20 19:03:33
Location: Montreal/QC

Re: SQLite PHP5 undefined function sqlite_*

Post by foxb » 2007/05/01 16:53:32

http://ca.php.net/sqlite

Post Reply