The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

date_default_timezone_set() function.

Discussion in 'General Discussion' started by phild, Jul 3, 2014.

  1. phild

    phild Member

    Joined:
    Dec 2, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    hi,
    I am getting the following error when trying to checkout of my shopping cart.

    Warning: 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/qawebhos/public_html/offer/cwhoiscart.php on line 2558

    I have googled a solution and they all pretty much say do the same thing, add the folllowing to php.ini

    [Date]
    ; Defines the default timezone used by the date functions
    ; PHP: Runtime Configuration - Manual
    date.timezone = America/New_York

    or a variation on that theme.
    I have done that - in roots php.ini and the accounts php.ini and it made no difference. I emailed the support guy at the cart I use and he said add it to file that comes with the cart and I did - no difference.

    Any help anyone could offer would be most welcomed.
    Thanks in advance,
    Phil.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Do you have root access to this server? If so, please post the output from:

    Code:
    grep date.timezone /usr/local/lib/php.ini
    Also, which PHP handler are you using (e.g. suPHP, DSO)?

    Thank you.
     
  3. phild

    phild Member

    Joined:
    Dec 2, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    thanks for replying so swiftly.

    root [/]# grep date.timezone /usr/local/lib/php.ini
    ; PHP: Runtime Configuration - Manual
    date.timezone = America/New_York
    root [/]# _
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hi,

    Could you provide more information about the other question?

    Thank you.
     
  5. phild

    phild Member

    Joined:
    Dec 2, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Sorry, I only just noticed the second question!

    Option Configured Value
    Default PHP Version (.php files) 5
    PHP 5 Handler suphp

    Apache suEXEC on
    Apache Ruid2 off
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Try disabling the php.ini files within the account. Ensure you check within the account's root directory, the public_html directory, and any subdirectories that include content from this script. You can disable them by simply renaming them.

    Thank you.
     
  7. phild

    phild Member

    Joined:
    Dec 2, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Brilliant - sorted. Thank you so much. As you can imagine it could probably have affected sales - you made a very important catch. It is greatly appreciated.
    Great work.
    All the best
    Phil.
     
Loading...

Share This Page