I have started getting error "Cannot modify header information - headers already sent" on my website after I upgraded from Drupal 6 to 7
Based on error message, I did some digging and found that the error originates in function drupal_page_footer() in file public_html/includes/common.inc line 2561
As per search on the Drupal site, I have verified that the .inc files do not have closing brackets.
I also verified that the files were unpacked in ASCII format.
For Drupal 6.20 I was using Acquia Marina theme without any error. After upgrade to Drupal 7, I get this error for Garland theme as well as Acquia Marina theme I have installed. Website is www.uday.net
Any help/pointers to resolve the issue will be appreciated.
Comments
Documentation >> Error Messages
Used this for reference.
http://drupal.org/node/1424
>> To sum up, turning on the "output_buffering" variable in php.ini fixes this problem.
Where do I find php.ini file? (I am on shared hosting).
Thanks.
You may need to create your php.ini
CodeCutter,
Shared hosting typically doesn't set up a php.ini on the server for you. If you don't see it, you will need to create one.
You will want to place it in the same directory as your install:
As Home Page: Yourdomain.com/php.ini
Deeper in a directory: Yourdomain.com/yourdrupalinstall/php.ini
If you don't know how to create it...you are able to take an empty text file and save it as "php.ini" then add options as needed to the .ini
Other items to consider in your php.ini for shared hosting...this all depends on who your host is and what you have the ability to do
Is it Drupal 7 requirement?
Why do I need to create a new php.ini if I never had it before?
Is it a new requirement specifically for Drupal 7 ?
I like to keep things "vanilla" as much as possible.
Thanks.
Not a new requirement
No, its not a new requirement. I thought it was a bit strange making the adjustment from D6 to D7. If your server handled D6 without any issue, I don't see why you would need it for D7. The only item I've run into throughout setting up D7 on shared hosting is the memory issue inside the php.ini - nothing else.
My answer wasn't directed at your error, but to only help with the php.ini.
I'm unsure as to what creates your drupal_page_footer() in file public_html/includes/common.inc line 2561 - Just a suggestion: Are you running an older theme? Have you tried switching to one of the default themes for D7(bartik) to see if it returns the same error?
Same problem with any theme
Get same error with Garland, Bartik or Acquia Marina.
Same Error
I am getting exactly the same error on a D7 install I have.
It's running Domain Access module with a few different themes, and it's driving me crazy trying to track down what is causing this bug.
I believe it's caused by a space before an opening
<?phpor a space after a closing
?>But I've been through all my files and can't spot anything.
I even tried adding
to my php.ini file as suggested elsewhere, but that does not fix it.
Any suggestions are very welcome.
Problem is resolved for me.
I got this Drupal issue fixed.
The problem is that some of the modules are not compatible with Drupal 7 although it may say that the module version is for 7.x
What I did was to remove all modules from /public_html/sites/all/modules folder.
Then I started installing 1 or 2 modules at a time to make sure that they are compatible (meaning I don't get "Header sent" error).
I found issue with following modules: scheduler, bad behavior, five_star_comment, global_redirect
Your issues may be same or different, so please try each module separately. I know it is painful, but it worked. :)
Make sure that the caching is turned off while you are testing this.
Good luck.
I found globalredirect was
I found globalredirect was causing a problem for me, on pages like user/5837 that were cached, drupal was printing out the cache, and then globalredirect was trying to use drupal_goto() to send the header to goto user/realname, obviously too late.