I get “The PHP Date/Time library is not supported by your web host.” on my CentOS host, what library to I need to install to add support?

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:

Read More

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)

Related posts

Leave a Reply

3 comments

  1. 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
    
  2. 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:

    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?

  3. 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:

    Screenshot for PHP Configuration on CPanel
    (source: mikeschinkel.com)

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

    Changing your version of PHP on CPanel
    (source: mikeschinkel.com)