• Hello. This plugin doesn’t work on MS Azure (Windows IIS Server).

    I found the solution, but wanted to report it here so it could be fixed officially.

    Problem:
    **Backslashes appear in the path**

    This can be reproduced by installing the plugin and clicking on Generate Files.

    php_errors.log:

    [23-Dec-2016 19:51:46 UTC] PHP Warning:
    rename(D:\local\Temp/1482522705-eU8ikL.tmp,D:/local/temp/simply-static-1-1482522705-msangapu\/index.html):
    The filename, directory name, or volume label syntax is incorrect.
    (code: 123) in D:\home\site\wwwroot\wp-content\plugins\simply-static\includes\class-simply-static-url-fetcher.php on line 105

    [23-Dec-2016 19:51:46 UTC] PHP Warning:
    file_get_contents(D:/local/temp/simply-static-1-1482522705-msangapu\/index.html):
    failed to open stream: No such file or directory in D:\home\site\wwwroot\wp-content\plugins\simply-static\includes\class-simply-static-url-extractor.php on line 110

    [23-Dec-2016 19:51:46 UTC] PHP Warning:
    rename(D:\local\Temp/1482522706-Zzgn00.tmp,D:/local/temp/simply-static-1-1482522705-msangapu\/wp-includes/js/wp-emoji-release.min.js):
    The filename, directory name, or volume label syntax is incorrect.
    (code: 123) in D:\home\site\wwwroot\wp-content\plugins\simply-static\includes\class-simply-static-url-fetcher.php on line 105

    [23-Dec-2016 19:51:46 UTC] PHP Warning:
    sha1_file(D:/local/temp/simply-static-1-1482522705-msangapu\/wp-includes/js/wp-emoji-release.min.js): failed to open stream:
    No such file or directory in D:\home\site\wwwroot\wp-content\plugins\simply-static\includes\class-simply-static-archive-creator.php on line 99

    [23-Dec-2016 19:51:46 UTC] PHP Warning:
    copy(D:/local/temp/simply-static-1-1482522705-msangapu\/wp-includes/js/wp-emoji-release.min.js): failed to open stream:
    No such file or directory in D:\home\site\wwwroot\wp-content\plugins\simply-static\includes\class-simply-static-archive-creator.php on line 256

    Solution:
    In filename: class-simply-static-url-fetcher.php
    Function: public function fetch( Simply_Static_Page $static_page )

    Below this line of code:

    if ( $relative_filename ) {
    $static_page->file_path = $relative_filename;
    $file_path = $this->archive_dir . $relative_filename;

    Add the lines:
    $file_path = str_replace(‘\\/’, ‘/’, $file_path);
    $temp_filename = str_replace(‘\\/’, ‘/’, $temp_filename);

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi supermango,

    Thanks for reporting this issue! And better yet, thank you for offering a fix. I’ll take a look at working this into one of the next releases of Simply Static.

    Best,
    Scott

    You’re the man. Please add this to the next release, or have an IIS toggle that enables this line. Good work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Issues on Azure’ is closed to new replies.