...

View Full Version : No line breaks in my error outputs



DrWily
08-28-2011, 05:56 AM
This is what my error message looks like. There's no line breaks in it. I have to view the source to read it.


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.

Fou-Lu
08-28-2011, 06:27 PM
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.

DrWily
08-29-2011, 09:38 AM
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/'.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum