Static plugin installation error with sqlite db backend

Having trouble installing serendipity?
Post Reply
latcarf
Regular
Posts: 25
Joined: Tue Apr 12, 2005 1:21 am
Location: Silicon Valley, CA
Contact:

Static plugin installation error with sqlite db backend

Post by latcarf »

Hello,

I just tried to install the static pages event plugin from spartacus on my 2.0b3 s9y shared installation with PDO::sqlite DB backend and got the following error(s):

Code: Select all

Error in ALTER TABLE serendipity_staticpages ADD COLUMN shownavi int(4) default '1';
Array
Fatal error: Nesting level too deep - recursive dependency? in /usr/local/lib/php/serendipity2/s9y/include/db/pdo-sqlite.inc.php on line 242
Sounds kinda nasty. How supported is sqlite? I thought I might decide to use it exclusively but I'm starting to feel wary of it... Am I treading down a dark path here with a shared install 2.0 using pdo::sqlite?? I liked the idea of standalone databases and the lightness of sqlite3 but I seem to be having a lot of troubles that I don't have with mySQL.

Thanks guys!
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Static plugin installation error with sqlite db backend

Post by onli »

The part of the development work of 2.0 I did was done using sqlite. Staticpages is working here as well.

But I have no experience with shared installations. Still, my guess is that there is still an error (might very well be in s9y) in the setup of the installation.

It might be that a traditional db might be easier there, though it shouldn't make a difference, if the connection is properly shared. If that is not the case - like I said, no experience with shared installations - sqlite is indeed the wrong choice for a shared installation, as concurrent accesses of instances with no knowledge of each other could corrupt the database file.

The query itself is valid in sqlite3, and the array after makes me think it is not the query itself that is faulty (you sure are using sqlite3?).
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Static plugin installation error with sqlite db backend

Post by Timbalu »

Sqlite does allow ALTER TABLE ADD COLUMN, normally.
The Fatal error: Nesting level too deep - recursive dependency? does just happen because the first did error, why ever. Sqlite does not want and allow var_dumps for backtracing errors, I assume.
I too have no personal experience with shared installations and sqlite databases. But my guess it is a follow up of your other error.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
latcarf
Regular
Posts: 25
Joined: Tue Apr 12, 2005 1:21 am
Location: Silicon Valley, CA
Contact:

Re: Static plugin installation error with sqlite db backend

Post by latcarf »

Thanks for the follow-ups guys. Sorry it took so long for my response.

Anyway, I just tried 2.0b3 install on a RaspberryPi (Serendipity: 2.0-beta3, Apache: 2.2.22 (Debian), PHP: 5.4.4-14+deb7u14, sqlite3: 3.7.13 2012-06-11 02:05:22 f5b5a13f7394dc143aa136f1d4faba6839eaa6dc) - this time it is not a shared install.

I still get the same error when I try to install the Static Pages event plugin via Spartacus.
Error in ALTER TABLE serendipity_staticpages ADD COLUMN shownavi int(4) default '1';
Array
Fatal error: Nesting level too deep - recursive dependency? in /web/serendipity/include/db/pdo-sqlite.inc.php on line 240
Here's the sequence of events from installation to error...
  1. Unzip and install Serendipity (change ownership of files to www-data).
  2. Only change in Configuration is using PDO::sqlite and enabling Apache mod_rewrite.
  3. Plugins -> Install Spartacus, move Spartacus to top of event plugins.
  4. Plugins -> Install Static Pages. Error is displayed
When I go back to the admin page, it seems like the Static Pages plugin is working OK (the link is there and I can create pages) but I haven't gone to the back-end to check the DB itself.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Static plugin installation error with sqlite db backend

Post by Timbalu »

I can't really help with the sqlite itself, but...

The staticpage line in error should not happen on a fresh install.
A fresh install should install the table and just work as being $fresh = true and db_built = 7. The line in error should not run, since nearly all cases starting from 8 are for older version upgraders only, but the installer runs through and sets db_built = 21 to the staticpage plugin instance in *_config table at the very end.

The problem is that your staticpage table(s) already exist, but there is no correct value to make sure this is known. (I assume it still is db_build = 7)
I would suggest to either change the staticpage 'db_build' value in the config table to 21 (recommended try) or deinstall staticpages via s9y admin backend and manually purge the (prefixed_) eg 'serendipity_' staticpage tables (*_staticpages, *_staticpages_types, *_staticpage_categorypage, *_staticpage_custom) in your database and do a fresh install in follow.

Before you do this: You are sure the sqlite is working elsewhere? Adding or changing other config values.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply