Cache does not work on Windows

Support
  1. 5 months ago

    I'm trying the new version on my desktop, and it seems that cache is not working. My cache directory is empty.
    I suspect the 'file_force_contents' function. It's using explode on slash (/) but on windows dirname(__FILE__) returns a path with back-slash(\)

  2. In fact, I think there is more than this because i'm getting a 404 error generated by esotalk for resources inside cache.

  3. I was getting that two. I decided to change the permission and ownership of the cache folder to EVERYONE allow EVERYTHING. In order for it to work. It is definately something to do with the way the folder is created from the installation/caching procedure.

  4. Edited 5 months ago by ram

    OK, this is because of this line

    if (!is_dir($dir .= "/$part")) mkdir($dir); in functions.general.php
    It's adding a slash at the beginning hence my path becomes "/D:\\install\\...." which is not valid.

    the whole block needs to be changed to
    foreach($parts as $part) if (!is_dir($dir .= "$part/")) mkdir($dir); return file_put_contents("$dir$file", $contents);

  5. Thirtysixway

    Nov 26 Moderator

    I've submitted this as issue #48, https://github.com/esotalk/esoTalk/issues/48

or Sign Up to reply!