Support » Plugin: Snow Storm » Plugin breaks on Windows due to PHP's DIRECTORY_SEPARATOR constant.

  • Resolved nhylated


    On windows vista, this plugin does not work since the JS path generated in the snow_storm() function is not correct – missing directory separator slash in the path.

    This is because the DIRECTORY_SEPARATOR PHP constant returns null/empty on Windows Vista with XAMPP (PHP 5.4). I fixed by using ‘/’ instead of DIRECTORY_SEPARATOR.

    In snow-storm.php, replace this line at the top –

    if (!defined('DS')) { define('DS', DIRECTORY_SEPARATOR); }


    if (!defined('DS')) { define('DS', '/'); }

    This will work on Windows as well as Linux.

Viewing 1 replies (of 1 total)
  • Plugin Author Tribulant


    Thank you for your post.

    I’m glad that you got the problem resolved by changing it to a forward slash.

    The PHP DIRECTORY_SEPARATOR constant should always be defined in PHP. It is a predefined PHP constant

    If it’s not defined, you could define it in your wp-config.php file in case some other plugins might want to use it as well.

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin breaks on Windows due to PHP's DIRECTORY_SEPARATOR constant.’ is closed to new replies.