• Resolved steadybright

    (@steadybright)


    Is there a workaround for this type of failure? I would like to use SlimStat with SQLite Integration. Please let me know. These are two examples (in HTML below) of many similar errors using SlimStat with SQLite integration:

    <html>
    <head>
    <title>nginx-error.log</title>
    </head>
    
    <body>
    2014/03/17 11:30:31 [error] 308#0: *2 FastCGI sent in stderr: "PHP message: WordPress database error <div style="clear:both">?</div><div class="queries" style="clear:both; margin_bottom:2px; border: red dotted thin;">Queries made or created this session were
    
    <ol>
    <li>Raw query:	SET @@session.time_zone = '+00:00'</li>
    <li>Rewritten: SELECT 1=1</li>
    <li>With Placeholders: SELECT 1=1</li>
    <li>Prepare: SELECT 1=1</li>
    <li>Executing: (no parameters)</li>
    </ol>
    </div><div style="clear:both; margin_bottom:2px; border: red dotted thin;" class="error_message" style="border-bottom:dotted blue thin;">Error occurred at line 157 in Function query.  Error message was: <h1>Unknown query type</h1><p>Sorry, we cannot determine the type of query that is requested.</p><p>The query is SET @@session.time_zone = '+00:00'</p> </div>
    <pre>#0  PDOEngine->get_error_message() called at [/nginx/http/worpress/wp-content/plugins/sqlite-integration/pdodb.class.php:171]
    #1  PDODB->query(SET @@session.time_zone = '+00:00') called at [/nginx/http/worpress/wp-content/plugins/wp-slims" while reading response header from upstream, client: 11.22.33.44, server: blog.example.com, request: "POST /wordpress/wp-admin/admin.php?page=wp-slim-view-3 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "blog.example.com", referrer: "https://blog.example.com/wordpress/wp-admin/admin.php?page=wp-slim-view-2"
    2014/03/17 11:30:35 [error] 308#0: *2 FastCGI sent in stderr: "PHP message: WordPress database error <div style="clear:both">?</div><div class="queries" style="clear:both; margin_bottom:2px; border: red dotted thin;">Queries made or created this session were
    <ol>
    <li>Raw query:	SET @@session.time_zone = '+00:00'</li>
    <li>Rewritten: SELECT 1=1</li>
    <li>With Placeholders: SELECT 1=1</li>
    <li>Prepare: SELECT 1=1</li>
    <li>Executing: (no parameters)</li>
    </ol>
    
    </div><div style="clear:both; margin_bottom:2px; border: red dotted thin;" class="error_message" style="border-bottom:dotted blue thin;">Error occurred at line 157 in Function query.  Error message was: <h1>Unknown query type</h1><p>Sorry, we cannot determine the type of query that is requested.</p><p>The query is SET @@session.time_zone = '+00:00'</p> </div></pre>
    <pre>#0  PDOEngine->get_error_message() called at [/nginx/http/worpress/wp-content/plugins/sqlite-integration/pdodb.class.php:171]
    #1  PDODB->query(SET @@session.time_zone = '+00:00') called at [/nginx/http/worpress/wp-content/plugins/wp-slims" while reading response header from upstream, client: 11.22.33.44, server: blog.example.com, request: "POST /wordpress/wp-admin/admin.php?page=wp-slim-view-6 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "blog.example.com", referrer: "https://blog.example.com/wordpress/wp-admin/admin.php?page=wp-slim-view-3"
    </body>
    </html>

    Thank you for your help. I think this is an excellent plugin!

    sb

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author kjmtsh

    (@kjmtsh)

    Thank you for the report, steadybright.

    This message means that SQLite can’t execute “SET @@session.time_zone” query and the plugin rewrote it into SELECT 1=1, which is also meaningless but harmless to SQLite. These kind of messages could be annoying for ordinary use, so I decided to put out them only on debug mode. Development version includes this change. Please use it if you like. You can download it form svn repository.

    I checked the SlimSat myself. This plugin has many queries that are meaningless for SQLite. For example, it displays the database table size information, which feature SQLite doesn’t have. Or it checks the tables are innoDB or MyISAM, which is meaningless for SQLite. So you can’t use some of the features or utilities of SlimStat with SQLite Integration, I’m afraid.

    As for the example you mentioned, “SET @@session.time_zone” sets MySQL time_zone to UTC if it is not so. You don’t have to worry about it not being executed because SQLite’s time_zone is UTC.

    I read the codes but didn’t installed SlimStat, so somethng about basic functionality might go wrong. If you come across the other problems, please let me know again.

    Regards

    Thread Starter steadybright

    (@steadybright)

    Thank you for your reply, kjmtsh.

    Unfortunately, the basic functionality of SlimStat does not work with SQLite. However, I would rather have SQLite than SlimStat!

    Your plugin is marvelous, and I’m glad to be able to use the lightweight SQLite with WP on my server.

    Thank you,

    sb

    Hi, I am the developer of wp slimstat. Is there anything I can add to my code to check if SQLite is being used? I could avoid running those queries if I can detect that ??

    Thread Starter steadybright

    (@steadybright)

    Hi Camu,

    I suspect your question is for kjmtsh, but if it’s for me, I can only send you the full list of error messages that I received while I was trying to get SlimStat to work. Of these issues, I only sent two to kjmysh.

    I really appreciate your following up on this. SlimStat is a wonderful plugin that I’d like to keep using!

    Thanks,

    sb

    Plugin Author kjmtsh

    (@kjmtsh)

    Hi, camu.

    Thank you for your suggection. The problem is not from the fault of SlimStat. It’ from the differences between SQLite and MySQL. I’ll install your plugin and try to check if there’s something you can do.

    @ steadybright
    I feel sorry that you can’t use the plugin you want to use. I’ll try to check if there’s some way to avoid the problem, though I can’t give you any warranty. Please wait.

    Thank you, camu and steadybright.

    Thank you both.

    Thread Starter steadybright

    (@steadybright)

    Thank you kjmtsh and camu! I am grateful for your sacrifice of time and diligence to develop great plugins.

    sb

    Hi kjmtsh, great plug-in. Any further progress on using slimstat with SQLite Integration?

    tm.

    Plugin Author kjmtsh

    (@kjmtsh)

    Hi, incerman,

    I updated my plugin, which includes some changes for you to use WP Slimstat. But you still need some hacks to activate WP Slimstat without an error message.

    In the file wp-slimstat/admin/wp-slimstat-admin.php, look for the line something like this (around the line 100)

    public static function activate () {
        wp_slimstat::$options = get_option('slimstat_options', array());
        self::init_environment(true);
    }

    and change this line like below:

    public static function activate () {
        if (empty(wp_slimstat::$options['version'])) {
            self::init_environment(false);
        } else {
            self::init_environment(true);
        }
    }

    This will enable you to activate the plugin without an error message. But the database maintenance utility doesn’t work, as I said before. As for other functionalities, I’m not sure if they work properly or not. Please use SQLite Integration version 1.6, and check if you succeed in activating WP Slimstat. I’ll be glad if you let me know the result.

    Thank you.

    Thread Starter steadybright

    (@steadybright)

    Hi kjmtsh,

    Thank you for your effort. I followed your instructions and was able to install WP SlimStat without error.

    However, WP SlimStat does not function correctly, even with your modifications using the current version for SQLite Integration (and WP 3.9).

    I no longer receive the errors (like the ones I presented in my initial post (top of this page)), but WP SlimStat is only partially functional at best: it can see a user is logged in and charts on the “Overview,” “Content,” and “Vistors” tabs seem to work, but nothing is presented on the “Activity Log” tab nor the “World Map” tab. Data is missing/inconsistent on all tabs. I have a commercially-hosted blog, which uses MySQL, so I have the benefit of observing a functioning WP SlimStat install. Unfortunately, I’d still call WP SlimStat plugin broken with SQLite Integration.

    Again, thank you for spending your valuable time on this effort. I am very grateful.

    Sincerely,

    steady

    Plugin Author kjmtsh

    (@kjmtsh)

    Hi, steadybright,

    Thank you for your quick test. I just fixed a bug and committed to the subversion repository. Will you try the development version? Of course, if you have time.

    1. Download the development version from here.
    2. Expand the archive.
    3. Replace query.class.php with the one in the development version archive.
    4. That’s all.

    Thank you and good luck.

    Thread Starter steadybright

    (@steadybright)

    Hi kjmtsh,

    I’ve only had a couple minutes to look at the results after employing your fix. You appear to have resolved most (if not all) functionality issues with WP SlimStat! When I return from work, I can provide additional details, if you’d like.

    Thank you again for working on this fix. I am grateful for all the time you’ve invested in working through this compatibility issue with WP SlimStat!

    Sincerely,

    steady

    You guys are great. We are going to update our code as well, so that the update is only triggered when really necessary. Version 3.6.1 will include this fix. We’re glad this team effort worked out well!

    Plugin Author kjmtsh

    (@kjmtsh)

    Hi, steadybright and camu,

    @steadybright
    Thank you for the report. I’m not sure if my fix is enough or not, because I only tested on the local server. If you’ve got the problem, let me know, please.

    @camu
    Thank you for including my request. I’m looking forward to it.

    Yours,

    We added these changes to version 3.6.1. Please test it once it’s out (hopefully next Monday) and let us know if that works for you.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Incompatible with SlimStat Plguin’ is closed to new replies.