|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2007-03-22 20:39 UTC] david at acz dot org
 Description: ------------ The internal php_log_err function does not lock the output file. This causes long messages to get mixed together. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 06:00:01 2025 UTC | 
O_APPEND is atomic for a single write. php_log_err uses stdio, so a log entry longer than the stdio buffer size will cause non-atomic writes. Try this: for x in A B; do php -r 'ini_set("error_log","/tmp/test.log");for($i=0;$i<10000;$i++)error_log(str_repeat("'$x'",5000));' & doneA Win32 equivalent... for %x in (1 2) do start php -r "ini_set('error_log','/tmp/test.log');for($i=0;$i<10000;$i++)error_log(str_repeat(%x,5000));" This should all be on 1 line.