• Resolved hupe13

    (@hupe13)


    I have a multisite installation. The plugin is not usable. There are many php errors like:

    Undefined array key "SERVER_ADDR"
    
        wp-content/plugins/stopbadbots/functions/functions.php:3163
        stopbadbots_isourserver()
        wp-content/plugins/stopbadbots/stopbadbots.php:255

    Wouldn’t it be better if you use appropriate WordPress functions?
    I’m using php 8. I get a warning about this in php 7.4 also. On bot I get the following error:

    DESCRIBE IF;	
        sbb_create_db()
    	Plugin: stopbadbots 	You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF' at line 1 	
    Error Code 1064
    • This topic was modified 2 years, 5 months ago by hupe13.
Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Bill Minozzi

    (@sminozzi)

    Hi,

    Your hosting not define the PHP variable $_SERVER[‘SERVER_ADDR’]
    I just uploaded the version 7.19 to try to use other way but if your hosting doesn’t respect the standard, you can wait for more problems in future also with other plugins.

    WordPress was built in PHP and we need to use PHP yo create any plugin or theme.

    About the second issue, I need more information, as for example, the file and line number, but looks like your file is damaged (because talk in error at line 1). Probably it will be fixed when you do the upgrade.

    Cheers,
    Bill

    Thread Starter hupe13

    (@hupe13)

    Your hosting not define the PHP variable $_SERVER[‘SERVER_ADDR’]
    … but if your hosting doesn’t respect the standard,

    You are right, $_SERVER[‘SERVER_ADDR’] is not provided. But I can’t change this and this problem have all other users using this hosting.
    But this is okay, see e.g. this comment. The manual refers to CGI/1.1 specification. There SERVER_ADDR is not mentioned.

    About the second issue

    Query Monitor shows this error. I see no more error messages. But I think, this is a subsequent error.

    Site Health is okay when your plugin is inactive. If it is active Site Health mentions
    a REST API error.

    Plugin Author Bill Minozzi

    (@sminozzi)

    Hi,

    Thanks.

    Regards the hosting issue, with the last version, I’m trying to get the info using other way and testing before to avoid errors and warnings.

    Please, go to plugin dashboard and copy the debug info.
    Then, paste in our support site:
    https://BillMinozzi.com/support/
    Please, copy and paste also the last 20 lines of the tab Server Errors.

    I will check that.
    Cheers,
    Bill

    Plugin Author Bill Minozzi

    (@sminozzi)

    Hi Again,

    Please, read my previous post.
    I checked in my server and I can’t see any Rest API errors on WordPress Site Health with our plugin activated.

    I also can’t see errors on this function: sbb_create_db(). This functions is called once on plugin activation just by create the databases. After that, if any database is missing our plugin will write an error at error log file. That is why I asked to you (above) to paste the errors on our support site.

    Cheers,
    Bill

    Thread Starter hupe13

    (@hupe13)

    Further debugging shows in Developer Console (Firefox):

    Uncaught RangeError: too many arguments provided for a function call
        jQuery 7
        <anonymous> https://mydomain.de/e/1/wp-content/plugins/stopbadbots/includes/more/more2.js?ver=6.0:6
        jQuery 13
    jquery.js:2890:12

    Chrome shows:

    jquery.js?ver=3.6.0:2890 Uncaught RangeError: Maximum call stack size exceeded
        at Sizzle.select (jquery.js?ver=3.6.0:2890:12)
        at Function.Sizzle (jquery.js?ver=3.6.0:898:9)
        at jQuery.find (jquery-migrate.js?ver=3.3.2:192:17)
        at jQuery.fn.init.find (jquery.js?ver=3.6.0:3099:11)
        at jQuery.fn.init (jquery.js?ver=3.6.0:3209:32)
        at new jQuery.fn.init (jquery-migrate.js?ver=3.3.2:158:17)
        at jQuery (jquery.js?ver=3.6.0:161:10)
        at HTMLDocument.<anonymous> (more2.js?ver=6.0:6:3)
        at mightThrow (jquery.js?ver=3.6.0:3766:29)
        at process (jquery.js?ver=3.6.0:3834:12)

    The debug log shows many lines like:

    Date: [23-Jun-2022 06:45:27 UTC]
     array (
    
    )

    This is my testing environment, not public. I will test it on a local install today or tomorrow to see, if it works there.

    Is it necessary to query the databases with every call? That must be actually only to configure the settings of the plugin. When a page is called up in the frontend, it is only necessary to check whether the bot or the ip is available in the database.
    Query monitor shows 7044 (!) duplicate queries always.

    The idea of the plugin is good, but for me it is too powerful for my small site.

    Thread Starter hupe13

    (@hupe13)

    Ok, I tested the plugin with Laragon, its default setup, WordPress 6, Multisite, php 7.4.
    Query Monitor shows the same jQuery errors, deactivating this plugin, the error disappeared. The only plugins I used are this and yours.
    Health Check still reports a REST API error and it takes a long time to get a page in frontend and backend.

    Plugin Author Bill Minozzi

    (@sminozzi)

    Hi,

    We have more than one table, as for example user agent, IP and referer, fingerPrint, visitors etc… Call this database tables usually spend only milliseconds on a standard server.
    I just double check and I can’t see those messages in my computer.

    Please, go to plugin dashboard and copy the debug info.
    Dashboard => Stop Bad Bots => Debug Info
    Then, paste in our support site:
    https://BillMinozzi.com/support/
    Please, copy and paste also the last 20 lines of the tab Server Errors.
    Dashboard => Stop Bad Bots => Server Errors

    We have a guest ticket you don’t need to register.

    Cheers,
    Bill

    Thread Starter hupe13

    (@hupe13)

    I’m already searching, but I can’t find anything special in the configuration, in my settings, etc.
    What kind of answer will be with
    https://my-domain.de/e/1/wp-admin/admin-ajax.php?action=stopbadbots_grava_fingerprint&fingerprint=%23Europe%2FBerlin%23-120%23macintel%23Mac%230%2Cfalse%2Cfalse%23Intel%20Inc.~Intel%xxxxxx
    expected? It is empty and takes time in the health check.

    Thread Starter hupe13

    (@hupe13)

    Did you receive my ticket or has it not been accepted? I have not received any mail.

    I know, your plugin is working on 10000 sites, but on some sites doesn’t, see your ratings.

    I tested the plugin with Health Check & Troubleshooting in troubleshooting mode. It could not be activated due to an error there. But what is wrong I can’t get out.

    Plugin Author Bill Minozzi

    (@sminozzi)

    Hi,
    Please, look also your spam folder.
    We sent a response same day (24/6).
    We gave many suggestions to upgrade your server software and check for database issues, for example.
    Please, go to our support page and read the ticket answer. Usually, our system send an email,check your spam folder.
    We resent both emails again with my email.
    Cheers,
    Bill

    Plugin Author Bill Minozzi

    (@sminozzi)

    Hi Hupe,

    I just uploaded the version 7.21 and I hope that can works fine on your hosting.

    Thanks for your help,

    I gave you some suggestions for soft updates on our support site.

    Cheers,

    Bill

    Thread Starter hupe13

    (@hupe13)

    Thank you very much. the Frontend seems to be okay. But in th Backend the REST API error remains:
    Error: cURL error 28: Operation timed out after 10004 milliseconds with 0 bytes received (http_request_failed)

    Query Monitor shows more:

    GET	https://my.test/1/wp-json/wp/v2/types/post?context=edit	
    cURL error 28: Operation timed out after 10004 milliseconds with 0 bytes received
    WP_Site_Health->get_test_rest_availability()
    wp-admin/includes/class-wp-site-health.php:2056
    WP_Site_Health->perform_test()
    wp-admin/includes/class-wp-site-health.php:192
    WP_Site_Health->enqueue_scripts()
    wp-admin/includes/class-wp-site-health.php:137
    do_action('admin_enqueue_scripts')
    wp-includes/plugin.php:476

    Chrome’s developer console shows:

    load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.0:2 Uncaught RangeError: Maximum call stack size exceeded
        at se.select (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.0:2:22967)
        at Function.se (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.0:2:7116)
        at s.find (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.0:5:2230)
        at S.fn.init.find (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.0:2:25047)
        at S.fn.init (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.0:2:25536)
        at new s.fn.init (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.0:5:1827)
        at S (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.0:2:1051)
        at HTMLDocument.<anonymous> (more2.js?ver=6.0:6:3)
        at e (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.0:2:30038)
        at t (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.0:2:30340)

    Firefox:

    Uncaught RangeError: too many arguments provided for a function call
        jQuery 7
        <anonymous> https://my.test/1/wp-content/plugins/stopbadbots/includes/more/more2.js?ver=6.0:6
        jQuery 13
    load-scripts.php:2:22967
        jQuery 7
        <anonym> https://my.test/1/wp-content/plugins/stopbadbots/includes/more/more2.js?ver=6.0:6
        jQuery 13

    I have too little knowledge of it to help further.

    Plugin Author Bill Minozzi

    (@sminozzi)

    Hi,

    That message WP_Site_Health->enqueue_scripts comes from another plugin, not ours.

    Also jquery-migrate is called from WordPress core, not from us.

    Your hosting blocks many PHP legitimate functions, as I told you on our support page. For example sys_getloadavg() and many others. This functions doesn’t offer risk to the server and looks like they just want hide the performance and the actual processor and other things from their customers.

    We made 2 changes to accommodate the plugin at your hosting company but we can’t fix that issues of fail to load jquery. jQuery is a very important javascript library and WordPress core needs that. We too.

    Then, I suggest you move to a standard hosting to keep your site running fast and healthy and save time.

    Anyway, thanks a lot for your useful suggestions.

    Cheers,

    Bill

    Thread Starter hupe13

    (@hupe13)

    Query Monitor is the only plugin I still have active. I have had very good experiences with it during the development of my plugin.
    Maybe the problem is the hoster. I have also tested it with laragon under windows, not all functions are available there either.

    Thank you very much for the idea of this plugin.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Errors on Activation’ is closed to new replies.