#10143 closed defect (bug) (invalid)
wp_timezone_supported returning false in PHP 5.1.6
Reported by: | chipbennett | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.8 |
Component: | Date/Time | Keywords: | |
Focuses: | Cc: |
Description
WordPress 2.8 installed on PHP 5.1.6, Timezone Option functionality does not work (wp_timezone_supported check reverts to pre-2.8 timezone option functionality).
The wp_timezone_supported() function checks for the following PHP functions (functions.php, line 3173):
date_default_timezone_set (requires PHP >= 5.1.0)
timezone_identifiers_list (requires PHP >= 5.1.0)
timezone_open (requires >= PHP 5.1.0)
timezone_offset_get (requires PHP >= 5.1.0)
However, in PHP 5.1.6, timzeone_identifiers_list, timezone_open, and timezone_offset_get appear not to be available.
Apparently, timezone_identifiers_list requires a custom compile option.
The other two options appear to have similar issues (Date PHP4 module not enabled).
Also, it appears that timezone_offset_get may not work in PHP versions below 5.2.6.
Change History (10)
#1
@
15 years ago
- Keywords needs-patch added; wp_timezone_supported timezone_offset_list timezone_open timezone_offset removed
- Milestone changed from Unassigned to 2.9
#3
@
15 years ago
- Keywords needs-patch removed
- Milestone 2.9 deleted
- Resolution set to invalid
- Status changed from new to closed
#4
@
15 years ago
Not sure what to do with "Use the timezone_support" filter, but will add this link:
#5
follow-up:
↓ 7
@
15 years ago
I have no idea what "use the timezone_support filter" means, but I can try to find out. It appears, though, from Otto's comment that the "timezone_support" filter is intended for certain edge cases.
I don't see how this current issue is an "edge" case, much less "invalid" as a bug.
WordPress minimum requirements are still PHP >= 4.3, while this option touted in 2.8 (automatic DST adjustment) appears not to work in PHP < 5.2.6 (without a custom compile option, over which most self-installs on shared web hosts have no control).
Also, can I also suggest changing the explanatory text for the manual timezone selection/daylight saving time adjustment when wp_timezone_supported returns false?
Currently:
Unfortunately, you have to manually update this for Daylight Savings Time. Lame, we know, but will be fixed in the future.
This text reads the same as in versions < 2.8, and can lead to confusion. (For example, I spent the better part of a couple hours re-uploading the 2.8 files, thinking that part of the files didn't write correctly in the automatic upgrade since I didn't see the expected Settings - General UI.)
Recommended Wording:
Unfortunately, your server's PHP version does not support automatic Daylight Saving Time adjustment. For now, you will need to adjust DST manually. We apologize for the inconvenience.
(If this suggestion should be a separate ticket, just let me know and I'll submit it separately.)
#6
@
15 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
Okay, I found apply_filter(timezone_support).
This is definitely not an invalid bug. If I force timezone_support filter to true, the options page breaks.
#7
in reply to:
↑ 5
;
follow-up:
↓ 9
@
15 years ago
Replying to chipbennett:
WordPress minimum requirements are still PHP >= 4.3, while this option touted in 2.8 (automatic DST adjustment) appears not to work in PHP < 5.2.6 (without a custom compile option, over which most self-installs on shared web hosts have no control).
WordPress will run on PHP 4.3, but you won't get all the features (namely this one). There are quite a few things you can't do until you get to PHP 5.2.0+ (anything less is not recommended, at least by me).
I'm not sure the exact PHP version you need (I guess 5.1.0 based on your ticket), but I can assure you that you don't need a custom compile to do it. I have 3 different servers which are all running a normal version of PHP 5.2.x (two are .6, on is .9) and this feature works on all of them.
#9
in reply to:
↑ 7
@
15 years ago
Replying to Viper007Bond:
Replying to chipbennett:
WordPress minimum requirements are still PHP >= 4.3, while this option touted in 2.8 (automatic DST adjustment) appears not to work in PHP < 5.2.6 (without a custom compile option, over which most self-installs on shared web hosts have no control).
WordPress will run on PHP 4.3, but you won't get all the features (namely this one). There are quite a few things you can't do until you get to PHP 5.2.0+ (anything less is not recommended, at least by me).
I'm not sure the exact PHP version you need (I guess 5.1.0 based on your ticket), but I can assure you that you don't need a custom compile to do it. I have 3 different servers which are all running a normal version of PHP 5.2.x (two are .6, on is .9) and this feature works on all of them.
1) Shouldn't it be pointed out somewhere what features are available using the recommended minimum PHP requirement, and which aren't?
2) The issue isn't what will work under PHP 5.2.6. (If you notice from the last sentence of the ticket, I pointed out that 5.2.6 works.) So saying that the DST feature works under both 5.2.6 and 5.2.9 without a custom compile doesn't really help. I linked to the PHP manual comment that indicates that, in (certain) lower versions, it does require a custom compile.
I suppose I don't mind that the ticket gets closed, just don't do so because you're misunderstanding the problem.
#10
@
15 years ago
I don't get it -- isn't wp_timezone_supported()
doing exactly what it's designed to do? If your server can support the timezone feature, then WordPress displays it. If not, it doesn't. It's no different than pretty permalinks requiring mod_rewrite
or the various conditions in order for one-click upgrades to work.
http://core.trac.wordpress.org/ticket/3962#comment:105
Use the
timezone_support
filter.