#17839: php5: Newlines showing as "\n" in Apache error log ----------------------------------------+----------------------------------- Reporter: simon@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: invalid | Keywords: php5, error log, newlines Port: php5 | ----------------------------------------+----------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => invalid Comment: Sorry, I misunderstood the problem before. The title of the ticket said "PHP error logs" and the summary says "the error log" so I assumed you meant the PHP error log, the one you set with the error_log directive in the php.ini. After running [comment:3 your code from above], I see this in my PHP error log: {{{ [28-Jan-2009 16:46:04] Array ( [0] => blue [1] => red [2] => orange [3] => apple ) }}} However, I now see that [comment:3 you said "Apache error log" later], which is of course a different thing. If I remove the error_log directive from my php.ini and restart Apache and run your code again, then in my Apache error log, I see: {{{ [Wed Jan 28 16:47:30 2009] [error] [client ::1] Array\n(\n [0] => blue\n [1] => red\n [2] => orange\n [3] => apple\n)\n }}} This is probably not a bug and is in fact intentional. There are web server log analyzers out there which undoubtedly assume that each line of the log is a request; if PHP were to be allowed to insert newlines into the log, such analyzers wouldn't be able to work properly. So I'm going to close this ticket as "invalid" (which is our issue tracker's way of saying "not a bug"). If you need further information on this, someone in a PHP support channel would probably be better able to help you than I. -- Ticket URL: <http://trac.macports.org/ticket/17839#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS