Title: PHP Fatal error + Warning: Cannot modify header information
Last modified: January 5, 2017

---

# PHP Fatal error + Warning: Cannot modify header information

 *  [aseanmp](https://wordpress.org/support/users/aseanmp/)
 * (@aseanmp)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/)
 * My site (aseanmp.org) has this error at the top, above the header:
 * `[23-Dec-2016 08:29:14 America/Chicago] PHP Fatal error: Call to undefined function
   add_action() in /home3/aseanmp/public_html/wp-content/themes/aseanmp/fw/core/
   type.post.php on line 11 [23-Dec-2016 08:29:14 America/Chicago] PHP Fatal error:
   Call to undefined function add_action() in /home3/aseanmp/public_html/wp-content/
   themes/aseanmp/fw/core/type.team.php on line 11 [23-Dec-2016 08:29:14 America/
   Chicago] PHP Fatal error: Call to undefined function add_action() in /home3/aseanmp/
   public_html/wp-content/themes/aseanmp/fw/core/core.reviews.php on line 11 [23-
   Dec-2016 08:29:14 America/Chicago] PHP Fatal error: Call to undefined function
   add_action() in /home3/aseanmp/public_html/wp-content/themes/aseanmp/fw/core/
   type.taxonomy.php on line 11 [23-Dec-2016 08:29:15 America/Chicago] PHP Fatal
   error: Call to undefined function add_action() in /home3/aseanmp/public_html/
   wp-content/themes/aseanmp/fw/core/type.post_type.php on line 11 [23-Dec-2016 
   08:29:15 America/Chicago] PHP Fatal error: Call to undefined function add_action()
   in /home3/aseanmp/public_html/wp-content/themes/aseanmp/fw/core/plugin.bb-press.
   php on line 7 [23-Dec-2016 08:29:15 America/Chicago] PHP Fatal error: Call to
   undefined function add_action() in /home3/aseanmp/public_html/wp-content/themes/
   aseanmp/fw/core/type.testimonials.php on line 11 [23-Dec-2016 08:29:15 America/
   Chicago] PHP Fatal error: Call to undefined function add_action() in /home3/aseanmp/
   public_html/wp-content/themes/aseanmp/fw/core/plugin.buddy-press.php on line 
   7 [23-Dec-2016 08:29:15 America/Chicago] PHP Fatal error: Call to undefined function
   add_action() in /home3/aseanmp/public_html/wp-content/themes/aseanmp/fw/core/
   type.attachment.php on line 11 [23-Dec-2016 08:29:15 America/Chicago] PHP Fatal
   error: Call to undefined function add_action() in /home3/aseanmp/public_html/
   wp-content/themes/aseanmp/fw/core/plugin.woocommerce.php on line 7 [23-Dec-2016
   08:29:15 America/Chicago] PHP Fatal error: Call to undefined function add_action()
   in /home3/aseanmp/public_html/wp-content/themes/aseanmp/fw/core/plugin.tribe-
   events.php on line 7 [23-Dec-2016 08:29:15 America/Chicago] PHP Fatal error: 
   Call to undefined function add_action() in /home3/aseanmp/public_html/wp-content/
   themes/aseanmp/fw/widgets/advert.php on line 5 [23-Dec-2016 08:29:15 America/
   Chicago] PHP Fatal error: Call to undefined function add_action() in /home3/aseanmp/
   public_html/wp-content/themes/aseanmp/fw/widgets/twitter.php on line 5 [23-Dec-
   2016 08:29:15 America/Chicago] PHP Fatal error: Call to undefined function add_action()
   in /home3/aseanmp/public_html/wp-content/themes/aseanmp/fw/widgets/calendar.php
   on line 5 [23-Dec-2016 08:29:15 America/Chicago] PHP Fatal error: Call to undefined
   function add_action() in /home3/aseanmp/public_html/wp-content/themes/aseanmp/
   fw/widgets/top10.php on line 5 [23-Dec-2016 08:29:15 America/Chicago] PHP Fatal
   error: Call to undefined function add_action() in /home3/aseanmp/public_html/
   wp-content/themes/aseanmp/fw/widgets/flickr.php on line 5 [23-Dec-2016 08:29:
   15 America/Chicago] PHP Fatal error: Call to undefined function add_action() 
   in /home3/aseanmp/public_html/wp-content/themes/aseanmp/fw/widgets/categories.
   php on line 5 [23-Dec-2016 08:29:15 America/Chicago] PHP Fatal error: Call to
   undefined function add_action() in /home3/aseanmp/public_html/wp-content/themes/
   aseanmp/fw/widgets/recent_posts.php on line 5 [23-Dec-2016 08:29:15 America/Chicago]
   PHP Fatal error: Call to undefined function add_action() in /home3/aseanmp/public_html/
   wp-content/themes/aseanmp/fw/widgets/socials.php on line 5 [23-Dec-2016 08:29:
   15 America/Chicago] PHP Fatal error: Call to undefined function add_action() 
   in /home3/aseanmp/public_html/wp-content/themes/aseanmp/fw/widgets/popular_posts.
   php on line 5 [23-Dec-2016 08:29:15 America/Chicago] PHP Fatal error: Call to
   undefined function add_action() in /home3/aseanmp/public_html/wp-content/themes/
   aseanmp/fw/widgets/recent_reviews.php on line 5`
 * Everything on the site works fine from what I can tell, but every page displays
   this error message above the header. It is an issue on all browsers (and tested
   on multiple different computers). From reading similar troubleshooting threads,
   it seems like the problem might be theme-related. But I have not modified any
   of the theme files manually, so I’m not sure why this is happening now. Could
   it be a problem caused by an automatic plugin update instead?
 * I also cannot log into the WordPress admin page. When I go to aseanmp.org/wp-
   admin, I get the same error code as above, followed by:
 * `Warning: Cannot modify header information - headers already sent by (output 
   started at /home3/aseanmp/public_html/wp-content/themes/aseanmp/fw/core/error_log:
   12) in /home3/aseanmp/public_html/wp-includes/pluggable.php on line 1179`
 * Any recommendations on what I should do? Many thanks in advance!

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [andybodu](https://wordpress.org/support/users/andybodu/)
 * (@andybodu)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-8620810)
 * Hi there,
 * You have a lot of errors there that should be investigated, but you don’t need
   to be displaying that information to your end users. In addition, the error reporting
   is contributing to the ‘headers already sent’ problem for accessing the admin.
 * I would first of all turn off WP_DEBUG in your wp-config.php file – open your
   wp-config.php file and search for define( ‘WP_DEBUG’, true ); and change it to
   define( ‘WP_DEBUG’, false ); Check then to see if you can access the admin.
 * If you still have the ‘headers already sent’ error, you can go through the following
   checklist to try to fix it: [https://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F](https://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F)
 * For the first general list of errors, I would check that your plugins are all
   up to date, and that your theme is up to date with your version of WordPress.
 * Hope that helps,
    Andy
 *  Thread Starter [aseanmp](https://wordpress.org/support/users/aseanmp/)
 * (@aseanmp)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-8620829)
 * Thanks for your response! I checked the wp-config.php file, and it looks like
   it already says ‘define(‘WP_DEBUG’, false)’, so unfortunately that’s not the 
   solution to the ‘headers already sent’ error.
 * Regarding the troubleshooting page you linked to, I’m a little confused because
   it says: output started at /home3/aseanmp/public_html/wp-content/themes/aseanmp/
   fw/core/error_log:12 – which references the error log, rather than a specific
   line in a .php file (which the troubleshooting page discusses). Any idea what
   I should do in that case?
 * Thanks!
 *  [andybodu](https://wordpress.org/support/users/andybodu/)
 * (@andybodu)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-8621548)
 * Do you have define( ‘WP_DEBUG_LOG’, true ); in the wp-config.php? If so set it
   to false for the moment.
 * Let’s try a different approach, and disable the plugins temporarily to see if
   any of those are causing the initial problem.
 * To do this manually, without accessing the admin, you can ftp into the site and
   rename the plugins folder to plugins_edit. This will disable all plugins. You
   can then see if you can access your admin dashboard.
 * If that works, you can re-enable the plugins by renaming the folder back to plugins,
   and disable individually each plugin until you get to the culprit (presuming 
   that it’s a plugin causing the problems). To disable individual plugins you can
   do the same approach – via ftp change the name of the folder of the plugin.
 *  [andybodu](https://wordpress.org/support/users/andybodu/)
 * (@andybodu)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-8621566)
 * Also, you can try adding
    ini_set(‘display_errors’,’Off’); to your wp-config.
   php which should help removing the display of errors on the front end of the 
   site.
 * It’s important that you find out what’s causing the errors, but it’s preferable
   not to display the errors to your audience. Your PhP configuration may be set
   to display errors, regardless of the WordPress settings, and by adding ini_set(‘
   display_errors’,’Off’); you should over-ride that.
 *  [mrtom414](https://wordpress.org/support/users/mrtom414/)
 * (@mrtom414)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-8623031)
 * The error Cannot modify header information means there was an attempted to modify
   the header after it had been sent to the server. My guess is either the header.
   php file was modified or you have a plugin that not playing nicely.
 * Try disabling all your plugins and see if the message goes away. If it does try
   activating them again one by one to see which plugin might be causing the problem.
 * All the error seem to be having problems with add_action function of wordpress.
   This function is one of the core functions of wordpress which allows themes and
   plugins to access wordpress hooks.
    -  This reply was modified 9 years, 4 months ago by [mrtom414](https://wordpress.org/support/users/mrtom414/).
 *  Thread Starter [aseanmp](https://wordpress.org/support/users/aseanmp/)
 * (@aseanmp)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-8624081)
 * Thanks for your suggestions! I tried deactivating all plugins via the cpanel (
   changing the name of the folder to “plugins.deactivate”) but the problem didn’t
   go away on the main site or the admin side.
 * The wp-config.php file didn’t have define( ‘WP_DEBUG_LOG’, true OR false , so
   that’s not the issue either, I guess.
 * I’m hesitant to fiddle with the wp-config.php file or any other php files under
   wp-content since they haven’t been modified in a long time–since our website 
   was redesigned a year and a half ago.
 * Also, as an update, the website issues seem to have gotten worse. The main content
   of the website now no longer displays properly. Instead, it displays things like
   this:
 * `[/vc_column_text][vc_column_text][chimpmate][/vc_column_text]`
 * This happened before I deactivated all plugins (before I made any real changes,
   in fact), so I’m not sure what’s going on.
 * Since the ‘cannot modify header’ problem seems to have started at a specific 
   error log, would it be okay for me to try deleting the error log referenced? 
   Or will that mess things up more?
 *  [andybodu](https://wordpress.org/support/users/andybodu/)
 * (@andybodu)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-8624827)
 * Make a backup first, and then go ahead and try deleting the error log. If it 
   worsens the situation you can re-upload your backup. This may help with the headers
   problem but I don’t think it will fix the display of errors on your page.
 * for the [vctext] problems, reactivate your plugins and this should go away.
 * To rule out a number of problems (for example, compatibility between WP version
   and the plugins being used), you can do a brief test and change your theme manually
   to the default WP theme (check to see what the latest one you have installed 
   is – twentyseventeen, twentysixteen etc). To do this you can edit the wp_options
   table in your database, following these instructions: [http://www.inmotionhosting.com/support/edu/wordpress/change-theme-in-db](http://www.inmotionhosting.com/support/edu/wordpress/change-theme-in-db).
   Obviously the default wp theme will have a completely different layout etc and
   will completely change the appearance of your site, so you only want to do the
   change briefly. When changed, see if you can login, and see if the errors dissappear
   from the site.
 * The advantage of this is that if using the default theme gets rid of the errors
   and allows you to login, then you know the problem is coming directly from your
   theme, so at least you’ll be able to focus your efforts directly there to get
   it fixed.
 * To change back to your original theme, follow the same steps in the db.
 *  [andybodu](https://wordpress.org/support/users/andybodu/)
 * (@andybodu)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-8624831)
 * another option here is to setup an exact copy of the site on a local/test server,
   to try to reproduce and fix the problems. That way you won’t risk making the 
   site worse. If you want a hand with this approach, contact me directly info[at]
   boduweb.com
 *  Thread Starter [aseanmp](https://wordpress.org/support/users/aseanmp/)
 * (@aseanmp)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-8627796)
 * Thanks again for your helpful suggestions! In the end, it was a theme issue–the
   theme itself was corrupted. The website worked fine when we tested it on a different
   theme, so that’s how we knew for sure. We were able to resolve the issue (with
   the help of outside support) by replacing the theme with a copy from a previous
   backup. Still no idea what caused the errors to begin with (since, as I said,
   I hadn’t made any new changes to the theme), but very glad to have it resolved
   at least!
 *  [andybodu](https://wordpress.org/support/users/andybodu/)
 * (@andybodu)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-8628494)
 * Glad to hear it. Make sure that you keep an eye on security – if your theme was
   corrupted, without you making changes, you may have a security problem. Take 
   a look at [https://codex.wordpress.org/Hardening_WordPress](https://codex.wordpress.org/Hardening_WordPress)
   and consider using some of the popular and useful security plugins like [https://wordpress.org/plugins/wordfence/](https://wordpress.org/plugins/wordfence/)
   or [https://wordpress.org/plugins/sucuri-scanner/](https://wordpress.org/plugins/sucuri-scanner/)
 *  [ritmosupply](https://wordpress.org/support/users/ritmosupply/)
 * (@ritmosupply)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-9039672)
 * Hi
 * I had excatly same problem in this moment, Read every word of help to understand.
 * Dear Aseanmp, could you let me know which file you replaced from backup for theme?
 * I need this information to save my web site too.
 * Thanks
 *  Thread Starter [aseanmp](https://wordpress.org/support/users/aseanmp/)
 * (@aseanmp)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-9039705)
 * We had outside tech support help us resolve the problem, so unfortunately, I 
   can’t tell you exactly which file it was. But from what I understand, it was 
   the entire theme that was the issue. We basically just replaced the corrupted
   theme with a version from a previous backup via the cpanel–as if we just changed
   the theme entirely. I hope that helps!

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘PHP Fatal error + Warning: Cannot modify header information’ is closed
to new replies.

## Tags

 * [header information](https://wordpress.org/support/topic-tag/header-information/)
 * [PHP Fatal error](https://wordpress.org/support/topic-tag/php-fatal-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 4 participants
 * Last reply from: [aseanmp](https://wordpress.org/support/users/aseanmp/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-warning-cannot-modify-header-information/#post-9039705)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
