Menu

Fatal error: Cannot redeclare date_format()

General
2007-06-14
2013-06-06
  • Nobody/Anonymous

    Hello,

    I keep getting this error

    Fatal error: Cannot redeclare date_format() in /var/www/localhost/htdocs/itrack/includes/functions/time.func.php on line 43

    I am running this on Gentoo with apache 2 and php 5 and MySql 5.0

    any thoughts?

     
    • Nobody/Anonymous

      It's a problem with Php 5.2, it have a new function date_format, which not exist in version 5.1

      try this:

      vi ..includes/functions/time.func.php

      replace date_format with date_format2 or another name

      reload Issue-Tracker page.

      Saludos desde Uruguay. Andres

       
      • Nobody/Anonymous

        I just commented out the function in includes/functions/time.func.php. It did the trick for me, although the log says:

        Run-time warning: date_format() expects exactly 2 parameters, 0 given

         
    • Nobody/Anonymous

      I am getting the same problem , and I am using xampp server,
      as per the admin document I made all the canges in config file.. but im getting porblem when I run it.

       
    • Nobody/Anonymous

      I am getting the same problem , and I am using xampp server,
      as per the admin document I made all the canges in config file.. but im getting porblem when I run it.

       
  • Roland Romero

    Roland Romero - 2010-06-16

    Hello.
    following this help, i lost all the dates in all the pages.
    you will prefere rename the function.
    for ex. rename
    date_format(
    with
    date_form4t(
    in those files :
    time.func.php
    modifier.date_format.php
    debug.func.php
    render.funt.php
    funcs.php
    and … smile ;)

    yo !

     
  • maczan1205

    maczan1205 - 2012-09-30

    Tried the above and that does not bring the dates back - just get rid of the warning the OP mentioned.

    No dates displayed, is there an easy fix for this without major changes?

     
  • maczan1205

    maczan1205 - 2012-12-22

    Hey thanks z0l0s !

    I tried this again and found that there were a few places that my " replace all"  should not have been replaced,

    IE  in the render.func.php in the template_date_format line, once I put this back to it's orginal "template_date_format" everything else worked.

    I used "my_date_format" to replace "date_format" in the above mentioned files taking care to replace only the exact date_format and not any other such as the "template_date_format"

    Just thought I would update the thread in case anyone is wondering if the time stamp can be fixed easily.

    All the times are displaying correctly

     

Log in to post a comment.