php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3148 access violation in kernel32.dll when running scripts with date/gmdate function
Submitted: 2000-01-08 14:21 UTC Modified: 2000-08-15 09:34 UTC
From: zimpel at t-online dot de Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Beta 3 OS: Windows 95B
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zimpel at t-online dot de
New email:
PHP Version: OS:

 

 [2000-01-08 14:21 UTC] zimpel at t-online dot de
build:
PHP4TS.DLL

MSVC++ 5 settings:
NDEBUG,_WINDOWS,_USRDLL,PHP4DLLTS_EXPORTS,MSVC5,PHP_EXPORTS,LIBZEND_EXPORTS,
TSRM_EXPORTS,SAPI_EXPORTS,ZTS,WIN32,_MBCS,ZEND_DEBUG=0

test script:
<HTML><BODY>
<? gmdate("U"); ?>
</BODY></HTML>

reason:
reentrancy.c - local_lock(GMTIME_R);
GMTIME_R wasn't initialized due to missing call of reentrancy_startup

To fix:
Suggest changes in SAPI.C

SAPI_API void sapi_startup(sapi_module_struct *sf)
{
	sapi_module = *sf;
	zend_hash_init(&known_post_content_types, 5, NULL, NULL, 1);
	sapi_register_post_readers(supported_post_content_types);
#ifdef ZTS
	sapi_globals_id = ts_allocate_id(sizeof(sapi_globals_struct), NULL, NULL);
#if defined(PHP_NEED_REENTRANCY)
	reentrancy_startup();
#endif
#endif
	php_global_startup_internal_extensions();
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-25 19:53 UTC] zak@php.net
Have you tried using a more recent release of php?
If so, does the problem still occur?
 [2000-08-15 09:34 UTC] waldschrott@php.net
Closed due to missing user feedback.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 12:00:01 2026 UTC