ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

PHP Timezone Error / Control Panel Not Fully Functioning

September 20, 2011 9:29pm

Subscribe [3]
  • #1 / Sep 20, 2011 9:29pm

    Jack Tse

    67 posts

    This question may be related to a resolved thread.

    Hi All! I got this message after installing a fresh EE 2.2.2 on a MS IIs server.

    It is on the top of my control panel after I log in.

    I googled it and it looks like it can be resolved by editing some files:
    http://ellislab.com/forums/viewthread/164019/

    But I am not a PHP programmer so I don’t know how to fix. Please help me fix this issue:

    A PHP Error was encountered
    
    Severity: Warning
    
    Message: date_default_timezone_get(): 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 'America/Los_Angeles' for '-7.0/DST' instead
    
    Filename: libraries/Core.php
    
    Line Number: 227


    My other issue is my main links in my control panel nav (top) are not functioning and my templates are not linking. I looked at my phpinfo.php file to find the correct path to the themes folder but it is not taking.

    The fonts in the control panel forms (seems like it is just the forms) are twice as large as usual for some reason. Something is not linking up?

    Thanks!

  • #2 / Sep 21, 2011 11:22am

    Mark Bowen

    12637 posts

    Hi Jack,

    Okay let’s take the items one at a time here if we may.

    The error about the default timezone can be fixed by making a change in your php.ini file.

    A lot of hosts don’t allow you to have access to this file so you would need to contact them and let them know about this error to see if they will change that for you on your site.

    Does that help on that matter?

    Thanks,

    Mark

  • #3 / Sep 21, 2011 1:28pm

    Jack Tse

    67 posts

    Thanks Mark,

    I found the php.ini file after googling and looking inside my phpinfo.php file. (For everybody out there who has never heard of this file)

    For everybody else out there who has no experience with php.ini files; this guy has shared a step by step process to fix this issue in another EE Forum thread:

    http://ellislab.com/forums/viewthread/192532/

    4: Open php.ini in your editor, for example by dragging it to the editors icon in the Dock.


    5: Do a search for [Date] and find these lines:

    [Date]
    ; Defines the default timezone used by the date functions
    ; <a href="http://php.net/date.timezone">http://php.net/date.timezone</a>
    ; date.timezone =


    6: Edit the last line, so you remove the semi-colon in front of it (this un-comments the line, making it active) and so you include your local timezone, like so:

    [Date]
    ; Defines the default timezone used by the date functions
    ; <a href="http://php.net/date.timezone">http://php.net/date.timezone</a>
    date.timezone = "Europe/Copenhagen"

    7: Replace Europe/Copenhagen with your own timezone, and then save the file. Enter your password if/when the text editor asks you. You need to authenticate, because the php.ini file is in a directory that needs authentication. Make sure you save the file as php.ini and not as a new file with another filename.

     


    EDIT: For our server, we had to un-comment all three lines for it to work (not just the last one).

  • #4 / Sep 21, 2011 3:26pm

    Jack Tse

    67 posts

    UPDATE:

    I fixed it by re-uploading the themes folder.

    In particular with my Windows PC - Not sure if this is what did it but it works now.

    Moral of story - charge more if the client is on MS IIs servers.

    Be prepared for it!

    ________________________

    Now my other issue… please help!


    The control panel after fixing the php.ini files is back to normal looking now. However, the top nav menus are not dropping down! Does anybody know what this is a symptom of if it appears normal but the links are not dropping down?

    I went into my phpinfo.php and also looked at Tools < Utilities > PHP Info and looked for the server paths.

    I tried them as well as multiple combos and nothing is working!


    This is on a MS IIs server but does that matter? Directories are directories right?


    Also, in my research - I noticed it might be a binary/text upload issue? Can it be? Why would everything else work except for the dropdown?

    Thanks!

  • #5 / Sep 22, 2011 3:21pm

    Kevin Smith

    4784 posts

    Hi Jack,

    Glad to hear you figured out the problem and were able to take care of it. Is there anything else in this thread that we can help with?

  • #6 / Sep 22, 2011 3:44pm

    Jack Tse

    67 posts

    Nope, thanks! Close it up.

  • #7 / Sep 23, 2011 7:14pm

    Mark Bowen

    12637 posts

    Hi Jack,

    Glad to hear you got this sorted. Thanks for letting us know.

    If anything else crops up then please don’t hesitate to post again as needed.

    Thanks,

    Mark

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases