|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-05-02 17:52 UTC] xdanny at email dot cz
My environment is PHP 4.3.2 RC1 on W2K with IIS ISAPI module. Don't exactly know - I only suppose that this problem is related more to Date function than to IIS - i don't have enough systems to test on. In normal situation you should have all constants set up, thats true, but if any of your customers run wrong script on your server machine, he could cause crash of whole IIS. The symptom is simple: If you use not defined constant in date format parameter of Date() function it causes Access violation and crashes IIS. PHP has encountered an Access Violation at 014FD4EB A script causing PHP <?php //define(DATEFORMAT, 'Y/m/d'); $timestamp = Time(); $today = Date(DATEFORMAT, $timestamp); echo "Hi, today is $today"; ?> PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 05:00:01 2025 UTC |
This probably happens because the engine accepts unquoted word when it's alone. It takes it as $today = date('DATEFORMAT',$timestamp); Yes this is ugly but I don't think this can be changed if we dont want to break BC again. Btw if you try $today = date(DATEFORMAT LOL,$timestamp); It will parser error but not with only one word.