• I have the following error. This error sometimes occur while sometime it won’t. https://www.ishanlamsal.com.np . if you visit the site, sometimes it loads, while sometimes it gives following error.

    Warning: require(/home/u314128488/public_html/wp-includes/date.php): failed to open stream: No such file or directory in /home/u314128488/public_html/wp-settings.php on line 117 Fatal error: require(): Failed opening required ‘/home/u314128488/public_html/wp-includes/date.php’ (include_path=’.:/usr/lib/php’) in /home/u314128488/public_html/wp-settings.php on line 117

    I am using 000webhost. I have tried clean install. It is not a problem about plugins, because even when I disable all of them, this error appears.

    thanks for help in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    I guess your issue is about date php function, I had similar issues with it calling custom date() format. Because it’s mainly built for western characters.

    Can you check file calling date, or date.php is in utf-8 mode please?

    Order of date might also be the issue, as php date() use a very strict format, so please make sure you complied to it on php.net.

    Also, date in general can’t be use like that to output html – most times you need to make your own php function to preprocess and output the result.

    Have a nice day,

    A sample I made, for example, I used date() to compare dates in my template:

    $expiration_date = strtotime($exp_date);
            $today_date = date("d-m-Y");
            $today_date2 = strtotime($today_date);
            if( $today_date2 > $expiration_date )
            {
            $expired = "yes";
            } else {
            $expired = "no";
            }
    Thread Starter ishanism

    (@ishanism)

    I looked into wp-settings.php, it is in utf-8 mode.

    and there is no custom date() format, i think. All I have changed from default installation of wordpress is timezone, and i have tried reverting it back too.

    Thanks,

    In what context do you use date please? What do you want to display in your page or post? Like you see above, I had to use strtotime, to use date() later for comparison, or a simple echo or print.

    Thread Starter ishanism

    (@ishanism)

    I don’t know any place that date() is used.
    The only date I see in the website is in the post date.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘date.php failed to open stream’ is closed to new replies.