-1

First off, I just want to say that I read this thread and it didn't help. Here's my situation:

I'm using vhosts as configured in /etc/apache2/extra, and I have this in each entry:

ErrorLog "/path/to/error_log"

The error_log commands absolutely write to the proper error logs and properly ignores the error_log location in php.ini, but any line breaks appear as "\n" and the text from the arrays just run on; I really need it to be formatted properly.

Is there a way to enable real line breaks in error logs when using separate locally-hosted sites, or am I just going to have to deal with this? FWIW, this happens for me on both my OSX Lion and OSX Yosemite machines. The aforementioned thread, btw, specifically addresses using the default error_log location as directed in php.ini, which again, is not what I'm doing.

Community
  • 1
  • 1
dauber
  • 330
  • 6
  • 20
  • How are you viewing these logs? – AbraCadaver Apr 12 '15 at 03:45
  • I've tried the OSX preview function (that is, highlight the file and hit the space bar) -- which is the way I'd prefer to do it, it's quick and easy and doesn't require any terminal input that pushes up some vital info I need to look at -- but I also tried TextEdit, TextWrangler, and Console. – dauber Apr 12 '15 at 03:51
  • Seriously? Why the down vote on this? I could not find an answer to this or else I wouldn't have posted it. – dauber Apr 16 '15 at 11:42

1 Answers1

0

Got a solution, thanks to macrumors.com!

In the httpd-vhosts.conf file, in the entry for the site, I need to add this command:

php_value error_log "/path/to/error.log"

Then do a chown www on the file.

Success!

dauber
  • 330
  • 6
  • 20