Jump to content

SQLite PHP5 undefined function sqlite_*


adamchal

Recommended Posts

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 "<? print_r(get_defined_functions()) ?>"| php|grep -i pdo

[1222] => pdo_drivers

 

[dev:~] # echo "<? print_r(pdo_drivers()) ?>"| php|grep -i pdo[dev:~] # echo "<? print_r(pdo_drivers()) ?>"| php

Array

(

[0] => mysql

[1] => odbc

[2] => sqlite

)

 

[dev:~] # echo "<? print_r(get_defined_functions()) ?>"| 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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.