#408 Safe Mode warning: Cannot set environment variable 'TZ'

HEAD_(CVS)
closed
Ross Smith II
PHP Error (166)
5
2003-07-15
2003-07-03
No

My Tiki pages are littered with this message:

Warning: putenv() [function.putenv]: Safe Mode warning:
Cannot set environment variable 'TZ' - it's not in the
allowed list in
/var/www/html/tiki/lib/Date/TimeZone.php on line 256

I assume this is something to do with running PHP safe
mode, which is supposed to prevent environment
variables not prefixed with "PHP_" being set. However,
I am no PHP expert (sorry).

If some could tell me what to set to get rid of this
I'd be very grateful! This program looks absolutely
awesome and I really want to use it! Nice work!

Discussion

  • Logged In: YES
    user_id=543077

    Just thought I'd add a further comment - I am using Mandrake
    9.1 with Apache 2/PHP 4. You can turn off safe mode (causing
    this error) by simply adding the following directive to your
    httpd2.conf (or vhosts, or whatever you have - I have a
    virtual host setup so I added it to the host listing in
    Vhosts.conf):

    php_admin_flag safe_mode off

    Just in case anyone else has this problem :)

    Great software! Thanks!

     
  • Dave Sanders
    Dave Sanders
    2003-07-06

    • labels: --> 544455
    • milestone: --> 316039
     
  • Dave Sanders
    Dave Sanders
    2003-07-06

    Logged In: YES
    user_id=6717

    Updating this item for category / group / subject line or other
    data. No real change to the item, just house-keeping.

     
  • Dave Sanders
    Dave Sanders
    2003-07-06

    • labels: 544455 --> PHP Error
     
  • Dave Sanders
    Dave Sanders
    2003-07-06

    Logged In: YES
    user_id=6717

    Updating this item for category / group / subject line or other
    data. No real change to the item, just house-keeping.

     
  • Ross Smith II
    Ross Smith II
    2003-07-06

    • milestone: 316039 --> HEAD_(CVS)
    • assigned_to: nobody --> rossta
     
  • Ross Smith II
    Ross Smith II
    2003-07-15

    Logged In: YES
    user_id=149899

    You can also turn off the warning by adding:

    safe_mode_allowed_env_vars = TZ,PHP_

    to your php.ini

    or

    php_admin_flag safe_mode_allowed_env_vars "TZ,PHP_"

    to your httpd.conf

    Therefore, I am going to close this "bug".

     
  • Ross Smith II
    Ross Smith II
    2003-07-15

    • status: open --> closed