Errno: 2 error after updade to php 5.3.2

Discussion in 'PHP' started by rasika175, Jun 14, 2010.

  1. #1
    Hi...

    my hosting providers has update there php vesion to 5.3.2 . now i am getting an error on my website user page in user profile as below i am using memht portel 4.0.1

    Warning
    Errno: 2
    File: /hsphere/local/home1/mydomain.com/pages/users/index.php
    Line: 836
    Function: changeProfile
    Note: changeProfile(): 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


    Can anyone please help me to fix this issue I have attached the user/ index.php
     

    Attached Files:

    rasika175, Jun 14, 2010 IP
  2. Pudge1

    Pudge1 Well-Known Member

    Messages:
    912
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    140
    Digital Goods:
    1
    #2
    You need to change the function changeProfile() so it is using date_default_timezone()
     
    Pudge1, Jun 14, 2010 IP
  3. rasika175

    rasika175 Active Member

    Messages:
    129
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Thanks pudge..but i don't know where to find this php sring to change i search in the user index.php i couldn't find it
     
    rasika175, Jun 14, 2010 IP
  4. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #4
    The variable $siteConfig might have something to do with it and its just a guess that you will find this variable in a config.php file, if you find it, post the details of that line so we can help you further...

    However you should note that this Warning message your getting is just a warning and php already made an alternative timezone suggestion which is most likely the servers timezone, so as long as everything is working you could turn off warning messages.

    
    // Turn off all error reporting
    error_reporting(0);
    
    PHP:
     
    MyVodaFone, Jun 14, 2010 IP
  5. sijumpk

    sijumpk Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Its not good to turn of all error reporting if the site is still under development. Its better to turnoff warnings only by using ini_set function. Other wise any error occurs it make a blank page only.
     
    sijumpk, Jun 15, 2010 IP