Web Analytics Made Easy -
StatCounter No line breaks in my error outputs - CodingForum

Announcement

Collapse
No announcement yet.

No line breaks in my error outputs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • No line breaks in my error outputs

    This is what my error message looks like. There's no line breaks in it. I have to view the source to read it.

    Code:
    Warning: include(includes/config.php): failed to open stream: No such file or directory in /home/wax/NetBeansProjects/php_login/includes/login.php on line 13 Warning: include(): Failed opening 'includes/config.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/wax/NetBeansProjects/php_login/includes/login.php on line 13 Warning: include(includes/db.php): failed to open stream: No such file or directory in /home/wax/NetBeansProjects/php_login/includes/login.php on line 14 Warning: include(): Failed opening 'includes/db.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/wax/NetBeansProjects/php_login/includes/login.php on line 14 Warning: include(views/v_login.php): failed to open stream: No such file or directory in /home/wax/NetBeansProjects/php_login/includes/login.php on line 16 Warning: include(): Failed opening 'views/v_login.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/wax/NetBeansProjects/php_login/includes/login.php on line 16
    Edit: I don't want help with the error itself, I only want to know why there's no line breaks in the output.
    Last edited by DrWily; Aug 28, 2011, 01:13 AM.

  • #2
    Okay.
    If the source itself shows the linefeeds, and the browser does not its a simple problem: ini setting html_errors is 0. You can turn that on in any location, though I'd recommend using it from the php.ini. All this does is convert the \n between the errors into an nl2br format with <br />\n.
    If the source does not show the line feeds, I'm guessing that will be a problem with the charset within the file or pushed by the server. I've never seen it push without the linefeeds before, but do be careful if you move between linux and windows systems since they do handle linefeeds differently.

    Otherwise, there is no real problem with having it the way it is.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

    Comment


    • #3
      Originally posted by Fou-Lu View Post
      Okay.
      If the source itself shows the linefeeds, and the browser does not its a simple problem: ini setting html_errors is 0. You can turn that on in any location, though I'd recommend using it from the php.ini. All this does is convert the \n between the errors into an nl2br format with <br />\n.
      If the source does not show the line feeds, I'm guessing that will be a problem with the charset within the file or pushed by the server. I've never seen it push without the linefeeds before, but do be careful if you move between linux and windows systems since they do handle linefeeds differently.

      Otherwise, there is no real problem with having it the way it is.
      Thanks, this worked. You also have to restart apache after changing php.ini. If in Ubuntu, you change the php.ini in '/etc/php5/apache2/'.

      Comment

      Working...
      X