WordPress.org

Ready to get started?Download WordPress

Forums

Post date incorrect: Year showing as 0000 (10 posts)

  1. ben.buchanan@gmail.com
    Member
    Posted 4 years ago #

    I have wordpress 2.8.4 running on mac with leopard 10.5.8. It has been running for a long time with no problems. The site is here: http://benbuchanan.homedns.org

    Just the other day I suddenly noticed that all of the dates are showing as being in the year 0000 (latest post is September 13 0000). On the left hand side of the site however the posts do sit in the correct folder (ie September 2009 for the latest).

    If I log in to the site and view the list of posts in the admin interface they show Date published as being in year 0000 as well.

    If I view the wp-posts database table directly however, all the post_date and post_date_gmt fields are correct, except for those related to posts in the last few weeks.
    Edit: Here are the recent posts/edits that are showing the wrong dates in the database. All other post entries show the correct dates. http://tinypic.com/r/24qu72r/4

    Any suggestions on how to diagnose and fix this problem?
    Cheers
    Ben

  2. ClaytonJames
    Member
    Posted 4 years ago #

    Hop into a shell and identify your current version of php. I think
    php --version should do it. Note the version and then see if there are any known bug reports in php relative to that issue in that version.

    This may be relative information. ( PPC or not, I think it's possible that it may be a php related issue ).

    http://aspn.activestate.com/ASPN/Mail/Message/php-dev/3753702

  3. ben.buchanan@gmail.com
    Member
    Posted 4 years ago #

    ClaytonJames,
    That does appear to be the issue! My PHP version (5.2.10) is the version listed in that link.
    I guess I'll have to upgrade PHP. I'll be switching to snow leopard soon anyway.
    Cheers
    Ben

  4. AlisonMooreSmith
    Member
    Posted 4 years ago #

    I have the same problem on one of my blogs, but don't understand how to fix it. I've used the blog for a few years with no problem and all of a sudden all the dates crapped out, with no changes.

    Is it just an issue of updating the PHP? If so, why did the problem happen with no changes to the blog?

    Thanks.

  5. name99
    Member
    Posted 4 years ago #

    Just like Alison I'd like to know how do I fix this. Upgrading to 10.6 is not an option because I'm using an old PPC mac as my server.
    Is there an upgraded PHP I can download and install that will play nice with what's already installed (in case Apple releases any further 10.5.x upgrades or security fixes or whatever)?

  6. AlisonMooreSmith
    Member
    Posted 4 years ago #

    name99, I found out elsewhere that upgrading to 5.2.11 will solve the problem.

    Anyway, instead of doing that, we just switched everything to a new Mac Mini (Intel) and are using 5.3. That fixed it, of course, but I can't believe this hasn't been fixed. Huge problem.

  7. name99
    Member
    Posted 4 years ago #

    How do I upgrade to 5.2.11?

    I went to http://www.entropy.ch/software/macosx/php/
    downloaded the 5.2.30 installer and ran it. The install apparently went fine (the phpinfo test page looks as expected), but when I go to my wordpress page I get a blank white page with big letters saying "Error establishing a database connection".

    Going to php.net I see that there is a 5.2.11 tarball. Is installing as simple as a
    make clean
    make install
    ? Will that give me something that both hooks up to apache2 and can communicate with mysql (unlike, apparently, the 5.3.0 install)?

    Or is there some trivial thing I need to do to get Mark Liyanage's php to play nice with wordpress?

  8. ollivdl
    Member
    Posted 4 years ago #

    I'm on a ppc, running 10.5.8, having Apache2, and PHP Version 5.2.10.

    I'm having the same year 0000 problem, and the Entropy link above is fine to know, but neither PHP Entropy PHP 5.3.0-3.pkg nor Entropy PHP 5.2.9-7.pkg resulted in a successfull installation:

    The Installer application ended the installation wit hthis message:

    "Install Failed
    The following install step failed: run postupgrade script for entropy-php. Contact the software manufacturer for assistance."

    It is quite borin to see that all the files seem to have been installed properly though, and that these kept my Apache from restarting properly. Apache choked on the php load module that the developer thought to put into an awkward location.

    The idea described on th webpage tells to unload the actual php module in the httpd.conf before installation. That's because he loads his php with a similar line, but in a file apart.

    That file he has put into his own installation folder /usr/local/php5/

    then

    he symlinks to that file trough the other loadmodules folder of Apache (/etc/apache2/other/

    First of all I don't like that style of putting things in own places and adding symlinks etc,
    second of all, he's put redundant stuff into the file that apache would find in php5.conf, in the same /etc/apache2/other/. I don't see the logic...

    So, it hasn't helped me a bit neither, and I'm allergic to such ways of developing without proper info, and the arrogance he has in his writing.

    By the way the proper way would be:

    (1) unload the php module you had active in httpd.conf, by recommenting the line

    LoadModule php5_module libexec/apache2/libphp5.so

    (add a "#" in front of it)

    (2) end apache by disabling Web Sharing in the System Preferences/Sharing pane

    (3) install his package

    (4) Re-enable Apache by re-enabling Web Sharing in System Preferences/Sharing

    End of the story:
    If you have the same problems, don't hope on an easy workaround here...

  9. ollivdl
    Member
    Posted 4 years ago #

    in the meantime I have a small workaround as the function y in php works properly:

    I changed the general settings of my blog to have as date stamp the custom setting:

    F d, 20y

    in this way it returns the year as 2009, composed by the 20 and the 09 as output...

    If you ever started before 2000, this is not really a proper option.

    Anyone got a simply solution otherwise??

  10. Archiblog
    Member
    Posted 4 years ago #

    Any sign of a resolution to this basic issue?

Topic Closed

This topic has been closed to new replies.

About this Topic