Hi.
I performed all the steps to download.
Chamilo 1.11.4 alpha.
In:
https://github.com/chamilo/chamilo-lms/blob/1.11.x/README.md
All installation phases follow normal.
More in phase 7.
Give this error:
Warning: Can not modify header information - headers already sent by (output started at /home/public_htmlchamilo/main/install/index.php:310) in /home/public_html/chamilo/main/inc/lib/template.lib.php on Line 1043
Warning: Can not modify header information - headers already sent by (output started at /home/public_html/chamilo/main/install/index.php:310) in /home/public_html/chamilo/main/inc/lib/template.lib. Php on line 1046
I appreciate the support


Can you check if there's an error in your server logs (apache)?
Hi.
Yes.
In chamilo / main / install.
Generate this log.
[11-Apr-2017 01:27:45 UTC] An exception occurred while executing 'CREATE TABLE IF NOT EXISTS version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(255), PRIMARY KEY(id), UNIQUE(version));':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
[11-Apr-2017 01:27:45 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/serve/public_html/chamilo/main/install/index.php:310) in /home/serve/public_html/chamilo/main/inc/lib/template.lib.php on line 1043
[11-Apr-2017 01:27:45 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/serve/public_html/chamilo/main/install/index.php:310) in /home/serve/public_html/chamilo/main/inc/lib/template.lib.php on line 1046
@jmontoyaa I think I've seen that before (with you). The UNIQUE key on the version does not handle well the fact that it's a varchar(255) or something like that.
See reference here: https://dev.mysql.com/doc/refman/5.7/en/create-index.html
"Prefix support and lengths of prefixes (where supported) are storage engine dependent. For example, a prefix can be up to 767 bytes long for InnoDB tables or 3072 bytes if the innodb_large_prefix option is enabled. For MyISAM tables, the prefix limit is 1000 bytes. The NDB storage engine does not support prefixes (see Section 20.1.6.6, “Unsupported or Missing Features in NDB Cluster”)."
It seems like a good choice might be to simply forget about the UNIQUE constraint (not sure it serves any purpose anyway).
One reference that confirms my previous comment: https://dba.stackexchange.com/questions/28219/sqlstate42000-syntax-error-or-access-violation-1071-specified-key-was-too-lo
@bassuma What operating system + distribution + version do you have? I want to replicate your case but I'm not sure how to do it.
Hello @ywarnier.
I took this print.
It's a vps.
Would there be any link, to lower the chamilo, in the traditional way?
In zip or tar.
Thank you

I will probably be pushing the first alpha today, so you should be able to download it from there, but I don't think it's a download version problem. I think it's related to your version of MySQL, but with the details you gave me above I cannot really make sure I have the right VM to test.
I expect the alpha release.
If everything goes well.
I report here.
Greetings.
Hello.
I downloaded the chamilo-lms-1.11.4-releases.zip version.
But unfortunately, I no longer install the chamilo on my server.
The error in the log is this now:
[22-May-2017 18:56:21 UTC] An exception occurred while executing 'CREATE TABLE IF NOT EXISTS version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(255), PRIMARY KEY(id), UNIQUE(version));':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
[22-May-2017 18:56:21 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/chamilo/public_html/chamilo.com/educa/main/install/index.php:310) in /home/chamilo/public_html/chamilo.com/educa/main/inc/lib/template.lib.php on line 1062
[22-May-2017 18:56:21 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/chamilo/public_html/chamilo.com/educa/main/install/index.php:310) in /home/chamilo/public_html/chamilo.com/educa/main/inc/lib/template.lib.php on line 1065
I just released Chamilo 1.11.4 alpha 2, but it is unlikely to solve this issue.
Could you try the following for me?
Before installing/updating, edit the app/Migrations/Schema/V111/Version111.php file. Go to line 406, and change the CREATE TABLE version query to id bigint unsigned instead of id int unsigned, to see if that fixes the issue.
After thinking a bit more about it, I don't think this is going to work because you are not doing an upgrade but a fresh install...
@jmontoyaa, where is the version table created? I understand this is a requirement of Doctrine::Migrations, but I cannot find it.
Hi @ywarnier.
I did the above test.
Come on.
It works.
;)
But it did not.
:(
Gave this error:
Warning: Cannot modify header information - headers already sent by (output started at /home/main/install/index.php:310) in
/home/main/inc/lib/template.lib.php on line 1062
Warning: Cannot modify header information - headers already sent by (output started at /home/main/install/index.php:310) in
/home/main/inc/lib/template.lib.php on line 1065
Can you take a screenshot (including URL last part) of where it happens?
The "Warning" messages are not important, you can avoid them in Chamilo, but the installation process forces them to appear, so they should appear for me too if it was a Chamilo-only issue.

The strange thing is that it creates the entire database.
More on returning home.
It will enter the installation screen.
Does it take a long time (after you load the page) before the warning appears?
Seeing from the screenshot, it might be that the warning is when the install is supposed to receive a message back from a JS that shows the report on the installation. If you say it creates the entire database, that makes even more sense.
So if it takes a very long time to return (because your system is very slow, maybe because it's busy with some other thing), then it makes sense that you would see the "unauthorized" message as a sign that the PHP session has expired...
Hello.
I made this video of all the steps
https://youtu.be/tvClV_BCBY8
Here you can see what happens in my installation.
Can it be then problem on my server?
Do not accept this new version of chamilo?
Thank you
I saw the video, you have to check the apache error logs
I fixed the "CREATE TABLE IF NOT EXISTS version" error in latest 1.11.x
Hello.
I performed the installation procedure.
Chamilo version chamilo-lms-1.11.4-releases.zip.
At first without editing the file.
App / Migrations / Schema / V111 / Version111.php
id int unsigned
/main/install/error_log:
[24-May-2017 15:18:49 UTC] An exception occurred while executing 'CREATE TABLE IF NOT EXISTS version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(255), PRIMARY KEY(id), UNIQUE(version));':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
[24-May-2017 15:18:49 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/educa/main/install/index.php:310) in /home/public_html/educa/main/inc/lib/template.lib.php on line 1062
[24-May-2017 15:18:49 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/educa/main/install/index.php:310) in /home/public_html/educa/main/inc/lib/template.lib.php on line 1065
Then changing the file.
App / Migrations / Schema / V111 / Version111.php
id bigint unsigned
/main/install/error_log:
[24-May-2017 15:36:32 UTC] An exception occurred while executing 'CREATE TABLE IF NOT EXISTS version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(255), PRIMARY KEY(id), UNIQUE(version));':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
[24-May-2017 15:36:32 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/educa/main/install/index.php:310) in /home/public_html/educa/main/inc/lib/template.lib.php on line 1062
[24-May-2017 15:36:32 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/educa/main/install/index.php:310) in /home/public_html/educa/main/inc/lib/template.lib.php on line 1065
Hi.
Just for more information.
I sent the chamilo 1.11.2.
And I installed normally without problems.

@jmontoyaa, I repeat my question from above: where is the version table created? I understand this is a requirement of Doctrine::Migrations, but I cannot find it.
I think this is the issue here... the ID is bigger than the SQL "INT" type for the configuration of @bassuma
See also links to MySQL doc above: https://dev.mysql.com/doc/refman/5.7/en/create-index.html
"Prefix support and lengths of prefixes (where supported) are storage engine dependent. For example, a prefix can be up to 767 bytes long for InnoDB tables or 3072 bytes if the innodb_large_prefix option is enabled. For MyISAM tables, the prefix limit is 1000 bytes. The NDB storage engine does not support prefixes (see Section 20.1.6.6, “Unsupported or Missing Features in NDB Cluster”)."
So changing the ID to bigint should be OK, but we need to find where this is created.
@bassuma, following indications here: https://stackoverflow.com/questions/11847815/error-specified-key-was-too-long-max-key-length-is-1000-bytes it seems that the issue might be because the InnoDB table engine is not enabled.
Could you send me the output of this command in your database?:
SHOW TABLE STATUS;
This is a long output, but it might help us identify if your database server is (as I believe) trying to convert all InnoDB tables to MyISAM on the fly. In this case, all your tables should says "MyISAM" in the engine column, instead of what should be for Chamilo: InnoDB.
I just added some fixes. Now Chamilo creates the version table first, because doctrine migrations creates the table if it doesn't exists. Now it should work.
Hello.
As you can see in the picture.
@Jmontoyaa's solution did.
Work for me.
I was able to install and test the main tools.
Many thanks to all for the help.

Great, thanks to all of you (for reporting and fixing)
This still happens when upgrading from 1.9.8 to 1.11.8:
ERROR: An exception occurred while executing 'CREATE TABLE IF NOT EXISTS hook_observer( id int UNSIGNED NOT NULL AUTO_INCREMENT, class_name varchar(255) UNIQUE, path varchar(255) NOT NULL, plugin_name varchar(255) NULL, PRIMARY KEY PK_hook_management_hook_observer(id))':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
This can be fixed by removing the "UNIQUE" term on lines 46 and 47 of vim app/Migrations/Schema/V110/Version110.php