This Help forum is for issues relates to the latest release (1.7.9). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

TOPIC: Fatal error on installation : Cannot modify header

Fatal error on installation : Cannot modify header 2 weeks 2 days ago #1

  • binbin73
  • binbin73's Avatar
  • Offline
  • New
  • Posts: 3
Hi everybody

I am trying to install webtrees on my mac os, but could not fully complete the installation. The installation wizard stops at the final step showing the following message :

Fatal error: Uncaught ErrorException: Cannot modify header information - headers already sent by (output started at /Users/binbin/Sites/webtrees/setup.php:70) in /Users/binbin/Sites/webtrees/app/Database.php:315 Stack trace: #0 [internal function]: Fisharebest\Webtrees\{closure}(2, 'Cannot modify h...', '/Users/binbin/S...', 315, Array) #1 /Users/binbin/Sites/webtrees/app/Database.php(315): header('Location: site-...') #2 /Users/binbin/Sites/webtrees/setup.php(466): Fisharebest\Webtrees\Database::updateSchema('\\Fisharebest\\We...', 'WT_SCHEMA_VERSI...', 30) #3 {main} thrown in /Users/binbin/Sites/webtrees/app/Database.php on line 315

phpMyAdmin shows 2 newly created tables in my database (wt_gedcom and wt_site_setting), both empty.

my configuration is :
Apache/2.4.29 (Unix)
PHP/7.1.14
DB : 5.7.22 - MySQL Community Server (GPL)

Can anybody please give me a hint on this ?

Thank you so much

Olivier
The administrator has disabled public write access.

Fatal error on installation : Cannot modify header 2 weeks 2 days ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10250
There was some sort of fatal database error while creating the tables.

The error should have been displayed on the screen. Not sure why it wasn't.

If you delete the two tables, and the file data/config.ini.php, then you can run the setup script again.

Does it do exactly the same thing again?
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.

Fatal error on installation : Cannot modify header 2 weeks 2 days ago #3

  • binbin73
  • binbin73's Avatar
  • Offline
  • New
  • Posts: 3
Thank you for helping

I removed the two tables.
I had no file data/config.ini.php to remove (data contains only an index.php file and the cache directory).

I tried to re-run the setup process, same error.

By the way, the index.php file contains only
<?php header('Location: ../index.php');
.
Is this correct ?
The administrator has disabled public write access.

Fatal error on installation : Cannot modify header 2 weeks 2 days ago #4

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10250
> By the way, the index.php file contains only .. Is this correct ?

Yes. This file prevents visitors from browsing this folder.

> phpMyAdmin shows 2 newly created tables in my database (wt_gedcom and wt_site_setting), both empty.

Can you run the following SQL statement in phpMyAdmin. Does it give an error?

(This assumes you used the default table prefix wt_. If not, replace with your actual prefix.)
CREATE TABLE IF NOT EXISTS `wt_gedcom_setting` (
 gedcom_id     INTEGER      NOT NULL,
 setting_name  VARCHAR(32)  NOT NULL,
 setting_value VARCHAR(255) NOT NULL,
 PRIMARY KEY                        (gedcom_id, setting_name),
 FOREIGN KEY `wt_gedcom_setting_fk1` (gedcom_id) REFERENCES `wt_gedcom` (gedcom_id)
) COLLATE utf8_unicode_ci ENGINE=InnoDB
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.

Fatal error on installation : Cannot modify header 2 weeks 2 days ago #5

  • binbin73
  • binbin73's Avatar
  • Offline
  • New
  • Posts: 3
The DB user had not been not granted the PREFERENCES privilege. It seems that the table was created, but not the foreign key... thus returning an error.

I granted PREFERENCES to the user. The installation process seems to run fine now.

Thanks a lot for your help !

Olivier
The administrator has disabled public write access.
Powered by Kunena Forum