Technical article 127091

I am getting a warning from php while installing/using a web-based application

OpenServer 6.0.0UnixWare 7.1.4

Written · Last revised

Problem

I am installing a web-based application into my web servers' document root directory (see your httpd.conf file for further details). While running the installation script I get the following warning:

Warning [2] 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_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 had to select 'UTC' because your platform doesn't provide functionality for the guessing algorithm - Line: 134 - File: install/resources/output.php PHP 5.2.3

If you receive the above error message, this is due to latest PHP5 date() function rewrite.

Solution

To solve this issue, simply edit your php.ini file and set your date.timezone value (/usr/lib/php/php.ini). Change the line

;date.timezone =

to your timezone. Valid timezone can be found here:

http://us3.php.net/manual/en/timezones.php
For example change it to:
date.timezone = Europe/Berlin

Save the file and restart your web server:

# /etc/rc2.d/P90apache restart

From the Xinuos technical article database, record 127091. Reproduced with permission. The original is at www.sco.com/ta/127091, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.