Home » HTML » HTML_Template_Xipe » Bug #2274
directory handling under Windows
Details
| Submitted | 2004-09-03 06:15 UTC |
|---|---|
| From | quinton at free dot fr |
| Status | Suspended |
| Package | HTML_Template_Xipe |
| PHP Version | 5.0.1 |
| OS | Windows XP |
| Roadmaps | (Not assigned) |
Comments
[2004-09-03 06:15 UTC] quinton at free dot fr
Description:
------------
under Xipe/Main.php:: _getCompiledFilePrefix()
XIPE tries to handle directories in a wrong way under windows with path prefixed by 'c:' ;
same errors seems to be reported for other packages :
- Bug #643: compileDir issue
- Bug #2070: leading slash in ptmp var causes install to fail
perhaps need of a generic path handler with a nice class ...
Reproduce code:
---------------
if ($directory!='.') { // $directory is '.' also if no dir is given
$path = explode(DIRECTORY_SEPARATOR,$directory);
foreach ($path as $aDir) {
$compileDir = $compileDir.DIRECTORY_SEPARATOR.$aDir;
echo "adir = $aDir<br>\n";
echo "compildir = $compileDir<br>\n";
if (!@is_dir($compileDir)) {
umask(0000); // make that the users of this group (mostly 'nogroup') can erase the compiled templates too
if (!@mkdir($compileDir,0777)) {
return $this->_error( "..." );
}
}
}
}
Actual result:
--------------
here are my values in this sample code :
directory = c:\wamp\www\marc\moa\templates
filename = defaultheader.tmpl
adir = c:
compildir = C:\wamp\www\marc\moa\templates\default\..\..\var\templates\\c:
couldn't make directory: 'c:' under 'C:\wamp\www\marc\moa\templates\default\..\..\var\templates\'
1. please give write permission to the 'compileDir', so Xipe can create directories inside