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.

A PHP Error was encountered

August 15, 2011 5:28am

Subscribe [2]
  • #1 / Aug 15, 2011 5:28am

    rankstar

    5 posts

    Hallo,
    In the last step of installation I have this warning repeated for 10 times, from the page 62 to page 71:

    A PHP Error was encountered

    Severity: Warning

    Message: 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 ‘Europe/Paris’ for ‘2.0/DST’ instead

    Filename: agile_records/default_content.php

    Line Number: 63

    and after the installation, only in the admin pages, I have this PHP warning:

    A PHP Error was encountered

    Severity: Warning

    Message: date_default_timezone_get() [function.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 ‘Europe/Paris’ for ‘2.0/DST’ instead

    Filename: libraries/Core.php

    Line Number: 227

    who can tell me why?
    Thanks in advance….

  • #2 / Aug 15, 2011 3:12pm

    Dan Decker

    7338 posts

    Hello rankstar and welcome to the Forums!

    I’m sorry to see you’ve run into this trouble. You’re seeing these errors as a result of PHP not being able to successfully determine your server’s timezone setting. You will need to contact your hosting provider and make sure they have the correct timezone set for your server. If they are unable to help you, there may be some php.ini directives we can point you at that can override/fix the issue.

    Let us know what they say,

    Cheers,

  • #3 / Apr 25, 2012 7:20pm

    Moosie

    11 posts

    I keep a copy of an old blog on my local machine, using MAMP.

    I went to look up an entry I wrote a zillion years ago and it went kablooey…

    My site loads with the following errors:
    1)Warning: date_default_timezone_get() [function.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/New_York’ for ‘EDT/-4.0/DST’ instead in /Applications/MAMP/htdocs/left/system/core/core.system.php on line 528

    2) include(/home/pmh2450/public_html/google.inc)[function.include] failed to open stream: No such file or directory.

    I looked at the php.ini and manually set the timestamp there to America/New_York since that’s what it was whining about. Then, I dug into the EE code. I’m smart enough to know I don’t understand what’s going on in the EE code that might be conflicting…

    Also, I don’t know if anyone else caught the location of my missing include file—I haven’t hosted with pMachine (now engine) hosting since around 2006.

    When I try to log into the site and yank the reference to the include in my templates, I can’t log in. I get the timestamp error and then “Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/left/system/core/core.system.php:528) in /Applications/MAMP/htdocs/left/system/core/core.functions.php on line 752”

    Any ideas?

    >..<

  • #4 / Apr 26, 2012 5:00pm

    Dan Decker

    7338 posts

    Hi Moosie,

    Thanks for posting your questions!

    What version of ExpressionEngine do have running locally? What version of PHP is running in your MAMP?

    2) include(/home/pmh2450/public_html/google.inc)[function.include] failed to open stream: No such file or directory.

    You said you have that somewhere in a template? Do you have templates as files? You can also look at them in the database at exp_templates.

    i look forward to your reply!

    Cheers,

     

  • #5 / Apr 30, 2012 2:39pm

    Moosie

    11 posts

    What version of ExpressionEngine do have running locally? What version of PHP is running in your MAMP?

    2) include(/home/pmh2450/public_html/google.inc)[function.include] failed to open stream: No such file or directory.

    You said you have that somewhere in a template? Do you have templates as files? You can also look at them in the database at exp_templates.

     

    Sorry it took me so long to reply - I’ve been away from the computer that hosts the server.

    I’m running 1.74 locally - all the domains across my local server were just updated.

    MAMP is running PHP 5.3.6

    I do not have the templates as files - they’re all buried in EE and at this point, I’m not savvy enough to feel comfortable poking around in the databases. I know just enough PHP/MySQL to do the ee install, but that’s where it ends.

  • #6 / May 01, 2012 11:13am

    Dan Decker

    7338 posts

    Hi Moosie,

    I know just enough PHP/MySQL to do the ee install, but that’s where it ends.

    No worries!

    There is an easy way to get a look without taking any risks. If you want, you can open your MAMP start page and launch PHPMyAdmin and just browse the table and look for the reference.

    Do you have access to a live version of this site too? With it on your localhost, we are limited in being able to help hands-on, but if you have a live version, you can try recreating a fresh copy on your local server.

    Cheers,

  • #7 / May 05, 2012 8:55am

    Moosie

    11 posts

    Here’s my progress—
    Got rid of the google include. (That was an adventure! My PHPAdmin file thingy was buried - I couldn’t access it from the MAMP start page.)

    I have three old blogs I’ve moved and I’m moving another today… I store them locally right before I close my hosting account, so I don’t have any existing copies live on teh interwebs.

    Can’t log into two of the control panels. The third refuses to access the stylesheet.

    I’m still getting the timestamp error.

    I’m still getting the cannot modify header error.

    This is absolutely ridiculous.I didn’t have this problem before I upgraded EE locally. If there’s anyone out there who can help me, I’ll gladly share my LogMeIn user name and password.

  • #8 / May 07, 2012 5:47pm

    Dan Decker

    7338 posts

    Hi Moosie,

    I’m sorry for the frustration!

    Since you are essentially Moving ExpressionEngine to Another Server, make sure you have checked all the points in that outline.

    Make sure you set your domain, URLs and paths to reflect the move to localhost.

    I’m happy to keep troubleshooting this with you and I look forward to your reply!

    Cheers,

  • #9 / May 19, 2012 7:02pm

    Moosie

    11 posts

    Hi Dan,

    It forever to find the time to sit down and work through this. (In case it may help someone else, I’m posting the solution here.)

    I don’t know why all my google searching prior to my original post didn’t come up with this: Bug Report - Timezone error in the backend

    Putting the ‘@’ in front of the date_default_timezone_set solved ALL of my problems.

    I could get into all my control panels, the blogs looked lovely…

    Also - if you’re using MAMP with a standard install, your root is “/Applications/MAMP/htdocs/”

    (This sort of thing is exactly why I’m an accountant and not a full time web designer!)

    >..<

  • #10 / May 23, 2012 3:27pm

    Dan Decker

    7338 posts

    Hi Moosie,

    Thanks for posting your solution!

    If you need anything else, just let us know!

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases