wp admin - I get "The PHP DateTime library is not supported by your web host." on my CentOS host, what library

admin2025-06-03  0

I did some quick looking around, but my PHP skills are pretty nascent. I am sure there is just a package that needs installing.

Edit to add additional information about the setup:

Using:

yum info php

I get the version of PHP as 5.1.6:

Name       : php
Arch       : i386
Version    : 5.1.6

More information, this is a VM running CentOS at GoDaddy:

CentOS release 5.4 (Final)

I did some quick looking around, but my PHP skills are pretty nascent. I am sure there is just a package that needs installing.

Edit to add additional information about the setup:

Using:

yum info php

I get the version of PHP as 5.1.6:

Name       : php
Arch       : i386
Version    : 5.1.6

More information, this is a VM running CentOS at GoDaddy:

CentOS release 5.4 (Final)
Share Improve this question edited Aug 24, 2010 at 13:00 hakre 12.9k6 gold badges49 silver badges85 bronze badges asked Aug 19, 2010 at 13:13 Larry SmithmierLarry Smithmier 1131 gold badge2 silver badges6 bronze badges
Add a comment  | 

3 Answers 3

Reset to default 3

Upgrade to PHP 5.2 or above

The Error Message you see is by WordPress. It's very misleading what it basically saying is, that you need a PHP version >= 5.2 for that feature to work.

Please look into your operating systems documentation or contact technical support on how to update your PHP version. For CentOS, for example: CentOS HowTos: PHP 5.1 To 5.2

Keep Timezones Upgraded

To get the most out of PHP Timezone support, there is a PECL package that contains all the latest updates: timezonedb.

So next to upgrading PHP to a recent version, you can install that PECL package and keep it updated to get the latest timezone updates (last one was on August 16):

$ yum install php-pear php-devel
$ pecl install timezonedb

wp-admin/options-general.php outputs the following error message:

Unfortunately, you have to manually update this for daylight saving time. The PHP Date/Time library is not supported by your web host.

It will output that block of code if the following PHP-provided functions are missing:

  • date_create()
  • date_default_timezone_set()
  • timezone_identifiers_list()
  • timezone_open()
  • timezone_offset_get()

Many of these functions are provided by the DateTime family of classes. These have been part of PHP core since version 5.1/5.2, depending on the function in question. Though I hate to ask for clarification in an answer: What version of PHP is your host running?

Smithmier**:

UPDATE: I see by your update this doesn't apply to you but it would apply to many others with your same problem and as we're looking for general answers to questions that apply to more than just one person I'm going to leave it.


I'm assuming @hakre is right and if so and if your web host offers CPanel for you to administrate the technical bits of your web hosting account then here is where you can change your version of PHP:


(source: mikeschinkel)

Which then takes you to this screen which is where you can change your version of PHP:


(source: mikeschinkel)

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748881116a314497.html

最新回复(0)