diff --git a/lib/Doctrine/Manager.php b/lib/Doctrine/Manager.php index 491f2655c..42b205059 100644 --- a/lib/Doctrine/Manager.php +++ b/lib/Doctrine/Manager.php @@ -417,8 +417,12 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera public function parseDsn($dsn) { // fix sqlite dsn so that it will parse correctly - $dsn = str_replace("////", "/", $dsn); - $dsn = str_replace("///c:/", "//c:/", $dsn); + if (false !== strpos($dsn, ':///')) { + // replace windows directory separators + $dsn = str_replace("\\", "/", $dsn); + // replace file:/// format with parse_url()-compatible file:// + $dsn = str_replace(":///", "://", $dsn); + } // silence any warnings $parts = @parse_url($dsn);