contao / core-bundle

[READ-ONLY] Contao Core Bundle
GNU Lesser General Public License v3.0
122 stars 57 forks source link

issue with str_replace and directory separator #224

Closed fritzmg closed 9 years ago

fritzmg commented 9 years ago

The core bundle uses str_replace in various places to remove the root directory from a path, e.g.

  1. SymlinksCommand.php#L139 (see also #208)
  2. BackendInstall.php#L65

and may be more. This does not work on Windows due to the directory separator (/ vs \). You don't need to take care of the directory separator for any file functions, however you would still need to take care of it for pure string functions.

[2.] makes it impossible to install Contao 4 on Windows currently. The Install Tool will always say PHP is not allowed to write files! - since it actually checks the following path at BackendInstall.php#L65:

C:\xampp\htdocs\contao4/C:\xampp\htdocs\contao4\vendor\contao\core-bundle\src\Resources\contao\controllers\BackendInstall.php
leofeyer commented 9 years ago

See #208.