ID: 35345
Comment by: saravana dot nsk83 at gmail dot com
Reported By: csaba at alum dot mit dot edu
Status: No Feedback
Bug Type: PDO related
Operating System: Win XP Pro
PHP Version: 5CVS-2005-11-23 (snap)
Assigned To: wez
New Comment:
Hello sir,
i was unable to connect sqlite with php.
Error: Fatal error: Call to undefined function sqlite_open() in
C:\webs\test\testsqlite.php5 on line 12
thank you,
Saravana
Previous Comments:
------------------------------------------------------------------------
[2008-09-03 08:32:21] niz_reez4 at yahoo dot com
<?php
//create table
if(file_exists("test.db")) {
$weNeedToCreateTheDatabase = false;
} else {
$weNeedToCreateTheDatabase = true;
}
//create or open database
$db = sqlite_open("test.db") or die("failed to open/create the
database");
//create table
if($weNeedToCreateTheDatabase) {
sqlite_query($db, "CREATE TABLE Members(FirstName,LastName)");
}
//add info
sqlite_query($db,"INSERT INTO Members VALUES ('Jim', 'Rockerton')");
//get info
$dt = sqlite_query($db, "SELECT * FROM Members");
while ($row = sqlite_fetch_array($dt)) {
echo "row: $row[FirstName] $row[LastName]<br/>";
}
//close database
sqlite_close($db);
?>
------------------------------------------------------------------------
[2007-05-24 10:59:57] scriper at mail dot ru
Well, when i upgraded from 5.1.6 i've saved my php.ini, now i have
replaced it with php.ini.recommended from 5.2.2 dist, uncommented
modules and everything goes ok.
------------------------------------------------------------------------
[2007-05-24 10:26:32] scriper at mail dot ru
Well, after copying php_pdo.dll and php_sqlite.dll to c:/php i have
another warning coming: Cannot load module 'SQLite' because required
module 'pdo' is not loaded
------------------------------------------------------------------------
[2007-05-24 09:50:35] scriper at mail dot ru
Actually i have the same problem. I've have win xp sp2,php 5.2.2 and
apache 2.2.4. In my php.ini i've uncommented:
extension php_pdo.dll
extension php_pdo_mysql.dll
extension php_pdo_sqlite.dll
extension php_pdo_sqlite_external.dll
extension=php_sqlite.dll
I checked ext dir, it contains all of that. After restarting apache,
and give a request for example http://localhost/index.php i get a
Warning:
PHP Startup: Unable to load dynamic library
'C:/php/ext/php_sqlite.dll'- The specified module could not be found.
------------------------------------------------------------------------
[2007-05-06 23:43:02] kunalspunjabi at yahoo dot com
I am seeing the following error when I add the following lines to my
php.ini file:
extension=php_pdo.dll
extension=php_pdo_mysql.dll
extension=php_pdo_sqlite.dll
extension=php_sqlite.dll
I then restarted Apache and invoked PHP from the command line:
$ php
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program
Files\PHP\ext\php_sqlite.dll' - The specified module could not be
found.
in Unknown on line 0
My PHP extensions directory contains all these DLLs, apparently
php_sqlite.dll is the only one that does not load. Why?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/35345
--
Edit this bug report at http://bugs.php.net/?id=35345&edit=1