SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Location
    Hertfordshire
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    setting date.timezone in php.ini

    Hi

    I am a nooby to PHP and have been doing ok untill I tried to run some scripts using the mail() function.

    the error I am currently getting is :
    An error occurred in script 'C:\Inetpub\MyCPD\example\forgot_password.php' on line 47:
    mail() [function.mail]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/London' for '1.0/DST' instead
    Date/Time: 9-2-2006 07:14:05
    I have lloked at the PHP scripts but cannot figure this out.

    my php.ini currently has the following:

    [Date]
    ; Defines the default timezone used by the date functions
    ;date.timezone =
    which shows this is commented out - the default setting I think as this is how it installed.

    does any one know what i need to set up here or use in my code to stop this error?

    my set up is PHP5 with MySQL 4 running on windows IIS5 on my localhost.

    Thanks
    GreenBoy

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    Morning, have a look at:
    http://www.phplivesupport.com/docume...&aid=100&pid=3

    for the solution and relevant links

    Spike
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Location
    Hertfordshire
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks SpikeZ - this has done the trick!

  4. #4
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    Great, Happy to help
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •