I am trying to install Chamilo on my server but I get a warning and the install is cancelled... I thought warnings were not like errors and wouldn't make it fail, but either this warning is important or something else is wrong that I don't know of.
The warning is a "headers already sent". I have followed the steps to solve it to no avail (I commented the lines with echo, used ob functions and even php.ini buffer setting but it keeps displaying this exact same warning). It comes from script that otherwise work fine on my WAMP test server and I found no complaints about it on the chamilo threads... I'm not even sure this could make the whole install crash...
Warning: Cannot modify header information - headers already sent by (output started at /var/www/new_chamilo/main/install/index.php:391) in /var/www/new_chamilo/main/inc/lib/template.lib.php on line 1038, referer: XXX/new_chamilo/main/install/index.php?running=1&installType=new&updateFromConfigFile=
[...] header() /var/www/new_chamilo/main/inc/lib/template.lib.php:1038
So the two lines mentioned here are :
header() /var/www/new_chamilo/main/inc/lib/template.lib.php:1038 (the closing })
if ($sendHeaders) {
header('Content-Type: text/html;
charset='.api_get_system_encoding());
header(
'X-Powered-By: '.$_configuration['software_name'].'
'.substr($_configuration['system_version'], 0, 1)
);
}
and index.php line 390
success: function(datos) {
if (datos == 'required_field_error') {
message = "<?php echo get_lang('FormHasErrorsPleaseComplete') ?>";
} else if (datos == '1') {
message = "<?php echo get_lang('ContactInformationHasBeenSent') ?>";
} else {
message = "<?php echo get_lang('Error').': '.get_lang('ContactInformationHasNotBeenSent') ?>";
}
alert(message);
$('#license-next').trigger('click');
$('#loader-button').html('');
}
I have tried commenting these error echoes, buffering with the ob functions or with the php.ini, nothing works, I still get the warnings and the install fails (I am not sure the install fails because of it though, but I have no other message whatsoever). On a side note, the php.ini says display_errors = Off but I still get that
I have followed the headers sent tutorial even before posting here actualy, but it changed nothing. As you can see in the code, there is "echo" and I suspect it is the problem so I commented the whole function (it is only about sending contact information to chamilo so it's quite useless) but the exact same error, pointing to the commented lines, still occurs. I am wondering if my file hasn't been cached. Is there a way to force refresh of this file only ? I see that htcacheclean can clear a specific URL from the cache, but I don't find examples of how to do so. Anyone knows how to provide a URL as parameter to this command ? Actualy I know I had to install some extensions that caches scripts for more efficiency, because it's absence triggered many warnings. Is there more than one cache server side ?
Any insight about this would be very welcome... Thank you in advance for your time !