some plugins seems have problem with SQLite?

Creating and modifying plugins.
Guest

some plugins seems have problem with SQLite?

Post by Guest »

When I click one of the plugins...

The sidebar plugins messages:
-----
Warning: Invalid argument supplied for foreach() in /home/share/www/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 524

Warning: sqlite_query() [function.sqlite-query]: serendipity_pluginlist.description may not be NULL in /home/share/www/include/db/sqlite.inc.php on line 135
bool(false) string(176) "INSERT INTO serendipity_pluginlist (pluginPath,pluginlocation,plugintype,plugin_file,requirements,stackable) values ('online_repository', 'Spartacus', 'sidebar', '', 'N;', '0')"
Warning: Invalid argument supplied for foreach() in /home/share/www/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 524

Warning: sqlite_query() [function.sqlite-query]: serendipity_pluginlist.description may not be NULL in /home/share/www/include/db/sqlite.inc.php on line 135
bool(false) string(176) "INSERT INTO serendipity_pluginlist (pluginPath,pluginlocation,plugintype,plugin_file,requirements,stackable) values ('online_repository', 'Spartacus', 'sidebar', '', 'N;', '0')"
-----

The event plugins, the messages show up:
-----
Warning: Invalid argument supplied for foreach() in /home/share/www/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 524

Warning: sqlite_query() [function.sqlite-query]: serendipity_pluginlist.description may not be NULL in /home/share/www/include/db/sqlite.inc.php on line 135
bool(false) string(174) "INSERT INTO serendipity_pluginlist (pluginPath,pluginlocation,plugintype,plugin_file,requirements,stackable) values ('online_repository', 'Spartacus', 'event', '', 'N;', '0')"
Warning: sqlite_query() [function.sqlite-query]: table serendipity_pluginlist has no column named upgradable in /home/share/www/include/db/sqlite.inc.php on line 135
bool(false) string(543) "INSERT INTO serendipity_pluginlist (class_name,plugin_file,plugin_class,name,description,author,version,requirements,upgradable,upgrade_version,pluginPath,pluginlocation,plugintype,stackable) values ('serendipity_event_httpauth', 'serendipity_event_httpauth', 'serendipity_event_httpauth', 'HTTP-Authentication', 'Authenticates users via HTTP auth using their s9y user login data.', 'Garvin Hicking', '1.2', 'a:3:{s:11:"serendipity";s:3:"0.8";s:3:"php";s:0:"";s:6:"smarty";s:0:"";}', '1', '1.5', 'online_repository', 'Spartacus', 'event', '0')"
-----

And the Backup Interface messages:
-----
Warning: sqlite_query() [function.sqlite-query]: no such table: serendipity_dma_sqlbackup in /home/share/www/include/db/sqlite.inc.php on line 135
bool(false) string(39) "SELECT * FROM serendipity_dma_sqlbackup"
Warning: Invalid argument supplied for foreach() in /home/share/www/plugins/serendipity_event_backup/serendipity_event_backup.php on line 1068

Warning: sqlite_query() [function.sqlite-query]: near "SHOW": syntax error in /home/share/www/include/db/sqlite.inc.php on line 135
bool(false) string(11) "SHOW TABLES"
Warning: Invalid argument supplied for foreach() in /home/share/www/plugins/serendipity_event_backup/serendipity_event_backup.php on line 1091

Warning: sqlite_query() [function.sqlite-query]: no such table: serendipity_dma_htmlbackup in /home/share/www/include/db/sqlite.inc.php on line 135
bool(false) string(40) "SELECT * FROM serendipity_dma_htmlbackup"
Warning: Invalid argument supplied for foreach() in /home/share/www/plugins/serendipity_event_backup/serendipity_event_backup.php on line 1216
-----

Serendipity-20051014
CentOS 4.1 + apache 2.0.52-12.2 + php 5.0.4-3
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: some plugins seems have problem with SQLite?

Post by garvinhicking »

Thanks for reporting this, I'll check it out. I already spotted one of the problems.

Can you explain what exactly you click to get the first message especially?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

1. Administration->Configure Plugins->
Click here to install a new sidebar plugin(Sidebar Plugins)

2. Administration->Configure Plugins->
Click here to install a new sidebar plugin(Event Plugins)

3. Administration->Backup Interface

When I change Language to English(Personal Settings->Language),
there was no Warning messages with item 1, item 2 and 3 still have
the Warning messages.

My default Language settings is Traditional Chinese(UTF-8).
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Thanks for clarifying; I'll try it out with SQLite. Granted, our primary DB layer is MySQL, the others are a bit left behind but usually work.

The Backup plugin does not work with SQLite, BTW.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

And install DownloadManager plugins:
---
...

Trying to open URL lang_ja.inc.php?rev=1.9999...
Fetched 9789 bytes from the URL above. Saving file as /home/share/www//plugins/serendipity_event_downloadmanager/lang_ja.inc.php...
Data successfully fetched.

Warning: sqlite_query() [function.sqlite-query]: near "NOT": syntax error in /home/share/www/include/db/sqlite.inc.php on line 135
bool(false) string(398) "CREATE TABLE IF NOT EXISTS serendipity_dma_downloadmanager_files ( id INTEGER PRIMARY KEY, catid int(10) NOT NULL default '0', timestamp int(10) NOT NULL default '0', systemfilename varchar(32), realfilename varchar(150), description text, filesize int(10) NOT NULL default '0', dlcount int(10) NOT NULL default '0' )"
Warning: sqlite_query() [function.sqlite-query]: near "NOT": syntax error in /home/share/www/include/db/sqlite.inc.php on line 135
bool(false) string(285) "CREATE TABLE IF NOT EXISTS serendipity_dma_downloadmanager_categories ( node_id INTEGER PRIMARY KEY, root_id int(10) NOT NULL default '0', payload varchar(64), lft int(10) NOT NULL default '0', rgt int(10) NOT NULL default '0' )"
Warning: sqlite_query() [function.sqlite-query]: no such table: serendipity_dma_downloadmanager_categories in /home/share/www/include/db/sqlite.inc.php on line 135
bool(false) string(79) "SELECT * FROM serendipity_dma_downloadmanager_categories WHERE payload = 'root'"
Fatal error: Cannot use string offset as an array in /home/share/www/plugins/serendipity_event_downloadmanager/serendipity_event_downloadmanager.php on line 367
---

then I back to Administration show up:
Image
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Sadly, many plugin authors use MySQL-specific extensions like this "IF NOT EXISTS". If you remove it, the table should get created in SQLite...

There might be other issues like these, since usually SQLite is more an expermental use in environments like blogs, where its performance is not really good because of concurrency issues and such. If you find more problems, I would love to get reports of them here so I can fix them in the future.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

garvinhicking wrote:Thanks for clarifying; I'll try it out with SQLite. Granted, our primary DB layer is MySQL, the others are a bit left behind but usually work.

The Backup plugin does not work with SQLite, BTW.
I use serendipity because it support SQLite,
before that I used b2evolution/plog/WordPress for a few months. :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Is there a reason why you use SQLite instead of MySQL?

Usually SQLite is just for playing, but for serious performance it cannot come anywhere near mysql/postgres. SQLite has some basic flaws, especially ALTER TABLES is not possible and thus upgrading is fairly hard.

Having said that, we still aim at supporting SQLite fully. I will look at your issues and fix them, and report back when that is done. Expect it at the beginning of next week.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

It's just a personal blog, and not so many visitors to view my blog. :)
So I decided to change from MySQL to SQLite.
And the Server box is Athlon 750 Mhz + 512 MB RAM,
which serve as FireWall/Mail/Samba/WWW server. 8)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Okay, I see. If you want to save memory and not have a mysqld process, SQLite does make sense.

I'm sure we'll get the remaining SQLite problems fixed, thanks to your help :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

Great! I'm really love serendipity! :wink:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

I just installed a SQLite s9y version and tried to reproduce your problem.

With the latest checkout of SVN (http://www.s9y.org/snapshots/s9y_200510161537.tar.gz) and the latest spartacus version provided with that, it all properly works here?

The reasons might be UTF-8 problems with your SQLite or an old SQLite version. I tried it on my machine with PHP 5.1.0-RC1 and english language.

Can you try to switch your plugin to english and/or upgrade your PHP? And please try to empty/truncate your serendipity_pluginlist DB table after you have changed the language, so that spartacus can try to reparse the plugins

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

How to empty/truncate the serendipity_pluginlist DB table?
just delete all of the plugins dir. ?

How about the problem that some plugins can't install with SQLite?
(Backup Interface/DownloadManager...)

I'll try with new PHP & SQLite in a few days later.
Thanks!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

No, to truncate the DB you will need to execute this SQL query: "DELETE FROM serendipity_pluginlist". You need a SQL Manager for SQLite or the console client for that.

I fixed the backup/downloadmanager plugins to not contain the "IF NOT EXISTS" statement today. The updates plugins should be available in spartacus the next 48 hours.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

There were the same problem with my testing box:
Mandriva 2006 cooker(2006.1)
Apache-2.0.55-2mdk
php-5.1.0-0.RC1.1mdk

SQLite info. within phpinfo():
PECL Module version 2.0-dev $Id: sqlite.c,v 1.166 2005/08/03 14:07:54 sniper Exp $
SQLite Library 2.8.16
SQLite Encoding UTF-8
Post Reply