• Resolved milan_chotai

    (@milan_chotai)


    Hi,

    I’m trying this plugin on my local environment and also staging (where there are more images) but can never get it to work.

    .htaccess:

    # 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)$ /hgv_data/sites/hhvm/wp-content/plugins/adaptive-images/adaptive-images-script.php [L]

    </IfModule>

    # END Adaptive Images

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    I had to create folder manually at /wp-content/cache/adaptive-images

    Hit my website many times but no images being made.

    https://ww.wp.xz.cn/plugins/adaptive-images/

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

    (@nevma)

    Hello, there, my friend, thank you for testing out our plugin!

    I see something a little weird in your htacess file. It is this line:

    RewriteRule \.(?:jpe?g|gif|png)$ /hgv_data/sites/hhvm/wp-content/plugins/adaptive-images/adaptive-images-script.php [L]

    Is perhaps your /wp-content folder outside your WordPress installation? Because, unfortunately this is an edge case that we do not support yet! However, could you send me 1) the output of the Print debug button in the plugin settings page 2) the output of the Print diagnostics button in the settings page and 3) the url of your website to check it for myself, if it is not too much trouble?

    PS: If the hhvm part in the path means that you are using HHVM, then this is also a case where the plugin has not been tested against yet. 🙁

    Thread Starter milan_chotai

    (@milan_chotai)

    Hi,

    No it is within the WordPress installation – my root is /hhvm/ – although the name is /hhvm/ the stack is normal PHP.

    ✔ PHP GD library is installed.
    ✔ Image cache directory has been created.
    /hgv_data/sites/hhvm/wp-content/cache/adaptive-images => drwxr-xr-x
    ✔ Installation .htaccess file is setup OK.
    /hgv_data/sites/hhvm/.htaccess => -rw-r–r–
    ❖ Adaptive images settings dump:
    array (size=12)
    ‘resolutions’ =>
    array (size=3)
    0 => int 1024
    1 => int 640
    2 => int 480
    ‘landscape’ => boolean true
    ‘cache-directory’ => string ‘cache/adaptive-images’ (length=21)
    ‘watched-directories’ =>
    array (size=2)
    0 => string ‘wp-content/uploads’ (length=18)
    1 => string ‘wp-content/themes’ (length=17)
    ‘jpeg-quality’ => int 65
    ‘sharpen-images’ => boolean true
    ‘watch-cache’ => boolean true
    ‘browser-cache’ => float 180
    ‘hidpi’ => boolean false
    ‘cdn-support’ => boolean false
    ‘version’ => string ‘0.6.0’ (length=5)
    ‘sanitized’ => boolean true

    Web Server
    nginx/1.8.0
    PHP
    5.5.9-1ubuntu4.11
    PHP Time Limit
    60
    PHP Memory Limit
    256M
    PHP Post Max Size
    8M
    PHP Upload Max Size
    2M
    PHP Max Input Vars
    1000
    PHP Display Errors
    0
    PHP Error Log
    MySQL
    5.6.25-73.1
    MySQL Ext/mysqli
    Yes
    MySQL Table Prefix
    wp_
    MySQL DB Charset
    utf8
    WordPress
    4.2.3
    WP Multisite
    Yes
    WP Debug Mode
    Yes
    WP Site url
    http://php.hgv.dev
    WP WP Home url
    http://php.hgv.dev/en
    WP Permalinks
    /%category%/%postname%/
    WP content dir
    /hgv_data/sites/hhvm/wp-content
    WP content url
    http://php.hgv.dev/wp-content
    WP plugin dir
    /hgv_data/sites/hhvm/wp-content/plugins
    WP plugin url
    http://php.hgv.dev/wp-content/plugins
    WP Locale
    en_US
    WP Memory Limit
    64M
    WP Max Upload Size
    2mb

    Plugin Author Takis Bouyouris

    (@nevma)

    Hey, there is a scenario we haven’t come across so far! I like that! 🙂

    Well, the http://php.hgv.dev seems to be resolving to localhost 127.0.53.53, so I cannot debug it this way, unfortunately! How is this actually? Are you using some Vagrant powered testing environment?

    I am getting the feeling that, if the Vagrant assumption I am making is actually true, then there is something weird in the way the directories are handled in your Vagrant testing environment. The line:

    RewriteRule \.(?:jpe?g|gif|png)$ /hgv_data/sites/hhvm/wp-content/plugins/adaptive-images/adaptive-images-script.php [L]

    Should be more like:

    RewriteRule \.(?:jpe?g|gif|png)$ /hhvm/wp-content/plugins/adaptive-images/adaptive-images-script.php [L]

    Or like:

    RewriteRule \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php [L]

    Could you try manually changing this line to one of the above and see if the plugin works? Then we should figure out what is the matter with the way Vagrant handles the WordPress testing environment.

    Thread Starter milan_chotai

    (@milan_chotai)

    Yes – I am using Vagrant – you may be onto something because of Vagrant’s use of synced folders:

    http://docs.vagrantup.com/v2/synced-folders/index.html

    I will do that!

    Thread Starter milan_chotai

    (@milan_chotai)

    No luck. I tried both variations of .htaccess and hit my website a few times / clicked around but still not seeing any images appear. Does it just happen automatically?

    Plugin Author Takis Bouyouris

    (@nevma)

    Hmm, I see what Vagrant synced files are! It makes some sort of sense that the problem is there although I cannot figure out what exactly causes it. If you tried both variations and you still see no images appearing, then I guess I have no other option than to try and install Vagrant myself and make some tests there. But this will take some time!

    Meanwhile, I believe that the plugin will work for you in a real environment, if you wish to test it!

    I will keep you posted on any updates that I have. Thank you for pointing out this case! 🙂

    Thread Starter milan_chotai

    (@milan_chotai)

    Thanks – sorry to put you through so much trouble – you can try this one if it helps – it is what I am using:

    https://github.com/wpengine/hgv

    Also – I did install it on our real server in staging (we’re on WP Engine) but I couldn’t get it to work there either unfortunately.

    Plugin Author Takis Bouyouris

    (@nevma)

    No trouble at all!

    I am so much keen to find any weird cases. Do you think you could help me debug with your real servers? Do you get any messages? What do the debug buttons print out? What are the contents of the htaccess file? Can I see one of these websites with the plugin enabled?

    Many questions, I know, sorry! 🙂

    Thread Starter milan_chotai

    (@milan_chotai)

    I will have to circle back to get this information. Our real servers for security reasons would be difficult to share information about which is why I am trying it in a virtual environment that is similar.

    Plugin Author Takis Bouyouris

    (@nevma)

    So, sorry about that! If you could give me something, so I could check it out, then I definitely will. I really hope I can sort this out! 🙂

    Plugin Author Takis Bouyouris

    (@nevma)

    Hello, again,

    I’ll be closing this ticket for now, however, should you encounter any problems in the future, do open a new ticket or simply this one!

    I have made a note to make special tests in a Vagrant environment as soon as possible.

    Cheers,
    Takis

    Thread Starter milan_chotai

    (@milan_chotai)

    Hi Nevma,

    Apologies – got tied up – I will reply with more information.

    Plugin Author Takis Bouyouris

    (@nevma)

    No worries, I’ll be here! 🙂

    Cheers,
    Takis

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Images Never Generate in Cache’ is closed to new replies.