|
[bug] file uploads require PHP 4.3: msg#00995php.drupal.devel
Project: Drupal Version: cvs Component: base system Category: bug reports Priority: normal Assigned to: Anonymous Reported by: Bart Jansens Updated by: Anonymous Status: active Nope. Since we define the constants, they only need to be defined, if they are not defined yet. You do the same with functions... [?php if (!function_exists('file_get_contents')) { function file_get_contents(...) { ... } } ?] Checking for PHP version is odd... Only the constants are the problem as the reported indicated. Please apply Bart's patch. Anonymous Previous comments: ------------------------------------------------------------------------ February 15, 2004 - 12:55 : Bart Jansens Attachment: http://drupal.org/files/issues/20040215.file-constants.patch (629 bytes) file.inc uses constants that only exist in PHP 4.3 or higher (http://nl.php.net/manual/en/features.file-upload.errors.php) causing file uploads to fail in PHP 4.2. ------------------------------------------------------------------------ February 15, 2004 - 15:40 : Dries Committed to HEAD. Thanks. ------------------------------------------------------------------------ February 15, 2004 - 15:46 : Goba This should be wrapped in an if (defined('UPLOAD_ERR_OK')) IMHO, since after this patch, the code will not work with PHP 4.3+ :) ------------------------------------------------------------------------ February 23, 2004 - 21:31 : Bart Jansens Attachment: http://drupal.org/files/issues/file-constants2.patch (853 bytes) Unfortunatly i'm not seeing the notices but the attached patch should fix this :) ------------------------------------------------------------------------ February 25, 2004 - 22:43 : ax tested and working (no more notices). please apply. ------------------------------------------------------------------------ February 26, 2004 - 11:50 : magico I think that is better to check for PHP version instead of checking for one constant definition. // Required for file uploads to work with PHP 4.2 if (version_compare(phpversion(), '4.2.0', ' -- View: http://drupal.org/node/view/5874 Edit: http://drupal.org/project/comments/add/5874 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [feature] Support file uploads via blogapi: 00995, walkah |
|---|---|
| Next by Date: | [bug] theme_help does not catch all "sections": 00995, Anonymous |
| Previous by Thread: | [bug] file uploads require PHP 4.3i: 00995, magico |
| Next by Thread: | [bug] file uploads require PHP 4.3: 00995, Kjartan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |