Linux Debian support - PHP5 + SQLite in Debian unstable

This is Interesting: Free IT Magazines  
Home > Archive > Linux Debian support > July 2005 > PHP5 + SQLite in Debian unstable





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author PHP5 + SQLite in Debian unstable
Moritz Reiter

2005-07-28, 5:48 pm

Hello,

I would like to use the SQLite functions in a php project to store some
data. As it is really not much data which won't change very often I
don't want to use a real database system like mysql cause I consider it
being disproportionate for the kind of data. SQLite should be a nice
medium between mysql and a plain text file.

First my environment:
Debian unstable
Apache/2.0.54 (Debian GNU/Linux)
PHP/5.0.4-0.10 (from an external source [1])

I installed packages php5-sqlite, sqlite and sqlite3 packages, too.

And I added the line

extension=sqlite.so

to /etc/php5/apache2/php.ini.

When I now give it a try and run the script

<?php $db = sqlite_open(foo) ?>

as described in the official php documentation [2] it just says

Fatal error: Call to undefined function sqlite_open() in /path/index.php
on line 3

If I try

<?php
dl("sqlite.so");
$db = sqlite_open(foo);
?>

it says

Warning: dl() [function.dl]: Unable to load dynamic library
'/usr/lib/php5/20041030/sqlite.so' - /usr/lib/php5/20041030/sqlite.so:
undefined symbol: ps_globals in /path/index.php on line 2

Fatal error: Call to undefined function sqlite_open() in /path/index.php
on line 3

Unfortunately the documentation available at sqlite.org does not deal
with php issues and the documentation on php.net is not very verbose on
this topic. A quick google search did not give me any useful results either.

Regards,
Moritz

[1] deb http://people.debian.org/~dexter php5 sid
[2] http://www.php.net/manual/en/function.sqlite-open.php
Moritz Reiter

2005-07-29, 7:46 am

Update:

In my apache2 error.log there is a line saying:

PHP Warning: php Startup: Unable to load dynamic library
'/usr/lib/php5/20041030/sqlite.so' - /usr/lib/php5/2004
1030/sqlite.so: undefined symbol: ps_globals in Unknown on line 0

So it must be a problem with the sqlite.so.
But I still have no idea how to fix that.

Regards,
Moritz
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com