Script not working on main site
-
Hello,
I have a main and another staging web site for development. The script works fine on the staging web site as shown here.
Staging site page
Same page on the main site
Wordpress is installed in a subdirectory under wp2The staging site works fine, using the debugging option on an image gives us the correct debugging info.
The debuging info on the main site does not work, it just returns the image:
although, as far as i can say, the setup of the 2 sites (live vs staging) is exactly the same. Any ideas what is wrong on the main site?
Thank you in advance for your help.
The page I need help with: [log in to see the link]
-
Hello, my friend,
Thank you for reaching out!
Could you please send me the results of the Print debug and Print diagnostics buttons in the plugin settings page.
I suspect that in your production environment the htaccess bit of code that is necessary in order to internally redirect requests for images to the Adaptive Images script has not been set up correctly for some reason. But let’s take it one step at a time.
Cheers,
TakisHello,
Please see the requested codes form the live site:
Debug info
PHP GD library is installed. ? Image cache directory has been created. /home/corecons/public_html/wp2/wp-content/cache/adaptive-images => drwxr-xr-x ? Installation .htaccess file is setup OK. /home/corecons/public_html/.htaccess => -rw-r--r-- ? Adaptive images settings dump: array(14) { ["resolutions"]=> array(7) { [0]=> int(2880) [1]=> int(1600) [2]=> int(1440) [3]=> int(1024) [4]=> int(640) [5]=> int(480) [6]=> int(320) } ["cache-directory"]=> string(21) "cache/adaptive-images" ["watched-directories"]=> array(2) { [0]=> string(19) "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.65" ["sanitized"]=> bool(true) ["wp-content-dir"]=> string(41) "/home/corecons/public_html/wp2/wp-content" ["wp-content-url"]=> string(49) "https://www.coreconservation.co.uk/wp2/wp-content" }
Diagnostics
System information Web Server Apache/2.4.35 (cPanel) OpenSSL/1.0.2p mod_bwlimited/1.4 Phusion_Passenger/5.1.12 Document Root /home/corecons/public_html PHP 7.1.22 PHP Time Limit 0 PHP Memory Limit 512M PHP Post Max Size 64M PHP Upload Max Size 64M PHP Max Input Vars 10000 PHP Display Errors No PHP Error Log error_log MySQL 5.6.43 MySQL Ext/mysqli Yes MySQL Table Prefix wp2_ MySQL DB Charset utf8mb4 WP 4.9.10 WP Multisite No WP Debug Mode No WP Site url https://www.coreconservation.co.uk/wp2 WP WP Home url https://www.coreconservation.co.uk WP Permalinks /%postname%/ WP home path /home/corecons/public_html/ WP content dir /home/corecons/public_html/wp2/wp-content WP plugin dir /home/corecons/public_html/wp2/wp-content/plugins WP content url https://www.coreconservation.co.uk/wp2/wp-content WP plugin url https://www.coreconservation.co.uk/wp2/wp-content/plugins WP Locale en_GB WP Memory Limit 40M WP Max Upload Size 64mb WP Active plugins 4ever v.1.0 by Ov3rfly Adaptive Images for WordPress v.0.6.65 by Nevma Admin Management Xtended v.2.4.1.1 by Oliver Schl?be Admin Menu Editor v.1.8.8 by Janis Elsts Broken Link Checker v.1.11.8 by ManageWP Category Tag Pages v.1.0 by Marzio Carro Admin Columns v.3.4.1 by AdminColumns.com Coming Soon Page & Maintenance Mode by SeedProd v.5.0.25 by SeedProd Cool Tag Cloud v.2.12 by WPKube Custom Menu Wizard v.3.3.1 by Roger Barrett Webcraftic Disable Admin Notices Individually v.1.0.6 by Webcraftic Email Address Encoder v.1.0.18 by Till Krüss 301 Redirects v.2.40 by WebFactory Ltd Google Analytics Dashboard for WP (GADWP) v.5.3.7 by ExactMetrics Google XML Sitemaps v.4.1.0 by Arne Brachhold Grid Kit (Premium) v.1.8.26 by wpsofts Maika Gallery v.1.4.4 by Roninwp Menu Management Enhancer v.1.1 by Chris Mavricos, SevenSpark Plugin Notes Plus v.1.1.2 by Jamie Bergen Real 3D Flipbook v.3.4.3 by creativeinteractivemedia Regenerate Thumbnails Advanced v.2.0.1 by ShortPixel Rich Text Excerpts v.1.3.4 by Peter Edwards Smart Slider 3 v.3.3.15 by Nextend SSL Insecure Content Fixer v.2.7.2 by WebAware Temporary Login Without Password v.1.5.15 by StoreApps Thrive Optimize v.1.2.4 by Thrive Themes Thrive Clever Widgets v.1.38 by Thrive Themes Thrive Comments v.1.2.5 by Thrive Themes Thrive Headline Optimizer v.1.1.22 by Thrive Themes Thrive Leads v.2.1.7.2 by Thrive Themes Thrive Ovation v.2.1.4 by Thrive Themes Thrive Quiz Builder v.2.1.7.2 by Thrive Themes Thrive Architect v.2.2.0.2 by Thrive Themes Toolset Types v.2.3.5 by OnTheGoSystems UberMenu 3 - The Ultimate WordPress Mega Menu v.3.5 by Chris Mavricos, SevenSpark Wicked Folders v.2.11.4 by Wicked Plugins Yoast SEO v.9.7 by Team Yoast WP Admin Bar Control v.0.9.1 by Alex Egorov WP Fastest Cache Premium v.1.3.9 by Emre Vona WP Fastest Cache v.0.8.9.3 by Emre Vona WP Media folder v.4.7.2 by Joomunited WP Staging Pro v.2.8.4 by WP-Staging, René Hermenau ZigaForm - WordPress Calculator & Cost Estimation Form Builder v.3.9.8.4 by ZigaForm.Com WP MU plugins WP Staging Optimizer v.1.1 by René Hermenau
And also the relevant portion of the .htaccess file from the main site, placed at the beginning of the code
# BEGIN Adaptive Images #======================= <IfModule mod_rewrite.c> RewriteEngine On # Watched directories RewriteCond %{REQUEST_URI} /wp2/wp-content/uploads [OR] RewriteCond %{REQUEST_URI} /wp2/wp-content/themes # Redirect images through the adaptive images script RewriteRule \.(?:jpe?g|gif|png)$ /wp2/wp2/wp-content/plugins/adaptive-images/adaptive-images-script.php [L] </IfModule> # END Adaptive Images
Just an idea: I noticed, that in the re-write rule the generated path is /wp2/wp2/wp-content/ which I think is not correct – however I think this is auto-generated by the plugin every time the settings are saved. I corrected this path manually last night but now it is back reverted again.
RewriteRule \.(?:jpe?g|gif|png)$ /wp2/wp2/wp-content/plugins/adaptive-images/adaptive-images-script.php [L]
But you let me know what you think. ??
Hello, my friend,
Thank you for sharing this info with me!
You did notice correct, this is where the problem lies. This bit of code is put there automatically. You can change it manually and remove the extra
/wp2
which is not necessary and I believe that this will solve it. However, the problem will appear again next time you save the plugin settings.Now I am starting to understand your setup a little better. Your WordPress installation is in a subdirectory of the root of your server, right? However, the urls of your images are still being accessed via the subdirectory. Somewhere within this setup is where the problem lies and our plugin cannot figure this out in detail. What I am trying to say is that it is a little bit of a mix-up having your permalinks refer to the root of your server but your media inside a subdirectory of the root.
We have tested with success is the recommended setup explained here in the Codex https://www.ads-software.com/support/article/giving-wordpress-its-own-directory/ in both methods mentioned. I believe what you were trying to achieve was method 1 right. Can you confirm this and tell me if you have implemented it exactly as it is explained in the article? Because if that is so, then there should not be any extra
/wp2
in the image urls!Cheers,
Takis- This reply was modified 5 years, 6 months ago by Takis Bouyouris.
- This reply was modified 5 years, 6 months ago by Takis Bouyouris.
Hello,
Can I have your email, I would like to send you some of my .htaccess info on a more secure channel, rather than posting it into the “open”.
Many thanks,
ValYes, of course, you may email me at info [at] nevma [dot] gr.
Cheers,
Takis
- The topic ‘Script not working on main site’ is closed to new replies.