Re: Include fileinfo in core
| From: | Antony Dovgal | Date: | Sun, 31 Dec 2006 00:21:38 +0000 |
| Subject: | Re: Include fileinfo in core | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-27222@lists.php.net to get a copy of this message | ||
On 12/31/2006 02:43 AM, Kevin Waterson wrote:
Sure, but the very same applies to core extensions.While mime_magic is deprecated, it does not mean it cannot be used. So there certainly is a way to do it without PECL.Currently, but it will be moved sometime in the future.Anyone capable of installing core extension, is capable of installing an extension from PECL, in most cases it's as easy asNot everybody has access to this, particularly in a mutliple hosting environment.pecl install <name>.
It would be nice to be able to verify/validate file types by mimetype with a simple core function that is available on all platforms. If the only way of doing this is in PECL then portablity is lost and so is any surity of what type of file an uploaded file may be, without resorting to hacks.Including an extension into the core does not mean it will become available on all hostings, especially taking into account that this extension has an external dependency (libfile). Also, I'm not sure I understand what portability you're talking about. ext/mime_magic can be also missing if your sysadmin did not enable it when building PHP. -- Wbr, Antony Dovgal