Error thrown by fields_map.php with UNC path
Brought to you by:
omniti
I deployed wp-sqlsrv into an IIS farm that uses shared storage on UNC paths, structured like \\fileserver\iisfarmcontent\mysite. When going through the custom setup wizard, an error is thrown by fields_map.php by the function file_put_contents(). From the error, it is clear that the first two backslashes in the UNC path are being removed. The file path looks like "fileserver/iisfarmcontent/mysite", without the two leading slashes.
The error is thrown by the method with the signature "update_for($qry)". To workaround the error, I modified the function call to read:
file_put_contents('\\\\' . $this->filepath, ...
Edited version of the file that works with UNC paths
I added an attachment of an edited version of the fields_map.php file. There were multiple edits that I had to make to support UNC paths.