• Resolved foxse

    (@foxse)


    Hello, Takis Bouyouris!

    I have 2 days trying to configure the plugin in WordPress 4.6.1 or 4.4.5 on XAMPP, but i couldn’t.
    I created folder d:\xampp\htdocs\wp445\wp-content\cache\adaptive-images\ (uncheck read-only from Windows)
    Cache directory is empty.

    How to specify the path in .htaccess ?
    Is it necessary to insert script in header.php or anymore?

    mod_rewrite is working.

    Plugin’s .htaccess
    <IfModule mod_rewrite.c>
    RewriteEngine On
    # Watched directories
    RewriteCond %{REQUEST_URI} /wp445/wp-content/uploads [OR]
    RewriteCond %{REQUEST_URI} /wp445/wp-content/themes

    # Redirect images through the adaptive images script
    RewriteRule \.(?:jpe?g|gif|png)$ /wp445/D:\xampp\htdocs\wp445\wp-content\plugins\adaptive-images/adaptive-images-script.php [L]

    </IfModule>

    My corrected .htaccess
    <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

    Web Server Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.23
    Document Root D:/xampp/htdocs
    PHP 5.6.23
    PHP Time Limit 0
    PHP Memory Limit 256M
    PHP Post Max Size 32M
    PHP Upload Max Size 32M
    PHP Max Input Vars 1000
    PHP Display Errors Yes
    PHP Error Log D:\xampp\php\logs\php_error_log
    MySQL 5.5.5-10.1.13-MariaDB
    MySQL Ext/mysqli Yes
    MySQL Table Prefix wp_
    MySQL DB Charset utf8
    WP 4.4.5
    WP Multisite No
    WP Debug Mode No
    WP Site url https://localhost/wp445
    WP WP Home url https://localhost/wp445
    WP Permalinks /%postname%/
    WP home path D:/xampp/htdocs/wp445/
    WP content dir D:\xampp\htdocs\wp445/wp-content
    WP plugin dir D:\xampp\htdocs\wp445/wp-content/plugins
    WP content url https://localhost/wp445/wp-content
    WP plugin url https://localhost/wp445/wp-content/plugins
    WP Locale ru_RU
    WP Memory Limit 40M
    WP Max Upload Size 32mb
    WP Active plugins Adaptive Images for WordPress v.0.6.60 by Nevma; All-in-One WP Migration v.5.52 by ServMask; Duplicate Post v.2.6 by Enrico Battocchi
    WP MU plugins

    Debug info
    ? PHP GD library is installed.
    ? Image cache directory has been created. D:\xampp\htdocs\wp445/wp-content/cache/adaptive-images => drwxrwxrwx
    ? Installation .htaccess file is setup OK. D:/xampp/htdocs/wp445/.htaccess => -rw-rw-rw-
    ? Adaptive images settings dump:
    array(12) {
    [“resolutions”]=>
    array(3) {
    [0]=>
    int(1024)
    [1]=>
    int(640)
    [2]=>
    int(480)
    }
    [“landscape”]=>
    bool(true)
    [“hidpi”]=>
    bool(true)
    [“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(0.25)
    [“cdn-support”]=>
    bool(false)
    [“version”]=>
    string(6) “0.6.60”
    [“sanitized”]=>
    bool(true)
    }

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

    (@nevma)

    Hello, my friend,

    Hmmm, I am not sure how I can reproduce and debug your case in localhost, but I will give it a try.

    First I would need to test if the path in htaccess RewriteRule \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php [L] is OK. In order to do this one could change some line of code in adaptive-images/adaptive-images-script.php and then directly access at least one image and see if an error occurs. This way you can at least be sure that the plugin is actually working at all.

    Then you must make sure that you are accessing your website from a mobile device or with the responsive design mode in the web developer tools of your browser. This is because the images have to be accessed by a small screen device in order for the cache to generate resized images.

    Let me know how this works for you!

    Cheers,
    Takis

    Thread Starter foxse

    (@foxse)

    Hi, Takis

    My thanks to you for your quick response.
    The plugin works on local server too.
    ———————————–

    For the local server (XAMPP):
    1. I created folders [cache], [adaptive-images] d:\xampp\htdocs\v44-2\wp-content\cache\adaptive-images\ (uncheck read-only and all other prohibitions from Total Commander, not Windows)

    2. .htaccess (manual edit)

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} /v44-2/wp-content/uploads [OR]
    RewriteCond %{REQUEST_URI} /v44-2/wp-content/themes
    # Generated with plugin RewriteRule \.(?:jpe?g|gif|png)$ /v44-2/D:\xampp\htdocs\v44-2\wp-content\plugins\adaptive-images/adaptive-images-script.php [L]

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

    3. Other settings as usual
    ————————————————

    For public server:
    1. I created folders [cache], [adaptive-images] /var/www/user/data/www/site.com/wp-content/cache/adaptive-images (permission 0666 for [cache] and childs, X – for folder)

    2. .htaccess

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} /wp-content/uploads [OR]
    RewriteCond %{REQUEST_URI} /wp-content/themes
    RewriteRule \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php [L]
    </IfModule>
    —————————-

    Thank you very much for your job, it is very useful plugin!

    Plugin Author Takis Bouyouris

    (@nevma)

    Great news, I am glad you could make it work!

    I’ll be glad to help in the future.

    Cheers,
    Takis

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I can’t install the plug-in’ is closed to new replies.