1

When I uploaded my site to the server I got these errors.

Warning: Cannot modify header information - headers already sent by (output started at /home/content/j/o/u/jou/html/biggydaddy/wp-config.php:25) in /home/content/j/o/u/jou/html/biggydaddy/wp-login.php on line 12

I understand the reasons behind them, but in my localhost this warning not shown.

How do I display those errors?

Taz
  • 3,718
  • 2
  • 37
  • 59
8055
  • 48
  • 1
  • 7
  • make sure you have configure the site well and plz share the site url – Pramod Kumar Sharma Jul 03 '12 at 05:19
  • 1
    possible duplicate of [PHP: How do I enable error reporting?](http://stackoverflow.com/questions/6575482/php-how-do-i-enable-error-reporting) – mario Jul 03 '12 at 05:24
  • What are you using for your server on your computer? (MAMP, WAMP, XAMPP, etc.) – Nathan Jul 03 '12 at 05:35
  • I have been receiving this same error on an actual server, but not on my localhost. Error reporting has been turned on etc, I found out where it was but would love to have this displayed locally if anyone knows... (This was using XAMPP) – Jish Jan 28 '13 at 22:01

5 Answers5

2

1)This error comes when you print any thing before php hreader command

Please check for any echo or print / print_r .. (or may be White Space)
2) You need to set both error_reporting and display_errors. These can be set in php.ini, in Apache (if you're using PHP as an Apache module) or during run-time, though if you set it during run-time then it won't effect some types of errors, such as parse errors.

Bhavin Rana
  • 1,554
  • 4
  • 20
  • 40
  • error_reporting = E_ALL | E_STRICT and display_errors = On also restarted Apache still no warning.. – 8055 Jul 03 '12 at 05:46
1

Be sure that you have set output_buffering=Off for showing error on localhost you have to set output_buffering=Off in your php.ini file and then restart your XAMPP .....

0

Have a look at the file mentioned (/home/content/j/o/u/jou/html/biggydaddy/wp-config.php) and make sure nothing is being output from there. This could be as simple as an extra space before the opening <?php tag.

In my Wordpress config file that line is the DB password. Make sure that you haven't got any characters there like an extra unescaped quote that could cause problems.

John C
  • 8,223
  • 2
  • 36
  • 47
  • I know some text before header file my problem is how we display those errors in my localhost it's visible on myhosted server – 8055 Jul 03 '12 at 05:48
0

Sometimes it's some space characters after the final ?> in a PHP file.

yunzen
  • 32,854
  • 11
  • 73
  • 106
  • Do you mean whitespace *before a PHP `header()` function call*? It has nothing to do with whitespace after the final `?>`. In fact you can put anything after that. :) – Nathan Jul 03 '12 at 05:37
  • I know some text before header file my problem is how we display those errors in my localhost it's visible on myhosted server – 8055 Jul 03 '12 at 05:49
  • Of course you can. But if you have output before a call to the header function, the afore mentioned error occurs. – yunzen Jul 03 '12 at 05:55
0

It seems you are using wordpress then set WP_DEBUG constant to true in wp-config.php:

define('WP_DEBUG', true);

Or if for normal php script set:

error_reporting(E_ALL);
ini_set("display_errors", 1);

Hope this will help you.

sandip patil
  • 638
  • 4
  • 8
  • I am not using wordpress and i set (error_reporting(E_ALL); ini_set("display_errors", 1);) also getting other errors and notices but not this one – 8055 Jul 03 '12 at 07:38