adamchal Posted April 26, 2007 Share Posted April 26, 2007 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? Quote Link to comment Share on other sites More sharing options...
btherl Posted April 26, 2007 Share Posted April 26, 2007 This may be the problem http://sg.php.net/manual/en/ref.pdo-sqlite.php My understanding of the docs is that sqlite version 2 uses the old interface, but sqlite version 3 must use the PDO interface, not the direct sqlite interface (and the sqlite_* functions) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.