Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating an application using spatialite database. I checked couple of tutorial from internet. Most of them explains the same. But the problem is I need "" extension library. I do not know how to get it.

So whenever i run my code it shows the following warning and error....

[Warning: SQLite3::query() [sqlite3.query]: Unable to prepare statement: 1, no such module:]
[Fatal error: Call to a member function fetchArray() on a non-object]

But my code looks OK. It looks like because of i could not load the extention ""

I have given bellow, my code.


$db = new SQLite3('sixcommunes.sqlite'); 


$db->exec("SELECT InitSpatialMetadata()");

$rs = $db->query('SELECT sqlite_version()');

while ($row = $rs->fetchArray()) {
    print "<h3>SpatialLite version: $row[0]</h3>";

$sql = "SELECT KOM_NAMN FROM '6communes_SWEREF99TM'";

$rs = $db->query($sql);
$msg = "";
while($row = $rs->fetchArray()){
        $msg = $row[0];
    print "<h3>$msg</h3>";
share|improve this question
up vote 1 down vote accepted

What computer? If Ubuntu/Debian, try:

sudo apt-get install libspatialite-dev
share|improve this answer
My computer is windows 7. It this case what should I do? – Shahjalal Mar 21 '12 at 9:51
.so files are for Unix-like systems. For Windows, you need to find a DLL equivalent. – Mike T Mar 21 '12 at 10:58
Thanks for help. I have the windows dll. I do not know how should I configure my wampserver. Could you please read the following question, if you can help me somehow.… – Shahjalal Mar 21 '12 at 22:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.