Bug #213
Pre installation checks of directories failed
| Status: | Closed | Start date: | 2009-12-13 | |
|---|---|---|---|---|
| Priority: | Critical | Due date: | ||
| Assignee: | Alex Cartwright | % Done: | 100% |
|
| Category: | Zula::General | |||
| Target version: | - | |||
| PHP Version: |
Description
TangoCMS version: 2.4.0 RC1
OS: Windows 7
PHP: 5.2.9
All checks of directories in pre installation failed, but all directories exist and writable.
Related issues
History
Updated by Alex Cartwright over 2 years ago
Could be related to bug #201, however I don't know much about Windows ACL system. Are you sure the directory is writable by the user running the script (the webserver)?
Updated by Alex Cartwright over 2 years ago
Just to confirm, the checks for files work correctly?
Updated by Sergey Kuznetsov over 2 years ago
Alex Cartwright wrote:
Could be related to bug #201, however I don't know much about Windows ACL system. Are you sure the directory is writable by the user running the script (the webserver)?
With ACL's all right. I am trying to understand himself and reached the following line in the function zula_is_writable():
$ tmpFile = tempnam ($ path, 'zwc');
The function returns the value "D:\www\htdocs\test.tango\config\default\layouts\zwc4A7B.tmp", but in fact the file is not created.
Updated by Alex Cartwright over 2 years ago
Within that function, you should see this:
$tmpFile = @tempnam( $path, 'zwc' );
if ( $tmpFile !== false && is_file( $tmpFile ) ) {
unlink( $tmpFile );
return strpos( $tmpFile, $file ) === 0;
}
Can you remove the 'unlink( $tmpFile );' line? I would like to see if this file does get created (the unlink would remove it, and that may be why it seems the file is not created).
Updated by Sergey Kuznetsov over 2 years ago
Alex Cartwright wrote:
Can you remove the 'unlink( $tmpFile );' line?
The file is created. My mistake. Here everything is fine.
So the problem at this location:
return strpos ($ tmpFile, $ file) === 0;
Returns False if the values:
$ tmpFile = 'D:\www\htdocs\test.tango\config\default\layouts\zwc6603.tmp'; $ file = '../config/default/layouts';
Updated by Alex Cartwright over 2 years ago
Doh, I see the issue!. Can you change
return strpos( $tmpFile, $file ) === 0;
To:
return strpos( $tmpFile, $path ) === 0;
That should fix it =)
Updated by Sergey Kuznetsov over 2 years ago
Fixed!
Updated by Alex Cartwright over 2 years ago
- Category set to Zula::General
- Status changed from New to In progress
- Assignee set to Alex Cartwright
- Priority changed from Undecided to Critical
Excellent, thanks for helping out there. Just in time for the 2.4.0 release as well, which is tomorrow =). I shall commit the fix shortly.
Updated by Alex Cartwright over 2 years ago
- Status changed from In progress to Closed
- % Done changed from 0 to 100
Applied in changeset commit:"26b7d802f663b09e24381dcf144cf2495df0882a".