SQLITE cache data storage is not supported.

When I change my caching method in config.local.php to “sqlite”

$config[‘cache_backend’] = ‘file’;

to

$config[‘cache_backend’] = [COLOR=“Red”]‘sqlite’[/COLOR];



I get the following error when displaying my web site:

“SQLITE cache data storage is not supported. Please choose another one.”



I checked and sqlite is installed. I created a db fine.



Any ideas why I get the error message?



Thanks, Dan

[QUOTE]$config[‘cache_backend’] = ‘mysql’;[/QUOTE]



You selected “MYSQL”, Not SQLITE … :wink:



Unless you actually meant to type SQLITE



If you go to /var/cache/ you should see the new SQLITE database created there if your server does indeed have the module installed!



Also, after you have switched cache methods, be sure to clear your cache afterwords to clear out the trash from the old cache method & let it all rebuild again properly.

Sorry, I did select sqlite and it gave me the error message that sqlite was not supported.

See if you have this file: /var/cache/cache.db If not, then create it and try again. Make sure you never delete that file or else you will run into errors.

What version are your running?

SQLITE comes in several flavors and it is not till about 2.1.3 that they supported SQLITE, SQLITE3, and PDO SQLITE.



Unfortunately, it’s really sqlite3 that is needed but when compiling php with --sqlite, you don’t get sqlite3 and hence there is not the class definition in support of it.



Unfortunately, unless you go to the web, create the sqlite3 extension (or the pdo sqlite) and configure it into your php environment, you will probably have to used the files method. You might try the shmem method which should be fastest of all if you have the memory needed to support it adequately.

Sorry for the delayed responce. I was having other server issues.



I have tried to create “cache.db”, but it does not show up in my directory. Here is what I am doing.



+++++++++++++++++++++++++++++++++++++++++++++++++++++++++

-sh-3.2$ sqlite3 cache.db

SQLite version 3.3.6

Enter “.help” for instructions

sqlite> .quit

-sh-3.2$ ls

addons schema_block_manager_structure

block_89_1 schema_last_edited_items_schema

block_89_2 schema_last_view_view_conditions

block_89_38 schema_menu_menu

cache_update_handlers.csc schema_permissions_trusted_controllers

lang_cache seo

quick_links settings

schema_block_manager_block_cache_properties template_overrides_A

schema_block_manager_block_controllers template_overrides_C

schema_block_manager_specific_settings top_menu

-sh-3.2$

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Also, it looks like I have SQLite version 3.3.6.



Thanks for any help,

Dan

I create the database, but my site still gives the error message “SQLITE cache data storage is not supported. Please choose another one.”.



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

-sh-3.2$ sqlite3 cache.db

SQLite version 3.3.6

Enter “.help” for instructions

sqlite> .databases

seq name file

— --------------- ----------------------------------------------------------

0 main /var/www/vhosts/landsat.com/httpdocs/var/cache/cache.db

sqlite>

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Here is info on my server configuration.



Configure Command

‘./configure’ ‘–build=i686-redhat-linux-gnu’ ‘–host=i686-redhat-linux-gnu’ ‘–target=i386-redhat-linux-gnu’ ‘–program-prefix=’ ‘–prefix=/usr’ ‘–exec-prefix=/usr’ ‘–bindir=/usr/bin’ ‘–sbindir=/usr/sbin’ ‘–sysconfdir=/etc’ ‘–datadir=/usr/share’ ‘–includedir=/usr/include’ ‘–libdir=/usr/lib’ ‘–libexecdir=/usr/libexec’ ‘–localstatedir=/var’ ‘–sharedstatedir=/usr/com’ ‘–mandir=/usr/share/man’ ‘–infodir=/usr/share/info’ ‘–cache-file=…/config.cache’ ‘–with-libdir=lib’ ‘–with-config-file-path=/etc’ ‘–with-config-file-scan-dir=/etc/php.d’ ‘–disable-debug’ ‘–with-pic’ ‘–disable-rpath’ ‘–without-pear’ ‘–with-bz2’ ‘–with-curl’ ‘–with-exec-dir=/usr/bin’ ‘–with-freetype-dir=/usr’ ‘–with-png-dir=/usr’ ‘–enable-gd-native-ttf’ ‘–without-gdbm’ ‘–with-gettext’ ‘–with-gmp’ ‘–with-iconv’ ‘–with-jpeg-dir=/usr’ ‘–with-openssl’ ‘–with-png’ ‘–with-pspell’ ‘–with-expat-dir=/usr’ ‘–with-pcre-regex=/usr’ ‘–with-zlib’ ‘–with-layout=GNU’ ‘–enable-exif’ ‘–enable-ftp’ ‘–enable-magic-quotes’ ‘–enable-sockets’ ‘–enable-sysvsem’ ‘–enable-sysvshm’ ‘–enable-sysvmsg’ ‘–enable-track-vars’ ‘–enable-trans-sid’ ‘–enable-yp’ ‘–enable-wddx’ ‘–with-kerberos’ ‘–enable-ucd-snmp-hack’ ‘–with-unixODBC=shared,/usr’ ‘–enable-memory-limit’ ‘–enable-shmop’ ‘–enable-calendar’ ‘–enable-dbx’ ‘–enable-dio’ ‘–without-mime-magic’ [COLOR=“Red”]‘–without-sqlite’ [/COLOR]‘–with-libxml-dir=/usr’ ‘–with-xml’ ‘–with-apxs2=/usr/sbin/apxs’ ‘–without-mysql’ ‘–without-gd’ ‘–without-odbc’ ‘–disable-dom’ ‘–disable-dba’ ‘–without-unixODBC’ ‘–disable-pdo’ ‘–disable-xmlreader’ ‘–disable-xmlwriter’ ‘–disable-json’



additional .ini files parsed /etc/php.d/dbase.ini, /etc/php.d/dom.ini, /etc/php.d/gd.ini, /etc/php.d/imap.ini, /etc/php.d/ioncube.ini, /etc/php.d/json.ini, /etc/php.d/ldap.ini, /etc/php.d/mbstring.ini, /etc/php.d/mcrypt.ini, /etc/php.d/mhash.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/ncurses.ini, /etc/php.d/odbc.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_odbc.ini,[COLOR=“red”] /etc/php.d/pdo_sqlite.ini,[/COLOR] /etc/php.d/snmp.ini, /etc/php.d/xmlreader.ini, /etc/php.d/xmlrpc.ini, /etc/php.d/xmlwriter.ini, /etc/php.d/xsl.ini, /etc/php.d/zip.ini



Do I need to change something in the config?

And what version of cs-cart are you running? I don’t believe the handlers for the various sqlite methods were added till 2.1.3 (but not entirely sure).



You can determine your version by:

your_domain.com?version

I am running the latest version.

CS-CART: version 2.1.4 PROFESSIONAL



Thanks,

Dan

You may need to add the following to your php.ini:


extension=pdo_sqlite.so
extension=sqlite.so

Thanks for the suggestions.



I added the code to my phi.ini file and created the cache.db manually, but my server still gives the error "“SQLITE cache data storage is not supported. Please choose another one.”.



After added the code to my phi.ini file, my PHP info has this added info.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

PDO

PDO support enabled

PDO drivers mysql, odbc, sqlite



pdo_sqlite

PDO Driver for SQLite 3.x enabled

PECL Module version 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6.2.3 2007/12/31 07:20:10 sebastian Exp $

SQLite Library 3.3.6

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Do I need CGI, SSI, or Python support turned on on my server?



Is it posible I am missing some files on my cs-cart install?



Thanks,

Dan

in the file core/cache/class.cache_backend_sqlite.php it is looking for a class named ‘SQLiteDatabase’. If that class does not exist then it will die with the message you are seeing.



So something in what you’ve built does not include this class as the interface so it can’t work.



I’m going to guess that the PDO version you built wias sqlite, not sqlite3…

I don’t remember the steps I had to go through, but it was to build sqlite3, phpize it and then add the extension that pointed to that shared object (*.so) file.



Have you tried using the ‘shmem’ method. In theory, it should be fastest of all but may suck up quite a bit of memory.

Just a follow up.



I never could get the “sqlite” cache to work, so I tried Zeke’s sqlite method and it worked fine for my system.



[url]http://forum.cs-cart.com/showthread.php?t=16905&highlight=sqlite[/url]



I will submit a bug on the error I was receiving.



Dan

[QUOTE]I will submit a bug on the error I was receiving.



Dan[/QUOTE]



This has to be one of them “Self Inflicted” bugs. :wink:

[quote]

This has to be one of them “Self Inflicted” bugs.

[/quote]

Why? Most merchants have no control (or very little) of the underlying server environment they reside on.

Why?


[QUOTE]I never could get the “sqlite” cache to work, so I tried Zeke’s sqlite method and it worked fine for my system[/QUOTE]



And at the same time he is also using 2.1.4

My comment was in regard to the “self inflicted”… He can use the old Registry, it is independent of version but I would not recommend doing so. PDO Sqlite should also be supported in 2.1.4. So if the old registery stuff works, the 2.1.4 should as well.

[quote name=‘tbirnseth’]My comment was in regard to the “self inflicted”… He can use the old Registry, it is independent of version but I would not recommend doing so. PDO Sqlite should also be supported in 2.1.4. So if the old registery stuff works, the 2.1.4 should as well.[/QUOTE]





Exactly! That is why there is a confirmed bug now.

[url]http://forum.cs-cart.com/vbugs.php?do=view&vbug_id=2519[/url]



So, back my my original post…



If you are getting an error “SQLITE cache data storage is not supported. Please choose another one.”, you can use the following work around until this bug is fixed.



Zeke’s sqlite method.

[url]http://forum.cs-cart.com/showthread.php?t=16905&highlight=sqlite[/url]

Yes, I believe php 5.3 includes sqlite3 in the core installation module. So one would expect everything to be fine on 5.3. But note that other areas of the cart are not 5.3 compliant so they have to use ^E_DEPRICATED for error_reporting…