• Hi

    I download, activated and configured the plugin. After that all my images are broken. When i deactivate the plugin everything gets back to normal.

    I dont use wordpress on a subfolder like many did, my wordpress instalation its on root folder of the website.

    Here its my .htaccess config

    
    # BEGIN Adaptive Images
    #=======================
    
    <IfModule mod_rewrite.c>
    
        RewriteEngine On
    
        # Watched directories
        RewriteCond %{REQUEST_URI} /wp-content/uploads [OR]
        RewriteCond %{REQUEST_URI} /wp-content/themes
    
        # Redirect images through the adaptive images script
        RewriteRule \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php [L]
    
    </IfModule>
    
    # END Adaptive Images
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Now my debug info

    ? PHP GD library is installed.
    ? Image cache directory has been created.
    /var/www/br.vnext.store/public_html/wp-content/cache/adaptive-images => drwxr-xr-x
    ? Installation .htaccess file is setup OK.
    /var/www/br.vnext.store/public_html/.htaccess => -rw-r–r–
    ? Adaptive images settings dump:
    array(14) {
    [“resolutions”]=>
    array(3) {
    [0]=>
    int(1024)
    [1]=>
    int(640)
    [2]=>
    int(480)
    }
    [“cache-directory”]=>
    string(21) “cache/adaptive-images”
    [“watched-directories”]=>
    array(2) {
    [0]=>
    string(18) “wp-content/uploads”
    [1]=>
    string(17) “wp-content/themes”
    }
    [“jpeg-quality”]=>
    int(75)
    [“sharpen-images”]=>
    bool(true)
    [“watch-cache”]=>
    bool(true)
    [“browser-cache”]=>
    float(180)
    [“landscape”]=>
    bool(false)
    [“hidpi”]=>
    bool(false)
    [“cdn-support”]=>
    bool(false)
    [“version”]=>
    string(6) “0.6.62”
    [“sanitized”]=>
    bool(true)
    [“wp-content-dir”]=>
    string(46) “/var/www/br.vnext.store/public_html/wp-content”
    [“wp-content-url”]=>
    string(32) “https://br.vnext.store/wp-content&#8221;
    }

    Can you please help me?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Takis Bouyouris

    (@nevma)

    Hello, my friend,

    Sorry for my late reply and thank you for the comprehensive information that you have provided.

    Your settings do seem to be in order. I cannot find anything out of the ordinary in them so far, so I’ll try to ask some preliminary questions first.

    1. Can you confirm that you are not using a CDN or some other caching server?

    2. Are there any entries in your error log that might be relevant to our plugin.

    3. I see that you are using HTTPS in your website, however are your website urls set as HTTPS in your Settings > General area?

    Let’s hope we can get to the bottom of this!

    Cheers,
    Takis

    I was about post a new topic with the same error. However, I figured mine out while gathering information, so I thought I would share a possible solution for everyone with this problem.

    My Apache logs showed the error “Undefined variable: _SERVER” in adaptive-images-script.php. I checked out the script, and via that tracked down that my setup had no server name defined and had UseCanonicalName set to off.

    My fix was to set either or both of these in my Apache2 virtual server directives:

    UseCanonicalName On
    ServerName my.servername.com

    Plugin Author Takis Bouyouris

    (@nevma)

    Hello, @benntech,

    Thank you for sharing your solution with us!

    Cheers,
    Takis

    Update: this broke on me again with same error, but my above fix no longer works. Had to disable it for a few days while I researched and found a new solution. Edit Apache’s php.ini and set

    auto_globals_jit = Off

    Hopefully Adaptive Images will be more stable once I move it to a permanent host. Hate to lose its functionality.

    Plugin Author Takis Bouyouris

    (@nevma)

    Hello, my friend,

    Unfortunately our plugin relies on knowing the server name so that it can translate image requests to actual image paths in the server. Ans this is actually a very common Apache setup. I am not totally convinced that turning auto_globals_jit = Off is what did the trick for you. I mean if the server name variable was available it should not make a difference where it was created in the beginning of the request or “just in time” it was used. Are you sure that there is no other combination of settings that might have affected this?

    Cheers,
    Takis

    Definitely fixes it for me. auto_globals_jit = on, no images. auto_globals_jit = off with no other changes, images work. Here’s some references:
    https://odd.blog/2015/02/12/php-notice-undefined-variable-_server-in/
    https://stackoverflow.com/questions/5235775/error-using-server-in-a-variable-variable-php

    Not sure why it’s an issue on my server–I have canonical names on, server name defined, etc.. However, I’m not too concerned because this is only a temporary virtual appliance. If this issue was more prevalent among your users, it might be worth additional troubleshooting. As it is, this appliance will get deleted once the site is moved to a permanent host.

    Plugin Author Takis Bouyouris

    (@nevma)

    I will definitely keep an eye on this and, if it pops up more frequently, I will eventually have to tackle it in a more general way!

    Cheers,
    Takis

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘All Images Broken After Plugin Activation’ is closed to new replies.