Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2005
    Posts
    18
    Plugin Contributions
    0

    link problem ERROR: date.timezone not set in php.ini

    Hi
    Using a Linux dedicated server with fresh install of PHP 5.39

    Cannot run the installer full error message is;
    ERROR: date.timezone not set in php.ini. Please contact your hosting company to set the timezone in the server PHP configuration before continuing.
    I've added the timezone information into the php.ini but the install still isn't able to install zen cart

    Phpinfo here http://205008.com/phpinfo.php

    date
    date/time support enabled
    "Olson" Timezone Database Version 2011.14
    Timezone Database internal
    Default timezone Europe/London
    Last edited by merlin57; 3 Feb 2012 at 02:18 PM. Reason: added php info information

  2. #2
    Join Date
    Mar 2005
    Posts
    18
    Plugin Contributions
    0

    Default Re: ERROR: date.timezone not set in php.ini

    Phpinfo removed as rebuilding server.

  3. #3
    Join Date
    Jan 2004
    Posts
    60,234
    Blog Entries
    4
    Plugin Contributions
    139

    Default Re: ERROR: date.timezone not set in php.ini

    Quote Originally Posted by merlin57 View Post
    ERROR: date.timezone not set in php.ini.
    The message means exactly what it says.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.



  4. #4
    Join Date
    Jul 2009
    Posts
    475
    Plugin Contributions
    0

    Default Re: ERROR: date.timezone not set in php.ini

    Quote Originally Posted by DrByte View Post
    The message means exactly what it says.
    im having this problem but in my php.ini file i have got my timezone set...
    but yet when i do phpinfo it doesn't show my timezone, any idea???
    i may not know how yet, but i soon will....i hope :)

  5. #5
    Join Date
    Jan 2004
    Posts
    60,234
    Blog Entries
    4
    Plugin Contributions
    139

    Default Re: ERROR: date.timezone not set in php.ini

    The test is based on the server's master php.ini, and NOT a localized/override/custom php.ini file.

    Talk to the server administrator for help in fixing the server's master PHP configuration to work correctly.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.



  6. #6
    Join Date
    Apr 2012
    Location
    St. Louis Missouri "Insource to the Midwest!"
    Posts
    1
    Plugin Contributions
    0

    Default Re: ERROR: date.timezone not set in php.ini

    Your site http://205008.com is not loading at all it's redirecting to another site http://www.powerfurniture.com/(also yours?)

    A traceroute to 205008.com verifies your host is in the UK which explains the timezone in the phpinfo. If you ask your host and they are worth their salt (and using virtual hosting on Apache) you should be able to request them to add a custom php.ini file directive to your site's virtual host container:

    <VirtualHost 79.170.43.204:80>
    [...]
    PHPINIDir /var/www/205008.com
    [...]
    </VirtualHost>

    But if it's a truly dedicated server you should be able to edit the php.ini file directly. And not be sharing a server with another customer.
    Last edited by PinkAsterisk; 28 Apr 2012 at 12:51 AM.

  7. #7
    Join Date
    Aug 2012
    Posts
    4
    Plugin Contributions
    0

    Default Re: ERROR: date.timezone not set in php.ini

    Note to php and zen cart experts: Could you please verify this below me and mention any pro's con's to other users!

    Note to any sufferors of date.timezone not set error during instalation:
    Please check for coments below before trying this method, not yet tested fully, only peform thi fix knowing what it affects or by having confirmation from a php/zen cart expert... As I am only 16.. nontheless have a read and coment pro's con's ps- only comment pros cons if 100% sure.. ;)



    Solution:

    Provided that you are able to change the Default timezone or even better the date.timezone in a phpinfo() file via any method other than the global php.ini file.. such as following:


    PHP Code:
    @ini_set('date.timezone''Europe/London'); // to the required php files ie: index.php in the Root, the Admin and the zc_install directories
    //or..
    putenv("TZ='Europe/London");  // to the required php files ie: index.php in the Root, the Admin and the zc_install directories
    //or..
    date_default_timezone_set('Europe/London');  // to the required php files ie: index.php in the Root, the Admin and the zc_install directories
    //or..
    date.timezone America/Chicago in the htaccess in the followingin the Rootthe Admin and the zc_install directories
    //or..
    php_value date.timezone "America/Chicago" in the htaccess in the followingin the Rootthe Admin and the zc_install directories 

    and the result is a changed timezone in phpinfo().. //Note: Check phpinfo() in all directories mentioned above^

    Then you should be able to change this piece of code in ROOT/zc_install/includes/aplication_top.php:

    PHP Code:
    if (PHP_VERSION >= '5.3' && ini_get('date.timezone') == '')
    {
      die(
    'ERROR: date.timezone not set in php.ini. Please contact your hosting company to set the timezone in the server PHP configuration before continuing.');
    } elseif (
    PHP_VERSION >= '5.1') {
      
    $baseTZ date_default_timezone_get();
      
    date_default_timezone_set($baseTZ);
      unset(
    $baseTZ);


    For this one:


    PHP Code:
    if (PHP_VERSION >= '5.1') {
      
    $baseTZ date_default_timezone_get();
      
    date_default_timezone_set($baseTZ);
      unset(
    $baseTZ);


    or.. perhaps even better would be to substitute: // because it checks local settings that would be changed by the five methods mentoned above

    PHP Code:
    if (PHP_VERSION >= '5.3' && ini_get('date.timezone') == ''
    for:

    PHP Code:
    if (PHP_VERSION >= '5.3' && date_default_timezone_get('date.timezone') == ''


    the effect yet to be found.. but what you are infact doing is removing a check that is not necessary, because in live mode one of the five modes mentioned above to change the default timezone of your server will be sufficient to run Zen cart v1.5
    Last edited by robert2721996; 29 Aug 2012 at 12:25 PM. Reason: Looks better ;)

  8. #8
    Join Date
    Dec 2012
    Posts
    1
    Plugin Contributions
    0

    Default Re: ERROR: date.timezone not set in php.ini

    ** spam removed **

 

 

Similar Threads

  1. ERROR: date.timezone not set in php.ini
    By shilo in forum Installing on a Linux/Unix Server
    Replies: 14
    Last Post: 22 Mar 2013, 10:26 PM
  2. date.timezone
    By ettienne in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 29 Aug 2012, 12:29 PM
  3. Replies: 6
    Last Post: 29 Aug 2012, 12:28 PM
  4. date.timezone
    By brandongay in forum Installing on a Linux/Unix Server
    Replies: 16
    Last Post: 30 Oct 2011, 04:36 PM
  5. date.timezone no value
    By prescott86 in forum General Questions
    Replies: 3
    Last Post: 17 Mar 2008, 03:58 PM

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
  •