Title: Windows host problem
Last modified: August 22, 2016

---

# Windows host problem

 *  [jancerveny](https://wordpress.org/support/users/jancerveny/)
 * (@jancerveny)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/windows-host-problem/)
 * Hello. I’m running Converts theme that includes this plugin on a Windows machine
   and I’ve experienced some issues. The plugin doesn’t work properly and causes
   func.js to trigger a 404. I have investigated and discovered that it’s caused
   by code that compares file paths to generate a relative URL “path” for home_url()
   function of WordPress. This approach works fine in Linux where forward slashes
   are used in the filesystem, but not in Windows where there are backslashes.
 * A “Hack” that fixes this is to replace _getCurrentWPDir function’s code (line
   223 in wpset.inc.php) to this: `return strtr(str_replace( strtr(ABSPATH, array('/'
   => DIRECTORY_SEPARATOR)), '', dirname( __FILE__ ) ), array(DIRECTORY_SEPARATOR
   => '/'));`
 * Maybe it helps soembody before a fix is released.
 * [https://wordpress.org/plugins/ajax-contact/](https://wordpress.org/plugins/ajax-contact/)

The topic ‘Windows host problem’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ajax-contact.svg)
 * [AJAX Contact](https://wordpress.org/plugins/ajax-contact/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-contact/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-contact/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-contact/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-contact/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-contact/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [windows](https://wordpress.org/support/topic-tag/windows/)

 * 0 replies
 * 1 participant
 * Last reply from: [jancerveny](https://wordpress.org/support/users/jancerveny/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/windows-host-problem/)
 * Status: not resolved