This Help forum is for issues relates to the latest release (1.7.10/11/12). For issues related to development versions please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

TOPIC: Error "Cannot modify header information"

Error "Cannot modify header information" 4 days 23 hours ago #1

  • ab12
  • ab12's Avatar
  • Offline
  • New
  • Posts: 6
My site runs webtrees 1.7.12 and everything was OK until a few days ago.
Now, every page fails with this kind of error :

Fatal error: Uncaught ErrorException: Cannot modify header information - headers already sent by (output started at /home/croizatvxw/www/webtrees/app/Controller/PageController.php:185) in /home/croizatvxw/www/webtrees/app/Database.php:281 Stack trace: #0 [internal function]: Fisharebest\Webtrees\{closure}(2, 'Cannot modify h...', '/home/croizatvx...', 281, Array) #1 /home/croizatvxw/www/webtrees/app/Database.php(281): PDO->prepare('INSERT INTO `wt...') #2 /home/croizatvxw/www/webtrees/app/Log.php(48): Fisharebest\Webtrees\Database::prepare('INSERT INTO `wt...') #3 /home/croizatvxw/www/webtrees/app/Log.php(106): Fisharebest\Webtrees\Log::addLog('/home/croizatvx...', 'error') #4 /home/croizatvxw/www/webtrees/includes/session.php(228): Fisharebest\Webtrees\Log::addErrorLog('/home/croizatvx...') #5 [internal function]: Fisharebest\Webtrees\{closure}(Object(ErrorException)) #6 {main} thrown in /home/croizatvxw/www/webtrees/app/Database.php on line 281

Please have a look over croizat-viallet.fr/
The administrator has disabled public write access.

Error "Cannot modify header information" 4 days 21 hours ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10908
Your server is failing to insert an entry into the database table wt_session.

Maybe there is a problem with your database server? Disk full?

Can you access your database using a tool such as phpmyadmin?

Delete all the rows from the table wt_session.
(It is safe to delete these rows - the table only contains temporary data).
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Error "Cannot modify header information" 4 days 21 hours ago #3

  • ab12
  • ab12's Avatar
  • Offline
  • New
  • Posts: 6
Thank you for responding.
I could delete all rows in the wt_session table but the problem is still there.
The web hosting service says that my database is "12.27 Mo / 100 Mo".
The administrator has disabled public write access.

Error "Cannot modify header information" 4 days 20 hours ago #4

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10908
OK, we need information. All we can see is that webtrees failed to insert a row in the table wt_session, and it failed to store the error message in the table wt_log.

Edit this file: github.com/fisharebest/webtrees/blob/1.7.12/app/Log.php#L46

At line 46, insert

var_dump($message);exit;

Does this give any extra information about the error.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Error "Cannot modify header information" 4 days 16 hours ago #5

  • ab12
  • ab12's Avatar
  • Offline
  • New
  • Posts: 6
string(632) "/home/croizatvxw/www/webtrees/app/Database.php:281 Cannot modify header information - headers already sent by (output started at /home/croizatvxw/www/webtrees/app/Controller/PageController.php:185) #0 unknown:unknown ErrorException("Cannot modify header information - headers already sent by (output started at /home/croizatvxw/www/webtrees/app/Controller/PageController.php:185)") #1 /app/Database.php:281 prepare('SELECT setting_value FROM `wt_…') #2 /app/Module/AbstractModule.php:61 prepare('SELECT setting_value FROM `wt_…') #3 /app/Module/HtmlBlockModule.php:60 getBlockSetting(62, 'title') #4 /index.php:110 getBlock(62) "
Fatal error: Uncaught ErrorException: Cannot modify header information - headers already sent by (output started at /home/croizatvxw/www/webtrees/app/Controller/PageController.php:185) in /home/croizatvxw/www/webtrees/app/Database.php:281 Stack trace: #0 [internal function]: Fisharebest\Webtrees\{closure}(2, 'Cannot modify h...', '/home/croizatvx...', 281, Array) #1 /home/croizatvxw/www/webtrees/app/Database.php(281): PDO->prepare('INSERT INTO `wt...') #2 /home/croizatvxw/www/webtrees/includes/session.php(354): Fisharebest\Webtrees\Database::prepare('INSERT INTO `wt...') #3 [internal function]: Fisharebest\Webtrees\{closure}('44bb10d30d11109...', 'initiated|b:1;l...') #4 [internal function]: session_write_close() #5 {main} thrown in /home/croizatvxw/www/webtrees/app/Database.php on line 281

The message can be slightly different if you try other pages from croizat-viallet.fr/
The administrator has disabled public write access.

Error "Cannot modify header information" 4 days 16 hours ago #6

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10908
You said that your site stopped working a few days ago.

What changed? Perhaps you upgraded PHP? Modified the PHP.INI configuration file?

Have you, perhaps, enabled session.auto_start in your php.ini? (If so, disable it).
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Error "Cannot modify header information" 4 days 16 hours ago #7

  • ab12
  • ab12's Avatar
  • Offline
  • New
  • Posts: 6
PHP 7.0, MYSQL v.5.6 did not change.
Some time ago, in the admin page, I clicked on the link to upgrade to 1.7.13. Then I realized that I was not sure whether the vytux extensions would still work and I did not proceed with the upgrade.
I did not change anything else.
The problem showed for particular pages only (not sure if if was before or after considering the upgrade).
Then it became general for all pages.
The administrator has disabled public write access.

Error "Cannot modify header information" 2 days 18 hours ago #8

  • ab12
  • ab12's Avatar
  • Offline
  • New
  • Posts: 6
Still not working and I don't know what I can do.
The administrator has disabled public write access.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Error "Cannot modify header information" 2 days 16 hours ago #9

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10908
> Have you, perhaps, enabled session.auto_start in your php.ini? (If so, disable it).

Create a file called phpinfo.php on your server containing
<? phpinfo(); ?>

Visit the page phpinfo.php on your site.

Find the entry for session.auto_start.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Error "Cannot modify header information" 2 days 8 hours ago #10

  • ab12
  • ab12's Avatar
  • Offline
  • New
  • Posts: 6
session.auto_start Off Off
croizat-viallet.fr/phpinfo.php
The administrator has disabled public write access.
Powered by Kunena Forum