Cannot modify header information - headers already sent by..

Tutorials on ownCloud administration
Forum rules
You may post your own tutorials here. Please keep in mind that a moderator has to approve it before everybody can read it!

Re: Cannot modify header information - headers already sent

Postby litbea » Fri Jan 18, 2013 3:50 pm

bender wrote:set display_errors = Off in your php.ini


I'd rather prefer continue viewing errors to try to solve them, instead of hiding them
litbea
Newbie
 
Posts: 9
Joined: Fri Jan 11, 2013 12:51 pm

Re: Cannot modify header information - headers already sent

Postby litbea » Fri Jan 18, 2013 3:57 pm

I've decided to start from scratch to document my experience. Sorry for the length...

Download, unpack... install: there it shows
Warning: mysql_close(): 34 is not a valid MySQL-Link resource in /home/m2asesor/public_html/clientes/lib/setup.php on line 152

Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home/m2asesor/public_html/clientes/lib/user.php on line 203

Warning: Cannot modify header information - headers already sent by (output started at /home/m2asesor/public_html/clientes/lib/setup.php:152) in /home/m2asesor/public_html/clientes/lib/setup.php on line 33

Well, I still can log in if I refresh, there here it shows
<b>Warning</b>: disk_free_space() has been disabled for security reasons in <b>/home/m2asesor/public_html/clientes/lib/filestorage/local.php</b> on line <b>165</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/m2asesor/public_html/clientes/lib/filestorage/local.php:165) in <b>/home/m2asesor/public_html/clientes/lib/template.php</b> on line <b>162</b>

and on lines 163, 164.

HTACCESS at root folder is
ErrorDocument 403 /clientes/core/templates/403.php
ErrorDocument 404 /clientes/core/templates/404.php
<IfModule mod_php5.c>
php_value upload_max_filesize 512M
php_value post_max_size 512M
php_value memory_limit 512M
<IfModule env_module>
SetEnv htaccessWorking true
</IfModule>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^.well-known/carddav /remote.php/carddav/ [R]
RewriteRule ^.well-known/caldav /remote.php/caldav/ [R]
RewriteRule ^apps/([^/]*)/(.*\.(css|php))$ index.php?app=$1&getfile=$2 [QSA,L]
RewriteRule ^remote/(.*) remote.php [QSA,L]
</IfModule>
Options -Indexes


while HTACCESS at DATA folder is
deny from all
IndexIgnore *


At least, some data is written in /data/username/files/text.txt. If I try to open it from the browser, the page doesn't exist.

I've tried to attach PNG screenshots, but the forum doesn't allow it.
litbea
Newbie
 
Posts: 9
Joined: Fri Jan 11, 2013 12:51 pm

Re: Cannot modify header information - headers already sent

Postby RandolphCarter » Fri Jan 18, 2013 4:26 pm

disk_free_space() has been disabled for security reasons

That's a php configuration problem. See e.g. here: http://2by2host.com/articles/php-errors ... ree_space/

At least, some data is written in /data/username/files/text.txt. If I try to open it from the browser, the page doesn't exist.

You're sure it doesn't exist? You really get a 404? I suspect you rather get a 403 or 401 error... because direct access should indeed be prohibited (it's a security feature :) ).

I've tried to attach PNG screenshots, but the forum doesn't allow it.

Works fine for me - how does it fail for you?
RandolphCarter
Inventory
 
Posts: 4326
Joined: Wed May 30, 2012 8:42 am
ownCloud version: 7.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.x

Re: Cannot modify header information - headers already sent

Postby litbea » Fri Jan 18, 2013 9:19 pm

Great!

My provider uploaded a php.ini to overwrite the default configuration, and inside I've not only removed disk_free_space but set_time_limit, disk_total_space aswell from disable_functions.

Now I can see the MAX FILE info, upload files...
litbea
Newbie
 
Posts: 9
Joined: Fri Jan 11, 2013 12:51 pm

Re: Cannot modify header information - headers already sent

Postby litbea » Fri Jan 18, 2013 9:44 pm

... but I still see "You use 105.2 kB of the available 105.2 kB" in personal.php (with admin role) but I think that may be another error.
litbea
Newbie
 
Posts: 9
Joined: Fri Jan 11, 2013 12:51 pm

Previous

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 7 guests