Problem with config.php and headers being sent...

MasterOfVDL

Joined: 2010-05-13
Posts: 3
Posted: Thu, 2010-05-13 10:12

Hi,

I am currently trying to update to Gallery 2.3.1 and get the message

Quote:
Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp1115610_94YT1XFLLJ/www/gal/config.php:1) in /is/htdocs/wp1115610_94YT1XFLLJ/www/gal/modules/core/classes/GalleryPhpVm.class on line 142

when trying to access the page.

The first line in config.php is "<?php" without any whitespaces before it.

Now for the backstory which contains more detailed information:

I uploaded the extracted archive of 2.3.1 and accessed the gallery page (http://www.ostercon.info/gal).
After I did so, the upgrade assistant showed its welcome page and after a click on the next-button the authentication-page.
Since I forgot the installation password, I downloaded config.php to look it up and the password there was a lot of dots (the dots Windows uses to hide passwords), so I changed it and reuploaded the file.
Then I entered the new password and switched to the next page which told me that the password was correct.
After that the assistant switched back to the welcome page and every click on the next-button only showed the welcome page again instead of step 1 (Authentication).

After that I edited config.php again, switching on debug logging to "buffered".
After reuploading and refreshing the file, I got the following warnings on top of the welcome page:

Quote:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /is/htdocs/wp1115610_94YT1XFLLJ/www/gal/config.php:1) in /is/htdocs/wp1115610_94YT1XFLLJ/www/gal/lib/support/GallerySetupUtilities.class on line 357

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /is/htdocs/wp1115610_94YT1XFLLJ/www/gal/config.php:1) in /is/htdocs/wp1115610_94YT1XFLLJ/www/gal/lib/support/GallerySetupUtilities.class on line 357

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /is/htdocs/wp1115610_94YT1XFLLJ/www/gal/config.php:1) in /is/htdocs/wp1115610_94YT1XFLLJ/www/gal/lib/support/GallerySetupUtilities.class on line 76

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /is/htdocs/wp1115610_94YT1XFLLJ/www/gal/config.php:1) in /is/htdocs/wp1115610_94YT1XFLLJ/www/gal/lib/support/GallerySetupUtilities.class on line 76

I opened the regular URL of the Gallery to find the message I posted in the beginning.
After that I checked config.php using notepad++ and turning on all invisible characters which you can see in the following screenshot:

[img]http://img571.imageshack.us/img571/1764/screeniej.jpg[/img]

I hope someone here can help me.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-05-13 10:59
 
MasterOfVDL

Joined: 2010-05-13
Posts: 3
Posted: Thu, 2010-05-13 14:10

Still the same problem.

[img]http://img294.imageshack.us/img294/734/screeenie.jpg[/img]

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2010-05-13 16:58

Try just plain old notepad
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
MasterOfVDL

Joined: 2010-05-13
Posts: 3
Posted: Fri, 2010-05-14 05:35

This was the software I edited the config.php in the first place, breaking it.

Sorry, I forgot to notify you that I could solve the problem. I found a backup of the original config.php, replaced the my edited one and copied the dots that were there as password into the upgrade assistants password box - it worked. But I am still stumped why the first line of my config.php would generate an output...

BTW: I also tried a config.php only containing

Quote:
<?php ?>

(with no leading or trailing chars) - the expectation was gal2 to complain about the missing configuration (or just using default values) but still I got the problem that line 1 of my config.php generated an output...