Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2009
    Posts
    22
    Thanks
    2
    Thanked 0 Times in 0 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; 08-28-2011 at 06:13 AM.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    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.

  • #3
    New Coder
    Join Date
    Jan 2009
    Posts
    22
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote 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/'.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •