WordPress.org

Ready to get started?Download WordPress

Forums

Snow Storm
[resolved] Plugin breaks on Windows due to PHP's DIRECTORY_SEPARATOR constant. (2 posts)

  1. nhylated
    Member
    Posted 1 year ago #

    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); }

    with

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

    This will work on Windows as well as Linux.

  2. Antonie Potgieter
    Member
    Plugin Author

    Posted 1 year ago #

    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 http://php.net/manual/en/dir.constants.php

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.