|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11460 \n or \r\n?
Submitted: 2001-06-13 05:05 UTC Modified: 2001-06-13 13:35 UTC
From: wuxinan at stanford dot edu Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.0.5 OS: Win98
Private report: No CVE-ID: None
 [2001-06-13 05:05 UTC] wuxinan at stanford dot edu
the thing is, my PHP running in CGI PHP and module PHP (PHP running as a module of Apache 1.3.20) have different results. PHP is not portable!

use fread() and .= operation, I read the entire file into a string, and use count(split(string, "\n")); to find out how many lines there. This basically works well if this PHP file is invoked by PHP module.

However, this doesn't work if PHP is running in CGI mode.
I have to change to "\r\n" then the script gives the same result.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-13 13:35 UTC]
Yeah, isn't Windows buggy shit or not? 
Send a bug report to them.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon May 16 14:05:46 2022 UTC