pulled ping function out of config.php and added windows support