Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9015375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:44:09+00:00 2026-06-16T03:44:09+00:00

I am using the following on all my index.php files to include a global

  • 0

I am using the following on all my index.php files to include a global footer:

<?php include($_SERVER['DOCUMENT_ROOT'].'/_footer.php'); ?>

The _footer.php file itself doesn’t have much content apart from the PHP to return the current year:

    <div class="footer">
        <p id="left">Company Address</p>
        <p id="right">Copyright <?php echo date("Y"); ?> Company Incorporated</p>
    </div>

</div> <!-- end .wrapper -->

</body>
</html>

While the above code works when uploaded to the web server, it does not work in my localhost (Mac OS X with Coda 2) and I get the error message:

WARNING: DATE() [FUNCTION.DATE]: IT IS NOT SAFE TO RELY ON THE SYSTEM’S TIMEZONE SETTINGS. YOU ARE REQUIRED TO USE THE
DATE.TIMEZONE SETTING OR THE DATE_DEFAULT_TIMEZONE_SET() FUNCTION. IN
CASE YOU USED ANY OF THOSE METHODS AND YOU ARE STILL GETTING THIS
WARNING, YOU MOST LIKELY MISSPELLED THE TIMEZONE IDENTIFIER. WE
SELECTED ‘UTC’ FOR ‘GMT/0.0/NO DST’ INSTEAD IN
/USERS/USER/SITES/COMPANY/EXAMPLE.COM/_FOOTER.PHP ON LINE 3

I would posit that it wouldn’t be such a problem to set the timezone or not (since it’s a simple function designed to show the year only), but it breaks the design of the footer when local testing:

enter image description here

All the text (e.g. “COPYRIGHT”) is meant to be inside that yellow box.

What should I do in this case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:44:10+00:00Added an answer on June 16, 2026 at 3:44 am

    Have you read the error message? It quite clearly states that it is not safe to rely on the system’s timezone settings, and that you are required to use the Date.Timezone setting or the date_default_timezone_set() function.

    So, do one or the other.

    Either a) Modify your php.ini to have this:

     date.timezone=Europe/London
    

    or b) Call this above your call to date() (or in a globally included script):

    date_default_timezone_set('Europe/London');
    

    Obviously, Europe/London should be replaced with your actual timezone identifier of which a list is available here: http://php.net/manual/en/timezones.php

    Just an additional note, if it’s not showing on your server it’s because either display_errors is disabled, or your error reporting level is lower than it is in your development machine, which it certainly should be.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a CMS that sends all requests to an index.php file using the
I'm using the following PHP code to list all files and folders under the
I'm currently using the following PHP code: // Get all subordinates $subords = array();
I am using the following to try and list all the files in a
In PHP when we include or require some file using some initializers like the
I currently have the following htaccess <IfModule mod_rewrite.c> # redirect all calls to index.php
I have the following rule that redirects all traffic to index.php when public folder
Am using Zend framework along with zend studio. Am confused with following files 1)Bootsrap.php
I want to hide index.php from the URL but it doesn't work at all.
I am currently using the following to forward all incoming traffic to the cms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.