php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36819 putenv("TZ") frequent will cause the apache crash
Submitted: 2006-03-22 04:33 UTC Modified: 2006-04-25 01:00 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: liber at iproom dot com Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.1.3RC2 OS: win32 only
Private report: No CVE-ID: None
 [2006-03-22 04:33 UTC] liber at iproom dot com
Description:
------------
if putenv("TZ=some time zone") then
putenv("TZ=")
will cause the apache crash.

this only occur if this commmand executes frequent,
and only on Windows platform.

Reproduce code:
---------------
<?php

putenv("TZ=CST-8");
putenv("TZ=");
echo time();
?>

Expected result:
----------------
display the timestamp

Actual result:
--------------
if executes frequent and quickly (maybe more than 20-30 times)
the apache will popup crash messages.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-22 04:35 UTC] liber at iproom dot com
if continue executes after the crash messages popup,
after fews times executions, it shows following messages:


Warning: Unknown: failed to open stream: Invalid argument in Unknown on line 0

Warning: Unknown: Failed opening 'C:\Projects\test\tz.php' for inclusion (include_path='.;C:\php5\pear') in Unknown on line 0
 [2006-03-22 09:27 UTC] judas dot iscariote at gmail dot com
Im unable to reproduce this in the current CVS version on linux
 [2006-03-22 09:58 UTC] liber at iproom dot com
This is occurred only on Windows platform.
 [2006-03-22 10:16 UTC] liber at iproom dot com
I tested 5.1.3RC2-dev, still the same situation as 5.1.2
 [2006-03-22 10:26 UTC] derick@php.net
Besides this, you should not use putenv("TZ to set the timezone anyway as this is bound to cause problems as apache on windows is threaded. Use date_default_timezone_set().
 [2006-04-17 22:16 UTC] sniper@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2006-04-25 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Aug 04 02:00:02 2025 UTC