Failed to start the session because headers have already been sent by "/home/******/ftp/concrete/config/concrete.php" at line 1.

Permalink
I was white labeling and disabling jQuery when suddenly, this appeared:

"An unexpected error occurred.
Failed to start the session because headers have already been sent by "/home/***/ftp/concrete/config/concrete.php" at line 1."

I think it happened when I followed the official "Optimization" guide The part about disabling jQuery... Here's what I did.

1. I copied /concrete/elements/header_required.php to /appllication/elements
2. For white labeling purposes I copied /concrete/config/concrete.php to app folder.

I already tried
1. deleting application//files/cache folder
2. disabling cache in /config/concrete.php
3. checking for white spaces before many documents - there are none
4. reversing all I did

I'm quite desperate! Can you please help me? It's on the newest concrete5.7.5.9.

Greetings - Andrew

wyso
 
wyso replied on at Permalink Reply
wyso
bump
mesuva replied on at Permalink Best Answer Reply
mesuva
I don't think there can be any other explanation for this error message other than its literal meaning.

It is referring in this case to the concrete.php file within the core.
You could either try replacing this file with a fresh copy, or double checking it for spaces.

I can reproduce this error exactly if I put a space at the start of this file. Perhaps when you copied the file you accidentally put in a space and saved it down somewhere.

As a side note, when you override concrete.php, you don't have to copy file in its entirety, you only need to include in the overriding file the values you want to override.
wyso replied on at Permalink Reply
wyso
Thank you, Mesuva. copying a fresh concrete.php file has worked just fine! I was pretty sure I've already tried that one tbh... O.o Anyways :D Thanks for resolving my issue and the tip about changing stuff. Site is back on-line. :)

MaNy tHaNkS!
Gondwana replied on at Permalink Reply
Gondwana
The ftp folder in the path seems odd. Sure it's right?

When you copy stuff around, sometimes you need to change the namespace. I don't know if that applies here, but it may be worth checking.
wyso replied on at Permalink Reply
wyso
I've changed the namespace deliberately to protect certain data. The issue has already been solved, anyways, Thanks for your help
onemhz replied on at Permalink Reply
onemhz
Just convert file to "without BOM" using for exp. Notepad++.