Skip to content

Cannot modify header information - headers already sent by image.php:249 #14378

Closed

Description

@enoch85

This is really annoying, I can't figure out where it comes from.

Steps to reproduce

Don´t know.

Expected behavior

No errors

Actual behavior

Thousands of this log entries in owncloud.log

Error   PHP Cannot modify header information - headers already sent by (output started at /var/www/owncloud/lib/private/image.php:249) at /var/www/owncloud/lib/private/appframework/app.php#104    2015-02-19T13:20:46+00:00
Error   PHP Cannot modify header information - headers already sent by (output started at /var/www/owncloud/lib/private/image.php:249) at /var/www/owncloud/lib/private/appframework/app.php#104    2015-02-19T13:20:46+00:00
Error   PHP Cannot modify header information - headers already sent by (output started at /var/www/owncloud/lib/private/image.php:249) at /var/www/owncloud/lib/private/appframework/app.php#104    2015-02-19T13:20:46+00:00
Error   PHP Cannot modify header information - headers already sent by (output started at /var/www/owncloud/lib/private/image.php:249) at /var/www/owncloud/lib/private/appframework/app.php#100    2015-02-19T13:20:46+00:00
Error   PHP Cannot modify header information - headers already sent by (output started at /var/www/owncloud/lib/private/image.php:249) at /var/www/owncloud/lib/private/appframework/app.php#104    2015-02-19T13:20:45+00:00
Error   PHP Cannot modify header information - headers already sent by (output started at /var/www/owncloud/lib/private/image.php:249) at /var/www/owncloud/lib/private/appframework/app.php#104    2015-02-19T13:20:45+00:00
Error   PHP Cannot modify header information - headers already sent by (output started at /var/www/owncloud/lib/private/image.php:249) at /var/www/owncloud/lib/private/appframework/app.php#104    2015-02-19T13:20:45+00:00
Error   PHP Cannot modify header information - headers already sent by (output started at /var/www/owncloud/lib/private/image.php:249) at /var/www/owncloud/lib/private/appframework/app.php#100    2015-02-19T13:20:45+00:00
Error   PHP Cannot modify header information - headers already sent by (output started at /var/www/owncloud/lib/private/image.php:249) at /var/www/owncloud/lib/private/appframework/app.php#104    2015-02-19T13:20:44+00:00

Server configuration

Ubuntu Server 12.04

Database:
Apache/2.2.22 (Ubuntu)
MySQL klientversion: 5.5.41
PHP version:
PHP 5.4.37-1+deb.sury.org~precise+1 (cli) (built: Jan 26 2015 11:45:18)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

ownCloud version: (see ownCloud admin page)
8.0
Updated from an older ownCloud or fresh install:
5, 6, 7.

List of activated apps:
Activity
Calender
Contacts
Deleted files
Documents
First Run Wizard
Full Text Search
PDF Viewer
Pictures
Share Files
Text Editor
Updater
Versions
Video Viewer

Are you using external storage, if yes which one: local/smb/sftp/...
No
Are you using encryption: yes/no
No

Client configuration

Browser:
Version 39.0.2171.71 m
Operating system:
Windows 8.1
Sync Client
1.7.1 stable
*Mobile app
Android 1.7.0

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

As mentioned above

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...

Some assistanse @LukasReschke or @PVince81 ? :)

Activity

  1. vDorst commented on Feb 20, 2015

    @vDorst

    I upgraded my 7.0 to Version: 8.0.0-5 via SUSE reporitory for Ubuntu 14.10 64-bit.

    I do have the same issue with a log of errors in the logfile.

    Steps to reproduce:

    • Open the Android app 1.7.0 (Blackberry OS: 10.3.1.1565)
    • Open the picture map on the owncloud server and wait the thumbnail to show up. This takes a while and owncloud app is very unresponsive.
    • And your owncloud logfile will grow with a lot of errors.

    Owncloud logfile:

    {"reqId":"20b72765e5a8a24be49544b933f4bb70","remoteAddr":"88.159.xxx.xxx","app":"core","message":"OC\\Tags::__construct, tags: Array\n(\n)\n","level":0,"time":"2015-02-20T10:08:09+01:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/api\/v1\/thumbnail\/256\/256\/camera\/IMG_20141224_171554.jpg"}
    {"reqId":"20b72765e5a8a24be49544b933f4bb70","remoteAddr":"88.159.xxx.xxx","app":"core","message":"Generating preview for \"camera\/IMG_20141224_171554.jpg\" with \"OC\\Preview\\Image\"","level":0,"time":"2015-02-20T10:08:09+01:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/api\/v1\/thumbnail\/256\/256\/camera\/IMG_20141224_171554.jpg"}
    {"reqId":"20b72765e5a8a24be49544b933f4bb70","remoteAddr":"88.159.xxx.xxx","app":"core","message":"OC_Image->fixOrientation() Orientation: 1","level":0,"time":"2015-02-20T10:08:10+01:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/api\/v1\/thumbnail\/256\/256\/camera\/IMG_20141224_171554.jpg"}
    {"reqId":"20b72765e5a8a24be49544b933f4bb70","remoteAddr":"88.159.xxx.xxx","app":"PHP","message":"Cannot modify header information - headers already sent by (output started at \/data\/webapps\/owncloud\/lib\/private\/image.php:249) at \/data\/webapps\/owncloud\/lib\/private\/appframework\/app.php#100","level":3,"time":"2015-02-20T10:08:11+01:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/api\/v1\/thumbnail\/256\/256\/camera\/IMG_20141224_171554.jpg"}
    {"reqId":"20b72765e5a8a24be49544b933f4bb70","remoteAddr":"88.159.xxx.xxx","app":"PHP","message":"Cannot modify header information - headers already sent by (output started at \/data\/webapps\/owncloud\/lib\/private\/image.php:249) at \/data\/webapps\/owncloud\/lib\/private\/appframework\/app.php#104","level":3,"time":"2015-02-20T10:08:11+01:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/api\/v1\/thumbnail\/256\/256\/camera\/IMG_20141224_171554.jpg"}
    {"reqId":"20b72765e5a8a24be49544b933f4bb70","remoteAddr":"88.159.xxx.xxx","app":"PHP","message":"Cannot modify header information - headers already sent by (output started at \/data\/webapps\/owncloud\/lib\/private\/image.php:249) at \/data\/webapps\/owncloud\/lib\/private\/appframework\/app.php#104","level":3,"time":"2015-02-20T10:08:11+01:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/api\/v1\/thumbnail\/256\/256\/camera\/IMG_20141224_171554.jpg"}
    {"reqId":"20b72765e5a8a24be49544b933f4bb70","remoteAddr":"88.159.xxx.xxx","app":"PHP","message":"Cannot modify header information - headers already sent by (output started at \/data\/webapps\/owncloud\/lib\/private\/image.php:249) at \/data\/webapps\/owncloud\/lib\/private\/appframework\/app.php#104","level":3,"time":"2015-02-20T10:08:11+01:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/api\/v1\/thumbnail\/256\/256\/camera\/IMG_20141224_171554.jpg"}
    
  2. enoch85 commented on Feb 20, 2015

    @enoch85
    Author

    @vDorst Thanks for sorting out where it came from.

  3. PVince81 commented on Feb 23, 2015

    @PVince81
    Contributor
  4. self-assigned this
    on Feb 23, 2015
  5. oparoz commented on Feb 23, 2015

    @oparoz
    Contributor

    @vDorst's description makes me think it could be a duplicate of #12712

  6. vDorst commented on Feb 23, 2015

    @vDorst

    @oparoz, It could be the issue.

  7. enoch85 commented on Mar 22, 2015

    @enoch85
    Author

    @oparoz @georgehrke Any update here maybe? Would be nice with a fix for 8.0.3.

  8. oparoz commented on Mar 22, 2015

    @oparoz
    Contributor

    In #12712 @rullzer said he would fix it, but @tobiasKaminsky was responsible for the code change, so he might know best what he was trying to do and how to fix it. The options are described in #12712.

  9. enoch85 commented on Mar 22, 2015

    @enoch85
    Author

    @rullzer is working on a fix here: #14919

  10. added this to the milestone on Mar 23, 2015
  11. MorrisJobke commented on Mar 24, 2015

    @MorrisJobke
    Contributor

    @rullzer is this fixed with #14919

  12. rullzer commented on Mar 24, 2015

    @rullzer
    Contributor

    should be. But @enoch85 please confirm.

  13. enoch85 commented on Mar 25, 2015

    @enoch85
    Author

    I will confirm when 8.1 is released.

  14. MorrisJobke commented on Mar 25, 2015

    @MorrisJobke
    Contributor

    @enoch85 Simply reopen once this isn't fixed. Thanks

  15. riaqn commented on Sep 6, 2015

    @riaqn

    I 'm on ownCloud 8.1.1 and this problem still exists.

    Error   PHP Cannot modify header information - headers already sent at Unknown#0    2015-09-06T11:05:59+00:00
    Error   PHP ErrorException: Cannot modify header information - headers already sent at /var/www/cloud.riaqn.com/htdocs/owncloud/lib/private/session/internal.php#104    2015-09-06T11:05:59+00:00
    Fatal   index   Exception: {"Exception":"ErrorException","Message":"Cannot modify header information - headers already sent","Code":0,"Trace":"#0 [internal function]: OC\\Session\\Internal->trapError(2, 'Cannot modify h...', '\/var\/www\/cloud....', 103, Array)\n#1 \/var\/www\/cloud.riaqn.com\/htdocs\/owncloud\/lib\/private\/response.php(103): header('HTTP\/1.1 500 In...')\n#2 \/var\/www\/cloud.riaqn.com\/htdocs\/owncloud\/lib\/base.php(460): OC_Response::setStatus(500)\n#3 \/var\/www\/cloud.riaqn.com\/htdocs\/owncloud\/lib\/base.php(594): OC::initSession()\n#4 \/var\/www\/cloud.riaqn.com\/htdocs\/owncloud\/lib\/base.php(1121): OC::init()\n#5 \/var\/www\/cloud.riaqn.com\/htdocs\/owncloud\/index.php(38): require_once('\/var\/www\/cloud....')\n#6 {main}","File":"\/var\/www\/cloud.riaqn.com\/htdocs\/owncloud\/lib\/private\/session\/internal.php","Line":104}  2015-09-06T11:05:59+00:00
    Fatal   base    Exception: {"Exception":"ErrorException","Message":"session_start(): Cannot send session cache limiter - headers already sent","Code":0,"Trace":"#0 [internal function]: OC\\Session\\Internal->trapError(2, 'session_start()...', '\/var\/www\/cloud....', 38, Array)\n#1 \/var\/www\/cloud.riaqn.com\/htdocs\/owncloud\/lib\/private\/session\/internal.php(38): session_start()\n#2 \/var\/www\/cloud.riaqn.com\/htdocs\/owncloud\/lib\/base.php(454): OC\\Session\\Internal->__construct('oc7pghn4hyp7')\n#3 \/var\/www\/cloud.riaqn.com\/htdocs\/owncloud\/lib\/base.php(594): OC::initSession()\n#4 \/var\/www\/cloud.riaqn.com\/htdocs\/owncloud\/lib\/base.php(1121): OC::init()\n#5 \/var\/www\/cloud.riaqn.com\/htdocs\/owncloud\/index.php(38): require_once('\/var\/www\/cloud....')\n#6 {main}","File":"\/var\/www\/cloud.riaqn.com\/htdocs\/owncloud\/lib\/private\/session\/internal.php","Line":104}
    

    I will report once I know how to reproduce.

  16. locked as resolved and limited conversation to collaborators on Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions