Opened 11 years ago
Closed 9 years ago
#26265 closed defect (bug) (fixed)
safe_mode error when uploading audio/video (stuck on crunching)
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Media | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
There is a bug in the ID3 library, where it fails to calculate the correct tmp directory and throws realpath errors when the webserver is running safe_mode.
This patch fixes this.
Attachments (2)
Change History (10)
#1
@
11 years ago
- Component changed from Upload to External Libraries
- Version changed from 3.7.1 to 3.6
#2
@
11 years ago
- Summary changed from safe_mode error when uploading audio/video to safe_mode error when uploading audio/video (stuck on crunching)
#3
@
11 years ago
- Component changed from External Libraries to Media
- Milestone changed from Awaiting Review to Future Release
#4
@
11 years ago
Few things:
- http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode =
This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
Not sure that we even care to support this, even though it is in the scope of our minimum requirements. - The patch will result in the value ALWAYS being set by WordPress, so when
getid3.php
is loaded, there will be a warning for trying to resetGETID3_TEMP_DIR
- We don't want to patch the
getID3
library directly, so suppressing errors in therealpath()
call isn't ideal. Even so,GETID3_TEMP_DIR
isn't set conditionally,getid3.php
ALWAYS attempts to set it, without checking if it is already defined.
This one is not keeping me up at night
#5
@
11 years ago
So 5.3 support is dropped from WordPress core now? While everything else works fine, this is the one thing broken.
I don't really care how you fix it, but it should be fixed - and the fix is simple, so why not?
#6
@
11 years ago
safe_mode
isn't supported by PHP anymore. It is deprecated since PHP 5.3. WordPress makes changes with every new version of PHP when necessary but provides backwards compatibility back to PHP 5.2.4.
The only reason to address this issue would be for versions >= PHP 5.2.4 and < PHP 5.3. Even then, suppressing the error for realpath()
and allowing the override of GETID3_TEMP_DIR
should be filed upstream: https://github.com/jamesheinrich/getid3 - we don't typically patch external libraries directly.
I like the direction of your patch, thanks for alerting us to the issue.
I've asked wonderboymusic to look into this.