$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>wp admin - I get "The PHP DateTime library is not supported by your web host." on my CentOS host, what library|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin9PV0评论

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)

Post a comment

comment list (0)

  1. No comments so far