|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-12-20 04:02 UTC] timvandermolen at hotmail dot com
In the PHP log, new lines are defined only with ASCII 10 (LF), but Windows only recognizes ASCII 13 + ASCII 10 (CRLF) as a new line. This makes the PHP log look like a mess on Windows systems. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 01:00:01 2025 UTC |
now this is strange ... the following snippet from php4/main/main.c (around line 300) does the actual logging and as it does *not* open the logfile in binary mode it should automaticly convert '\n' to whatever the local platform prefers??? log_file = VCWD_FOPEN(PG(error_log), "a"); if (log_file != NULL) { time(&error_time); strftime(error_time_str, 128 , "%d-%b-%Y %H:%M:%S" , php_localtime_r(&error_time, &tmbuf)); fprintf(log_file, "[%s] ", error_time_str); fprintf(log_file, "%s", log_message); fprintf(log_file, "\n"); fclose(log_file); return; }