Search the Community
Showing results for tags 'multi-iinstance'.
Found 1 result
[SOLVED] Multi-instance Support in Multi-site Setup
kongondo posted a topic in API & TemplatesI am trying out multi-instance support in a multi-site setup (option #1, multiple databases) on a Windows Machine (but using a LAMP stack). I am getting a Fatal error in ProcessWire.php #line 877, Failed opening required '/F:/vhosts/sandpit.dev/wire/config.php' (include_path='.;C:\php\pear') in F:\vhosts\sandpit.dev\wire\core\ProcessWire.php on line 877 I am using the following API $path = "F:/vhosts/sandpit.dev/site-mediamanager/"; // OR // $path = "F:\\vhosts\\sandpit.dev\\site-mediamanager\\"; $url = "http://mediamanager.sandpit.local/"; $site = new ProcessWire($path, $url); Here is Line #877 require("$rootPath/$wireDir/config.php"); In my code, $path is an absolute path on the windows machine. In the above example, I want ProcessWire to find the /site-mediamanager/config.php, which is a multi-site running off one Wire powered through the main /site/. As you can see in the error, ProcessWire is adding an extra forward slash to the path, i.e. '/F:/vhosts/sandpit.dev/wire/config.php' instead of 'F:/vhosts/sandpit.dev/wire/config.php' which obviously fails. I have traced the origin to line #784 in ProcessWire.php $rootPath = '/' . implode('/', $parts); // remove siteDir from rootPath The pre-pended / causes the error. Remove that and multi-instance works fine in my environment. Before I report this as a bug, has anyone ran into this issue? Alternatively, could someone on a Windows machine please test the multi-instance feature for me? Maybe even someone using an absolute path on any machine? Preferably test in a multi-site setup (option #1). If this is a bug, it would be nice if it gets fixed before the imminent master release. PW version 3.0.85 (but also tested on the latest dev version). Thanks.