|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-11-23 10:10 UTC] csaba at alum dot mit dot edu
Description: ------------ I downloaded a new snapshot (.zip) of PHP (version 5.1.0 RC7), stopped Apache 2 and overwrote the prior extracted files (about 10), all sitting in c:\winapps\php.net. In addition, I also extracted php_sqlite.dll to the same directory (since my sqlite code which had been relying on PHP 5.1 of Aug 31 no longer functioned). Next I went into c:\windows\php.ini and added the line extension=php_sqlite.dll (the only other extension I have loading is php_shmop.dll). * Note, at the least there seems to be a documentation bug because php.net/sqlite says to add php_extension=php_sqlite.dll * Now when I go to restart apache 2, I get the following confirm alert/msgbox twice: Warning PHP Startup: Unable to load dynamic library './php_sqlite.dll' - The specified module could not be found. This is an exceptionally unhelpful message as a normal person would suspect that there is a problem locating php_sqlite.dll as that is the only thing specified. At any rate, the loading is successful if I also add extension=php_pdo.dll to php.ini and plunk php_pdo.dll into the main directory. Without setting extension nor file for php_pdo_sqlite.dll Thanks, Csaba Gabor from Vienna Expected result: ---------------- 1. I expect that all I need to run my older code is php_sqlite.dll I do not expect to need php_pdo.dll which I do not currently utilitze in my code. php_pdo.dll should be relying on php_sqlite.dll, if anything, and not the other way around. 2. I expect the docs in http://php.net/sqlite (and perhaps also http://php.net/pdo-sqlite) to mention when I should use only php_sqlite.dll (and set extension), when I need to include php_pdo.dll (and whether I should use php_sqlite.dll with it or php_pdo_sqlite.dll or both). Actual result: -------------- 1. php_sqlite.dll seems to require php_pdo.dll to function. This seems counterintuitive, at best. 2. A user (me) is sure to wonder how the two ...sqlite.dll come into play. This is in addition/commensurate with being confused about how to swap drivers between v2 and 3 and when one would want to do so. In other words, there seem to be possibilities of with/without pdo, v2 or v3 drivers, and two distinct sqlite dll's. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 15:00:01 2025 UTC |
<?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); ?>