Newsgroups: php.internals,php.internals.win Path: news.php.net Xref: news.php.net php.internals:45463 php.internals.win:600 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80977 invoked from network); 3 Sep 2009 11:10:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Sep 2009 11:10:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.220.212 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 209.85.220.212 mail-fx0-f212.google.com Received: from [209.85.220.212] ([209.85.220.212:53396] helo=mail-fx0-f212.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/00-15081-834AF9A4 for ; Thu, 03 Sep 2009 07:10:49 -0400 Received: by fxm8 with SMTP id 8so596777fxm.23 for ; Thu, 03 Sep 2009 04:10:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:from:date :message-id:subject:to:content-type; bh=POySiQJWdNn5i2RIM6XzjIHgsBORDYQIRLtiPfoh6iA=; b=GjVTXRx3fC6zSQNl2niITEGuodzE1JcMC8ZxnCGPwsA4UUgD0xj19THuVt6hhL142x z+8UTewprzqXozz2hUCMmMdZtuWps2X+hb62oOZyFYTdHByY2IxEkbComyT0l15IGspA iz0NMfbK/ElxTF/wi+ie62Y57avtuccytO0jM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:from:date:message-id:subject:to:content-type; b=fs7QL//4PL6K8eMoSwDw3JXzJlaFgaev4Vk4004GL0WjVzaQUyGUu97kuaIuZMtUh1 3Uv1F5GRTvwSAZRZ9QBmfzdhtmJHA9ku0J6dI2Pg4Po4aQR+Y0qgYvTOKeyPmWHBh9ff +xy4KklVxPHrPekBLfvMumTLK2KJYNQUJ3TOo= MIME-Version: 1.0 Received: by 10.223.4.150 with SMTP id 22mr3916651far.38.1251976245077; Thu, 03 Sep 2009 04:10:45 -0700 (PDT) Reply-To: RQuadling@googlemail.com Date: Thu, 3 Sep 2009 12:10:25 +0100 Message-ID: <10845a340909030410i6be64e8aod5bc491a333f69d6@mail.gmail.com> To: PHP internals , internals-win@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Timezone for php_error_log. From: rquadling@googlemail.com (Richard Quadling) Hi. I've been playing with the MS SQL Server driver (https://sqlsrvphp.svn.codeplex.com/svn). Using this code (editing it to work with the default WinResrc.h rather than the winres.h it is currently asking for) ... AND ... turning on the logging via the ini file (as I was playing I just wanted to see what was logged) ... sqlsrv.LogSeverity = -1 sqlsrv.LogSubsystems = -1 sqlsrv.WarningsReturnAsErrors = On The log file shows entries like ... [03-Sep-2009 11:55:11] PHP Warning: PHP Startup: Unable to load dynamic library 'C:/PHP5/ext\php_curl.dll' - The operating system cannot run %1. in Unknown on line 0 [03-Sep-2009 11:55:11] PHP_MINIT_FUNCTION for php_sqlsrv: entering [03-Sep-2009 10:55:11] sqlsrv: entering rinit [03-Sep-2009 10:55:11] sqlsrv.WarningsReturnAsErrors = On [03-Sep-2009 10:55:11] sqlsrv.LogSeverity = 255 [03-Sep-2009 10:55:11] sqlsrv.LogSubsystems = 255 [03-Sep-2009 10:55:11] sqlsrv: entering rshutdown In changing /* $Id: main.c 286478 2009-07-29 00:17:10Z stas $ */ ... error_time_str = php_format_date("d-M-Y H:i:s", 11, error_time, php_during_module_startup() TSRMLS_CC); to error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, php_during_module_startup() TSRMLS_CC); the log file now looks like ... [03-Sep-2009 11:55:11 Europe/London] PHP Warning: PHP Startup: Unable to load dynamic library 'C:/PHP5/ext\php_curl.dll' - The operating system cannot run %1. in Unknown on line 0[03-Sep-2009 11:55:11 Europe/London] PHP_MINIT_FUNCTION for php_sqlsrv: entering [03-Sep-2009 10:55:11 UTC] sqlsrv: entering rinit [03-Sep-2009 10:55:11 UTC] sqlsrv.WarningsReturnAsErrors = On [03-Sep-2009 10:55:11 UTC] sqlsrv.LogSeverity = 255 [03-Sep-2009 10:55:11 UTC] sqlsrv.LogSubsystems = 255 [03-Sep-2009 10:55:11 UTC] sqlsrv: entering rshutdown I'm not too sure what's going on. I think it has something to do with php_during_module_startup(), but I can't work out when the response to this function will ever change as it returns a static int value. The above logs were created using date.timezone=Europe/London and calling ... php -m This gets a little odder when I use ... php -d date.timezone=Europe/Berlin -m The output is now ... [03-Sep-2009 12:05:40 Europe/London] PHP Warning: PHP Startup: Unable to load dynamic library 'C:/PHP5/ext\php_curl.dll' - The operating system cannot run %1. in Unknown on line 0 [03-Sep-2009 13:05:41 Europe/Berlin] PHP_MINIT_FUNCTION for php_sqlsrv: entering [03-Sep-2009 11:05:41 UTC] sqlsrv: entering rinit [03-Sep-2009 11:05:41 UTC] sqlsrv.WarningsReturnAsErrors = On [03-Sep-2009 11:05:41 UTC] sqlsrv.LogSeverity = 255 [03-Sep-2009 11:05:41 UTC] sqlsrv.LogSubsystems = 255 [03-Sep-2009 11:05:41 UTC] sqlsrv: entering rshutdown Don't worry about the specifics of the curl error - this isn't my issue. I would suggest that the datetime extension needs to be loaded before the curl library request as I assume this will get the timezone I've supplied (Europe/Berlin). I'm just not sure about the sqlsrv timezone though at all. Why isn't this Europe/something rather than UTC? Regards, Richard. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling