Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Blocker
-
Resolution: Duplicate
-
Affects Version/s: Next Major Release
-
Fix Version/s: None
-
Component/s: Zend_Tool
-
Labels:None
Description
Windows CMD
C:\xampp\htdocs\zf1.9>zf.bat create project --path C:\xampp\htdocs\zf1.9\
Creating project at C:/xampp/htdocs/zf1.9
C:\xampp\htdocs\zf1.9>zf.bat show profile
Warning: split(): REG_EESCAPE in C:\xampp\htdocs\zf1.9\library\Zend\Tool\Project
\Provider\Abstract.php on line 124
An Error Has Occurred
A project profile was not found in
Zend Framework Command Line Console Tool v1.9.0a1
Details for action "Show" and provider "Profile"
Profile
zf show profile
C:\xampp\htdocs\zf1.9>
Sorry but i didn't know where to post the solution but here it is:
//It is the backslash on windows paths that causes the error. preg_quote fixes this: $parentDirectoriesArray = split(preg_quote(DIRECTORY_SEPARATOR), ltrim($projectDirectory, DIRECTORY_SEPARATOR));
The solution was not complete. There was an error on line 126 that made the path on windows look like this "\C:\xampp...". My solution is now:
//line 124 in Zend_Tool_Project_Provider_Abstract $parentDirectoriesArray = split(preg_quote(DIRECTORY_SEPARATOR), ltrim($projectDirectory, DIRECTORY_SEPARATOR)); while ($parentDirectoriesArray) { if (DIRECTORY_SEPARATOR == "\\") { // Seems to be a windows path $projectDirectoryAssembled = implode(DIRECTORY_SEPARATOR, $parentDirectoriesArray); } else { $projectDirectoryAssembled = DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $parentDirectoriesArray); } //...//line 124 in Zend_Tool_Project_Provider_Abstract $parentDirectoriesArray = split(preg_quote(DIRECTORY_SEPARATOR), ltrim($projectDirectory, DIRECTORY_SEPARATOR)); while ($parentDirectoriesArray) { if (DIRECTORY_SEPARATOR == "\\") { // Seems to be a windows path $projectDirectoryAssembled = implode(DIRECTORY_SEPARATOR, $parentDirectoriesArray); } else { $projectDirectoryAssembled = DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $parentDirectoriesArray); } //...