different timezones in different directories

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • glini

    different timezones in different directories

    Hi all,

    I have a strange problem. Iset up php 5.1.6 on my Solaris10 box and
    after that i get errors on my webbpage:
    "Warning: date() [function.date]: 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_ti mezone_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 had to
    select 'UTC' because your platform doesn't provide functionality for
    the guessing algorithm"
    I searched a little and foun out by setting up date.timezone in php.ini
    it works.
    Bur then I have to recompile php for support of zlib, and after that, I
    get the error again. Now I found out the following:
    # pwd
    /usr/local
    # php -i |grep timezone
    Default timezone =Europe/Luxembourg
    date.timezone =Europe/Luxembourg =Europe/Luxembourg
    #
    # cd ..
    # pwd
    /usr
    # php -i |grep timezone
    Default timezone =UTC
    date.timezone =no value =no value
    How is it possible that, when I'm in /usr/local the settings are OK,
    and in all other location the settings are not.
    Here header output of phpinfo:
    PHP Version 5.1.6

    System SunOS my-web 5.10 Generic_118844-19 i86pc
    Build Date Nov 5 2006 16:24:04
    Configure Command './configure' '--prefix=/usr/local'
    '--with-mysql=/usr/local/mysql
    '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-zlib=/usr/local'

    thanx in advance

  • glini

    #2
    Re: different timezones in different directories

    Hi again,
    I think I have found the problem. It seems my php.ini was not located
    in the right directory, I still can not understand why it worked under
    /usr/local and not elsewhere, but after copying the file in the right
    directory, it works.


    glini schrieb:
    Hi all,
    >
    I have a strange problem. Iset up php 5.1.6 on my Solaris10 box and
    after that i get errors on my webbpage:
    "Warning: date() [function.date]: 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_ti mezone_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 had to
    select 'UTC' because your platform doesn't provide functionality for
    the guessing algorithm"
    I searched a little and foun out by setting up date.timezone in php.ini
    it works.
    Bur then I have to recompile php for support of zlib, and after that, I
    get the error again. Now I found out the following:
    # pwd
    /usr/local
    # php -i |grep timezone
    Default timezone =Europe/Luxembourg
    date.timezone =Europe/Luxembourg =Europe/Luxembourg
    #
    # cd ..
    # pwd
    /usr
    # php -i |grep timezone
    Default timezone =UTC
    date.timezone =no value =no value
    How is it possible that, when I'm in /usr/local the settings are OK,
    and in all other location the settings are not.
    Here header output of phpinfo:
    PHP Version 5.1.6
    >
    System SunOS my-web 5.10 Generic_118844-19 i86pc
    Build Date Nov 5 2006 16:24:04
    Configure Command './configure' '--prefix=/usr/local'
    '--with-mysql=/usr/local/mysql
    '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-zlib=/usr/local'
    >
    thanx in advance

    Comment

    Working...