• Resolved eugene212

    (@eugene212)


    Hi,

    The plugin seems to be nice and ticking all the boxes – it is working on a few my sites/servers, but unfortunately fails to activate on one specific case, i.e. the plugin produces .htaccess lines recommendation even if the required lines are successfully added to the .htaccess file (and plugin does not activate).

    This issue seemed to be raised a few times at the forum, so looking at the code I found that in my case it happens at the Line 71 of configs.php with $filesize check – in my ‘failed activation’ case the value is 435…

    Is test value of 100 deliberate or arbitrary ? If the latter, maybe consider increasing it to avoid ‘mysterious’ cases when the plugin cannot activate ?

    if( $code == 200 ){
    	if( $filesize > 100 ){
    		deactivate_plugins( __DIR__ );
    • This topic was modified 1 year, 6 months ago by eugene212.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author kubiq

    (@kubiq)

    Hi,

    if you have all needed lines in the htaccess, but it’s still throwing this error, then your server probably doesn’t support WebP.

    File size check is correct how it is. It means that it can not load testing WebP file which is smaller than 100kb and it received original bigger file instead.

    Simply said, it’s not a problem in the plugin but in your server configuration or some restrictions or missing dependencies or libraries.

    I can imagine some more advanced and sophisticated tests to reveal the issue properly, but as this is just a very simple free plugin, there is no intention currently to spend more time on this part of the plugin.

    So I recommend you to ask some developer to help you debug issue or misconfiguration in your setup.

    Thread Starter eugene212

    (@eugene212)

    I see…

    Since the reason of failed activation is actually twofold, please consider reflecting it in the message, otherwise users can be mislead and look to wrong direction – it should also save your time by reducing forum requests.

    Plugin Author kubiq

    (@kubiq)

    Of course, if you will let me know then, what was the problem, then I can maybe implement some condition to check this, so it will not happen to anyone else.

    thanks

    Thread Starter eugene212

    (@eugene212)

    Sure will do if I can get it cleared from my hosting provider – so far it seems that they have a proxy server before Apache which bypasses htaccess for static standard image files, I have informed them about the issue.

    Meanwhile, what I actually suggested was not any code development to catch edge cases, rather to consider making a simple change of the error message text to make it clearer for users, e.g. “Activation not finished – webp substitution test failed, please check .htaccess file has following lines… … alternatively your server may be not properly configured… etc.”, something along these lines.

    Thanks !

    Thread Starter eugene212

    (@eugene212)

    I have found the issue reason with my hosting provider, so in case if it might help someone else with the same specific issue:
    1. Hosting is using NGINX in front of Apache.
    2. Static files (like images) were served directly by NGINX, so Apache .htaccess was not called in this case, i.e. plugin file substitution lines were not engaged.
    3. Solution is to disable NGINX direct processing of static files, so Apache .htaccess is engaged – in my case the hosting provider advised that they can modify NGINX settings (global change) or I can change specific files (or directories) rights to 640 (or 750).

    Plugin Author kubiq

    (@kubiq)

    Thank you very much!

    Version 4.4 released

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cannot activate – too restrictive $filesize check ?’ is closed to new replies.