openphoto/frontend — Issue #296: Doesn't run on Windows
Author: Daniel15
Created: 2011-11-01 00:08:37+00:00
State: open

My development machine runs Windows (yeah, I know, Windows sucks, etc) and OpenPhoto does not run on it at all. The first exception I noticed was this:

Config file (C:\xampp\htdocs\openphoto\frontend\src/configs/C:\xampp\htdocs\openphoto\frontend\src/html/assets/themes/default/config/settings.ini) does not exist

I found the logic in src\libraries\external\epi\EpiConfig.php is assuming Unix-style paths with a slash at the start:

if($file[0] != '.' && $file[0] != '/')
$file = Epi::getPath('config') . "/{$file}";

This could probably be modified to cater for Windows by checking if the 2nd and 3rd characters are `:\`. There's probably other (similar) hard-coded path logic, too. Perhaps that logic should be pulled out in to some sort of path class.