|
[bug] file uploads require PHP 4.3: msg#01009php.drupal.devel
Project: Drupal Version: cvs Component: base system Category: bug reports Priority: normal Assigned to: Anonymous Reported by: Bart Jansens Updated by: Kjartan -Status: patch +Status: fixed This should be fixed in CVS: Kjartan Previous comments: ------------------------------------------------------------------------ February 15, 2004 - 13: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 - 16:40 : Dries Committed to HEAD. Thanks. ------------------------------------------------------------------------ February 15, 2004 - 16: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 - 22: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 - 23:43 : ax tested and working (no more notices). please apply. ------------------------------------------------------------------------ February 26, 2004 - 12: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', ' ------------------------------------------------------------------------ February 26, 2004 - 20:43 : Anonymous 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. -- 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] Need way to determine if theme block contains content: 01009, jik |
|---|---|
| Next by Date: | cvs log messages: 01009, no-reply |
| Previous by Thread: | [bug] file uploads require PHP 4.3i: 01009, Anonymous |
| Next by Thread: | [bug] Problem with multiple mysql connections: 01009, weitzman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |