• Dear Community,

    i have a problem. I use the adaptive images script and i really love it!
    But there is something strange…

    Always when i save the settings of my plugin (yes sometimes i do this ??
    The path to the adaptive-images-script.php is wrong and i get a blog with missing images…

    This is what i geht in my htaccess file:

    # BEGIN Adaptive Images
    #=======================

    <IfModule mod_rewrite.c>

    RewriteEngine On

    # Watched directories
    RewriteCond %{REQUEST_URI} /wp/wp-content/uploads [OR]
    RewriteCond %{REQUEST_URI} /wp/wp-content/themes

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

    </IfModule>

    # END Adaptive Images

    you see this line?

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

    /wp/wp/ is wrong… it should be:

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

    I have no idea why this happens?

    My htaccess file is placed in the same directory as the index.php.
    all my wordpress files are located in a separate directory called “wp”.

    Does anybody know why this happens?

    I thank you so much!

    Melanie

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

    (@nevma)

    Hi, Melanie,

    So sorry for not having replied all these days, but it seems that the email notification was not received on this one!

    I see your problem right there. The path to the Adaptive Images scipt is obviously wrong, just as you explained. Now it seems that you have installed your WordPress in a subfolder of the root domain, right? Or do you have some other kind of -perhaps unusual- setup when you say that:

    My htaccess file is placed in the same directory as the index.php. All my wordpress files are located in a separate directory called “wp”.

    In the meantime, I will run some checks and try and recreate your case.

    Cheers,
    Takis

    Thread Starter milenoi2016

    (@milenoi2016)

    Dear Takis,

    thank you very much for your kind answer.
    Yes you are absolutely right: i installed my wp stuff in an subfolder called “wp”.
    We fixed the “bug” by changing this line:

    adaptive-images-actions.php

    //GFB Change
    //$adaptive_images_php_script = $request_uri_base. ‘/’ . $adaptive_images_dir_path_relative . ‘/adaptive-images-script.php’;

    $adaptive_images_php_script = ‘/’ . $adaptive_images_dir_path_relative . ‘/adaptive-images-script.php’;

    When removing the $request_uri_base. the plugin works correct. But it would be perfect when you could fix this or find an solution?

    thank you very much!!!!

    Melanie

    Plugin Author Takis Bouyouris

    (@nevma)

    Hello, again, Melanie.

    I tried to reproduce the issue in a WordPress installation inside a subdirectory, but the problem did not appear.

    Is there anything “unusual” you could report about your installation? Are all the directories where they are supposed to by default? Have you perhaps changed something for security purposes?

    Also, could you send me the results of the Print debug and Print diagnostics buttons in the plugin settings page?

    Cheers,
    Takis

    Thread Starter milenoi2016

    (@milenoi2016)

    Dear Takis,

    thank you for your support!

    There is nothing unusual with my wp-installation i think ?? i did not use a security plugin or similar tools..

    my index.php + .htaccess are located unter my “root” directory. All the other files are located under my “wp”-directory.

    I can reproduce the “bug” on my local installation, too.

    i send you my debug info:

    Debug info
    ? PHP GD library is installed.
    ? Image cache directory has been created.
    /home/www/name-of-my-website/wp/wp-content/cache/adaptive-images => drwxr-xr-x
    ? Installation .htaccess file is setup OK.
    /home/www/name-of-my-website/.htaccess => -rw-r–r–
    ? Adaptive images settings dump:
    array(12) {
    [“resolutions”]=>
    array(5) {
    [0]=>
    int(2400)
    [1]=>
    int(1600)
    [2]=>
    int(1024)
    [3]=>
    int(640)
    [4]=>
    int(580)
    }
    [“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)
    [“watch-cache”]=>
    bool(true)
    [“browser-cache”]=>
    float(180)
    [“landscape”]=>
    bool(false)
    [“hidpi”]=>
    bool(false)
    [“cdn-support”]=>
    bool(false)
    [“sharpen-images”]=>
    bool(false)
    [“version”]=>
    string(6) “0.6.60”
    [“sanitized”]=>
    bool(true)
    }

    System information
    Web Server
    Apache
    Document Root
    /home/www/name-of-my-website
    PHP
    7.0.5
    PHP Time Limit
    30
    PHP Memory Limit
    256M
    PHP Post Max Size
    50M
    PHP Upload Max Size
    50M
    PHP Max Input Vars
    1000
    PHP Display Errors
    No
    PHP Error Log
    MySQL
    5.6.32-1~dotdeb+7.1
    MySQL Ext/mysqli
    Yes
    MySQL Table Prefix
    wp_
    MySQL DB Charset
    utf8mb4
    WP
    4.5.4
    WP Multisite
    No
    WP Debug Mode
    No
    WP Site url
    https://name-of-my-website.mainsite.com/wp
    WP WP Home url
    https://name-of-my-website.mainsite.com
    WP Permalinks
    /%category%/%postname%/
    WP home path
    /home/www/name-of-my-website/
    WP content dir
    /home/www/name-of-my-website/wp/wp-content
    WP plugin dir
    /home/www/name-of-my-website/wp/wp-content/plugins
    WP content url
    https://name-of-my-website.mainsite.com/wp/wp-content
    WP plugin url
    https://name-of-my-website.mainsite.com/wp/wp-content/plugins
    WP Locale
    de_DE
    WP Memory Limit
    256M
    WP Max Upload Size
    50mb
    WP Active plugins
    24liveblog v.1.1 by 24liveblog
    Adaptive Images for WordPress v.0.6.60 by Nevma
    Adminimize v.1.10.6 by Frank Bültge
    Advanced Custom Fields PRO v.5.4.1 by Elliot Condon
    Advanced Custom Fields v.4.4.8 by Elliot Condon
    BackWPup v.3.3.3 by Inpsyde GmbH
    Better Search Replace v.1.2.10 by Delicious Brains
    Categories Images v.2.5.3 by Muhammad Said El Zahlan
    Contact Form 7 v.4.5 by Takayuki Miyoshi
    Cookie Notice v.1.2.35 by dFactory
    Custom Sidebars v.2.1.0.8 by WPMU DEV
    Artikel duplizieren v.2.6 by Enrico Battocchi
    Google Tag Manager for WordPress v.1.4 by Thomas Geiger
    Edit Author Slug v.1.2.1 by Brandon Allen
    Flow-Flow v.2.10.3 by Looks Awesome
    Gravity Forms Multilingual v.1.3.10 by OnTheGoSystems
    Salient Visual Composer v.4.11.2 by Michael M – WPBakery.com | Modified by ThemeNectar
    Liveblog v.1.5 by WordPress.com VIP, Automattic
    Loco Translate v.1.5.6 by Tim Whitlock
    Members – Role Levels v.1.0.0 by Justin Tadlock
    Members v.1.1.2 by Justin Tadlock
    Multiple Tags v.3.1 by vinoth06
    P3 (Plugin Performance Profiler) v.1.5.3.9 by GoDaddy.com
    PHP Code For Posts v.2.1.2 by Jamie Fraser
    Playbuzz v.0.9.3 by Playbuzz
    Post-Duplizierer v.2.17 by Metaphor Creations
    Post-Plugin Library v.2.6.2.1 by Rob Marsh, SJ
    Post Types Order v.1.8.9.2 by Nsp Code
    Reveal IDs v.1.4.6.2 by Oliver Schl?be
    Simple Page Ordering v.2.2.4 by Jake Goldman, 10up
    WPML Multilingual CMS v.3.4.1 by OnTheGoSystems
    Social Share Buttons by Supsystic v.1.6.8 by supsystic.com
    Superfly Menu v.4.0.8 by Looks Awesome
    Category Order and Taxonomy Terms Order v.1.4.8 by Nsp-Code
    Templatera v.1.1.11 by WPBakery
    Widget Logic v.0.57 by Alan Trewartha
    Yoast SEO v.3.4.2 by Team Yoast
    WP Category Permalink v.3.0.4 by Jordy Meow
    WP Google Maps – Gold Add-on v.3.33 by WP Google Maps
    WP Google Maps – Pro Add-on v.5.73 by WP Google Maps
    WP Google Maps – Visitor Generated Markers v.2.7 by WP Google Maps
    WP Google Maps v.6.3.14 by WP Google Maps
    WP-Mail-SMTP v.0.9.5 by Callum Macdonald
    WP Media Category Management v.1.8.3 by DeBAAT
    WP-Memory-Usage v.1.2.2 by Alex Rabe
    WP-Optimize v.1.9.1 by Ruhani Rabin
    WP Smush v.2.4.3 by WPMU DEV
    WP User Avatar v.2.0.7 by flippercode
    WPML CMS Nav v.1.4.19 by OnTheGoSystems
    WPML Media v.2.1.22 by OnTheGoSystems
    WPML String Translation v.2.3.9 by OnTheGoSystems
    WPML Translation Management v.2.2.1 by OnTheGoSystems
    WP MU plugins
    v. by

    Our Blog is online and it is a subdomain. I changed the names to stay anonymous;)
    https://name-of-my-website.mainsite.com

    As i told you before we changed this line:

    //Your Code:
    $adaptive_images_php_script = $request_uri_base. ‘/’ . $adaptive_images_dir_path_relative . ‘/adaptive-images-script.php’;

    //Our Code:
    $adaptive_images_php_script = ‘/’ . $adaptive_images_dir_path_relative . ‘/adaptive-images-script.php’;

    I hope this helps you to reproduce my Error?

    in my htaccess i got the following code which breaks the adaptive images script:

    # BEGIN Adaptive Images
    #=======================

    <IfModule mod_rewrite.c>

    RewriteEngine On

    # Watched directories
    RewriteCond %{REQUEST_URI} /wp/wp-content/uploads [OR]
    RewriteCond %{REQUEST_URI} /wp/wp-content/themes

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

    </IfModule>

    # END Adaptive Images

    /wp/wp/ is the problem ??

    Thank you!!!

    Plugin Author Takis Bouyouris

    (@nevma)

    Hey, Melanie,

    I think I have possibly spotted the “unusual” case. You said that your blog is installed in a subdirectory, which is wp, yet your url does not have this subdirectory in it, right? Is your blog url like https://name-of-my-website.mainsite.com/ or like https://name-of-my-website.mainsite.com/wp/? Because if it is the first case, then we have to figure out how you have come to this setup, but if it is the second case, then I have to figure out how come this error only happens with your setup and not mine!

    Cheers,
    Takis

    Thread Starter milenoi2016

    (@milenoi2016)

    Dear Takis,

    yes you are absolutely right.
    My wordpress-url is https://name-of-my-website.mainsite.com/wp
    My website-url is https://name-of-my-website.mainsite.com/

    I always install my wp core files and all the stuff in a subdirectory, because this makes development easy. When my website is ready for launch i only have to change the website-url in my settings and move the index.php + .htaccess in my root directory…

    hopefully this will help you to fix it,

    greetings from munich, melanie ??

    Plugin Author Takis Bouyouris

    (@nevma)

    Hello, Melanie,

    So, this is a setup I have not yet come across in the past indeed!

    What you are saying is that you end up with all υοθρ WordPress files in the /wp directory, but you have moved your index.php and your htaccess file in the root directory?

    Sorry for the surprise here, but how does this even work in the first place? Do you do some url rewrites in your htaccess file? Does it work as it is?

    If things are really as you describe them and your WordPress installation is still working alright, then there probably isn’t much a plugin could do to detect in which folder the actual WordPress files are located. And our plugin really needs that in order to function properly.

    Still trying to figure this one out! ??

    Cheers from Athens,
    Takis

    Thread Starter milenoi2016

    (@milenoi2016)

    Hi Takis,

    have a look here:

    https://codex.www.ads-software.com/Giving_WordPress_Its_Own_Directory

    This is exactly what i do…

    you have of course to change this line in your index.php…

    require( dirname( __FILE__ ) . ‘/wordpress/wp-blog-header.php’ );

    Greetings, Melanie

    Plugin Author Takis Bouyouris

    (@nevma)

    Hey, Melanie,

    Thanks for pointing this out! I will create a test environment with this setup to check things out and I will get back to you as soon as possible!

    Cheers,
    Takis

    Thread Starter milenoi2016

    (@milenoi2016)

    Dear Takis,

    just wanted so say hello.. ?? Did you get new informations about our common issue? ??

    Greetings, Melanie

    Plugin Author Takis Bouyouris

    (@nevma)

    Hello, Melanie,

    Really sorry, but I don’t have any updates yet. I promise to do the best I can. In the meantime it would be relieving to know that your installation is functioning OK, at least with the manual tweaks you have made to the htaccess file!

    Cheers,
    Takis

    Plugin Author Takis Bouyouris

    (@nevma)

    Hello, @milenoi2016,

    Just wanted to let you know that the same issue has come up with another user as well in this thread and that your observation has helped fix the problem there temporarily as well.

    I must apologise for not having incorporated the fix to the plugin yet, I know it is not a huge update, but it is in the middle of some other major updates that I have been working on. Thank you for you patience!

    Cheers,
    Takis

    Thread Starter milenoi2016

    (@milenoi2016)

    Dear Takis,

    no worries, i am glad that our quickfix did help other community members ??
    Wish you a good time and i am looking forward to the new version!

    Merry X-Mas ??
    Melanie

    Plugin Author Takis Bouyouris

    (@nevma)

    And a very merry Christmas to you too!

    Cheers,
    Takis

    Plugin Author Takis Bouyouris

    (@nevma)

    Hello, @milenoi2016,

    If you are still following this thread, then I am happy to inform you that the fix we have talked about has been integrated in our latest minor version update 0.6.62. Once more, thank you for the cooperation and, please, do let us know if you test it and have any comments.

    Cheers,
    Takis

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘htaccess – Path to adaptive-images-script.php is always wrong’ is closed to new replies.