Title: Wrong path to ai-cache folder
Last modified: August 21, 2016

---

# Wrong path to ai-cache folder

 *  [Patrik Illy](https://wordpress.org/support/users/illycz/)
 * (@illycz)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wrong-path-to-ai-cache-folder/)
 * If the plugin is used on a virtual server, creates the folder ai-cache elsewhere
   than in the folder uploads.
 * The problem is in line [http://plugins.trac.wordpress.org/browser/new-nine-adaptive-images/trunk/adaptive-images.php](http://plugins.trac.wordpress.org/browser/new-nine-adaptive-images/trunk/adaptive-images.php)#
   L59
 * The value of $_SERVER [‘DOCUMENT_ROOT’] return much different path than $n9m_uploads_dir_array[‘
   basedir’] and then can not function str_replace().
 * I’m not a programmer, but this line works for me:
    $cache_path = rtrim( ltrim(
   str_replace( get_bloginfo(‘url’), ”, $n9m_uploads_dir_array[‘baseurl’] ), ‘/’),‘/’).’/
   ai-cache’;
 * Perhaps the plugin authors do something with this in the next versions…
 * [http://wordpress.org/plugins/new-nine-adaptive-images/](http://wordpress.org/plugins/new-nine-adaptive-images/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Patrik Illy](https://wordpress.org/support/users/illycz/)
 * (@illycz)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wrong-path-to-ai-cache-folder/#post-4480524)
 * Correct link to trac, sorry for that:
    [http://plugins.trac.wordpress.org/browser/new-nine-adaptive-images/trunk/adaptive-images.php#L59](http://plugins.trac.wordpress.org/browser/new-nine-adaptive-images/trunk/adaptive-images.php#L59)

Viewing 1 replies (of 1 total)

The topic ‘Wrong path to ai-cache folder’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/new-nine-adaptive-images_666666.svg)
 * [New Nine Adaptive Images](https://wordpress.org/plugins/new-nine-adaptive-images/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/new-nine-adaptive-images/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/new-nine-adaptive-images/)
 * [Active Topics](https://wordpress.org/support/plugin/new-nine-adaptive-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/new-nine-adaptive-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/new-nine-adaptive-images/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Patrik Illy](https://wordpress.org/support/users/illycz/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/wrong-path-to-ai-cache-folder/#post-4480524)
 * Status: not resolved