Bug #214
Media upload not work under Windows
| Status: | Closed | Start date: | 2009-12-16 | |
|---|---|---|---|---|
| Priority: | Undecided | Due date: | ||
| Assignee: | Alex Cartwright | % Done: | 100% |
|
| Category: | Zula::General | |||
| Target version: | 2.5.0 | |||
| PHP Version: | 5.3.0 |
Description
OS: Windows XP
PHP: 5.3.0
Function zula_get_file_mime from common.php file not work with next log:
[warning] -- (unknown:0) zula_get_file_mime() failed to get mime via FileInfo [info] -- (unknown:0) zula_get_file_mime() reverting to "mime_content_type", advised to install "FileInfo" extension [warning] -- (unknown:0) zula_get_file_mime() no method to get mime type, advised to install "FileInfo" extension
The problem in PHP function finfo_file which expects to get the file name in absolute form.
I fix this by adding line:
$file = realpath( $file );
in the beggining of function definition.
Related issues
History
Updated by Alex Cartwright about 2 years ago
Strange, nothing in the docs says it needs a absolute path to the file for Windows. I'll confirm the fix later on and set for 2.4.1. Thanks =)
Updated by Alex Cartwright about 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset commit:"892ef5104f3a88a172103787c7b16de158a0984f".
Updated by Alex Cartwright about 2 years ago
- Category set to Zula::General
- Assignee set to Alex Cartwright
- PHP Version set to 5.3.0