installation_guide.html 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  1. <html lang="en">
  2. <head>
  3. <meta charset="utf-8" />
  4. <title>Chamilo Installation Guide</title>
  5. <link rel="stylesheet" href="../public/build/css/app.css" type="text/css" media="screen,projection" />
  6. <link rel="stylesheet" href="../public/build/css/themes/chamilo/default.css" type="text/css" media="screen,projection" />
  7. <link rel="stylesheet" href="default.css" type="text/css" media="screen,projection" />
  8. <link rel="stylesheet" href="../public/build/css/print.css" type="text/css" media="print" />
  9. <script src="../public/build/app.js"></script>
  10. </head>
  11. <body>
  12. <nav class="navbar navbar-default navbar-fixed-top">
  13. <div class="container">
  14. <div class="navbar-header">
  15. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
  16. <span class="sr-only">Toggle navigation</span>
  17. <span class="icon-bar"></span>
  18. <span class="icon-bar"></span>
  19. <span class="icon-bar"></span>
  20. </button>
  21. <a class="navbar-brand" href="#">Chamilo - Documentation</a>
  22. </div>
  23. <div class="collapse navbar-collapse">
  24. <ul class="nav navbar-nav">
  25. <li class="active"><a href="index.html">Home</a></li>
  26. <li ><a href="readme.html">About</a></li>
  27. <li><a href="license.html">License</a></li>
  28. <li><a href="credits.html">Credits</a></li>
  29. <li ><a href="dependencies.html">Dependencies</a></li>
  30. <li><a href="changelog.html">Changelog</a></li>
  31. </ul>
  32. </div><!--/.nav-collapse -->
  33. </div>
  34. </nav>
  35. <div class="container">
  36. <h1>Chamilo 1.11 - Installation Guide</h1>
  37. <p>Thank you for downloading Chamilo</p>
  38. <ul>
  39. <li>You can test Chamilo LMS, as teacher, without installing it, on <a href="http://campus.chamilo.org">Free Campus</a></li>
  40. </ul>
  41. <p>This guide explains how to install Chamilo FREE. Please read this fully before proceeding with the installation.</p>
  42. <p>Spanish: También puede leer <a href="installation_guide_es_ES.html">esta guía de instalación en español</a>.</p>
  43. <p>French: Vous pouvez aussi lire <a href="installation_guide_fr_FR.html">ce guide d'installation en français</a>.</p>
  44. <p>Italian: You can also read <a href="installation_guide_it_IT.html">this guide in Italian</a>.</p>
  45. <h2><b>Contents</b></h2>
  46. <ol>
  47. <li><a href="#1._Pre-requisites">Pre-requisites</a></li>
  48. <li><a href="#2._Installation_of_Chamilo_LMS">Installation of Chamilo LMS</a></li>
  49. <li><a href="#3._Upgrade">Upgrade</a></li>
  50. <li><a href="#4._Troubleshooting">Troubleshooting</a></li>
  51. <li><a href="#5._Administration_section">Administration section</a></li>
  52. <li><a href="#6._LDAP">LDAP&nbsp;</a></li>
  53. <li><a href="#9._WIRIS_mathematical_formulas">Mathematical formulas with WIRIS</a></li>
  54. <li><a href="#10._Xapian_fulltext_indexing">Full-text indexation with Xapian</a></li>
  55. <li><a href="#11._Chamilo_rapid_ppt_conversion">Chamilo Rapid - PPT conversion system</a></li>
  56. <li><a href="#12._Setting_cron_up">Setting chronological tasks</a></li>
  57. <li><a href="#13._Changing_language_names_order">Changing the language's firstname/lastname order</a></li>
  58. <li><a href="#14._Improving_files_download">Improving files download time</a></li>
  59. <li><a href="#15._Videoconference">Videoconference</a></li>
  60. <li><a href="#16._Rewrite">Rewrite configurations</a></li>
  61. <li><a href="#17._Git_Upgrade">Upgrading from Git</a></li>
  62. </ol>
  63. <br />
  64. <hr style="width: 100%; height: 2px;" />
  65. <h2><a name="1._Pre-requisites"></a>1. Pre-requisites</h2>
  66. Chamilo
  67. can be installed on Windows, Linux, Mac OS X and UNIX servers
  68. indifferently. However, we recommend the use of Linux server for
  69. optimal flexibility, remote control and scalability. <br />
  70. <br />
  71. Chamilo is mainly a LMS running (the so called <span style="font-weight: bold;">AMP</span> trilogy): <br />
  72. <ul>
  73. <li><span style="font-weight: bold;">Apache 2.2+</span></li>
  74. <li><span style="font-weight: bold;">MySQL 5.6+ or MariaDB 5+</span></li>
  75. <li><span style="font-weight: bold;">PHP 5.5+ (7.2 recommended for greater efficiency)</span></li>
  76. </ul>
  77. <br />
  78. All these pieces of software are free software and freely available. <br /><br />
  79. To run Chamilo <span style="font-weight: bold;">LMS</span> on your server, you need to install WAMP, LAMP or MAMP:
  80. <ul>
  81. <li>To install <span style="font-weight: bold;">WAMP</span> (AMP on Windows), we recommend the <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a> .exe installer<a href="http://www.apachefriends.org/en/xampp.html"></a></li>
  82. <li>To install <span style="font-weight: bold;">LAMP</span>
  83. (AMP on Linux), use the Package manager of your favourite distribution (Synaptic, RPMFinder etc.).
  84. For instance, on a Ubuntu server,&nbsp;use Shell or Synaptic following the
  85. <a href="http://ubuntuguide.org/wiki/Ubuntu:Feisty#Apache_HTTP_Server">Ubuntuguide on Apache</a> and the following sections
  86. </li>
  87. <li>To install <span style="font-weight: bold;">MAMP</span> (AMP on Mac OS X), refer to the <a href="http://www.mamp.info/en/index.php">MAMP</a> dedicated website<a href="http://www.mamp.info/en/index.php"></a></li>
  88. <li>Make sure you check the <a href="dependencies.html" title="Dependencies">Dependencies page</a> if you need to know the requirements in more precise way.
  89. </ul>
  90. <br />
  91. <h3><span style="font-weight: bold;">MySQL or MariaDB database server</span></h3>
  92. You will need a login and password allowing you to manage <em>and drop+create</em> a database. Usually, the default configuration on local computers is
  93. to allow you to connect as root with an empty password. It is <b>HIGHLY RECOMMENDED</b> to change the password and define a user with access to
  94. only a specific database. Please refer to the MySQL or MariaDB documentation in order to do this.<br />
  95. <br />
  96. <span class="text-muted">Chamilo versions prior to 1.9.0 required to choose between multiple databases and a deprecated single-database mode.
  97. This has been cleaned up and simplified to one single database.</span><br />
  98. <span class="text-muted">If you don't have create permissions for your database user, Chamilo will fail during
  99. installation because, to maintain the database clear of any remains of other systems, it will try to drop it
  100. before creating it again. This is explained in some detail in <a href="https://github.com/chamilo/chamilo-lms/issues/2172">this issue report</a></span><br />
  101. <h3><span style="font-weight: bold;">Apache's redirects</span></h3>
  102. Since version 1.10, Chamilo requires the web server to be able to deal with redirects. This is now very common within web platforms (be them CMS, LMS, ERP, etc) and allows them, between other things, to use URLs in an efficient and user-friendly manner.<br />
  103. If you don't use Apache as a web server, go to section "Rewrite configurations" at the end of this document.<br />
  104. If you do use Apache, configuring redirects is done in two small steps:
  105. <ul>
  106. <li>Enable the "rewrite" module in Apache (on the command line, run "<i>sudo a2enmod rewrite</i>")</li>
  107. <li>Configure the Apache's VirtualHost for your Chamilo to include the following block, which will allow .htaccess files within Chamilo to be interpreted</li>
  108. </ul>
  109. For Apache <=2.2 (where /var/www/chamilo should be replaced by the path to your Chamilo install):
  110. <pre>
  111. &lt;Directory /&gt;
  112. AllowOverride All
  113. Order allow,deny
  114. allow from all
  115. &lt;/Directory&gt;
  116. &lt;Directory /var/www/chamilo/&gt;
  117. AllowOverride All
  118. Order allow,deny
  119. allow from all
  120. &lt;/Directory&gt;
  121. </pre>
  122. and for Apache >=2.4:
  123. <pre>
  124. &lt;Directory /&gt;
  125. AllowOverride All
  126. Require all granted
  127. &lt;/Directory&gt;
  128. &lt;Directory /var/www/chamilo/&gt;
  129. AllowOverride All
  130. Require all granted
  131. &lt;/Directory&gt;
  132. </pre>
  133. <br />
  134. Once configured (and maybe this has already been done by your hosting provider), you can simply restart the web server to enable the change.
  135. <hr style="width: 100%; height: 2px;" />
  136. <h2><a name="2._Installation_of_Chamilo_LMS"></a><span style="font-weight: bold;">2. Installation of Chamilo LMS</span></h2>
  137. <p>
  138. Before you start installing Chamilo LMS, you must understand that, because we provide Chamilo as free software, many services providers
  139. have been able to develop extensions of Chamilo, which have made it possible to install Chamilo in many ways:<br />
  140. <ul>
  141. <li>As an all-in-one package through an official provider, certified by the Chamilo Association</li>
  142. <li>As an installable solution from one of many hosting providers who support cPanel with Scriptaculous</li>
  143. <li>At your preferred hosting provider using remote installers like Installatron</li>
  144. <li>Through a Docker container image</li>
  145. <li>On your own server, downloading and installing manually</li>
  146. <li>On your own computer, at home or at the office, just for testing or development</li>
  147. </ul>
  148. This guide only covers these 2 last methods. For other methods, you can always ask more information from the provider you will choose.
  149. <br /><br />
  150. To install, follow these 6 simple steps:
  151. <ol>
  152. <li><a href="https://chamilo.org/chamilo-lms/">Download Chamilo LMS</a></li>
  153. <li>Unzip it</li>
  154. <li>Copy the Chamilo directory in your web server's root directory. This can be
  155. <span style="font-weight: bold;">C:\xampp\htdocs\</span> on a Windows server or <span style="font-weight: bold;">/var/www/html/chamilo</span> (or /var/www/chamilo/) on a Linux server (You need to create the folder "chamilo")</li>
  156. <li>Verify your web server supports .htaccess files (see Rewrite section below)</li>
  157. <li>Open your web browser and type
  158. <span style="font-weight: bold;">http://localhost/chamilo/</span> if you install locally for test purposes or
  159. <span style="font-weight: bold;">http://www.your-chamilo-domain.com</span> if you install remotely*
  160. </li>
  161. <li>Follow the web installation process. You can accept all default values. Consider changing the admin password to remember it.&nbsp;</li>
  162. </ol>
  163. <h3>Recommendations</h3>
  164. <ul>
  165. <li>We recommend defining a specific Virtual Host for this installation.</li>
  166. <li>If you have to install multiple Chamilo instances, avoid the installation of Chamilo in a inside a folder, instead prefer the use of different domains or using subdomains examples:
  167. <ol>
  168. <li>http://www.my-domain.com/ (<i class="fa fa-check" aria-hidden="true"></i> recommended)</li>
  169. <li>http://chamilo.my-domain.com (<i class="fa fa-check" aria-hidden="true"></i> recommended)</li>
  170. <li>http://chamilo2.my-domain.com (<i class="fa fa-check" aria-hidden="true"></i> recommended)</li>
  171. <li>http://www.my-domain.com/chamilo (<i class="fa fa-times" aria-hidden="true"></i> not recommended)</li>
  172. <li>http://www.my-domain.com/chamilo2 (<i class="fa fa-times" aria-hidden="true"></i> not recommended)</li>
  173. <li>http://chamilo.my-domain.com/my-chamilo/ (<i class="fa fa-times" aria-hidden="true"></i> not recommended)</li>
  174. </ol>
  175. </li>
  176. </ul>
  177. <br />
  178. <span class="text-muted">
  179. Note: if installing Chamilo locally using localhost or the IP address of your computer during the installation, you might get issues
  180. while accessing from another computer. To avoid this, you can
  181. <a href="https://beeznest.com/blog/2013/01/15/answering-to-different-addresses-with-chamilo/">apply a little change to your configuration file</a>.
  182. </span>
  183. <h3>Permissions</h3>
  184. <p>The following directories need to be <b>readable, writeable and executable</b> by your web server.
  185. This usually requires no specific action on Windows servers, but will require a "chmod" under Linux and Mac. See instructions below.</p>
  186. Replace [chamilo] with the directory where your Chamilo installation is located):
  187. <ul>
  188. <li>[chamilo]/app/</li>
  189. <li>[chamilo]/vendor/ (only needs to be readable and executable)</li>
  190. <li>[chamilo]/web/</li>
  191. <li>[chamilo]/main/default_course_document/images/</li>
  192. </ul>
  193. Optionally, you can do the same to the following directory if you want to
  194. enable sub-languages definition:
  195. <ul>
  196. <li>[chamilo]/main/lang/</li>
  197. </ul>
  198. <p>
  199. If you find a tests/ directory at the root of your package, please delete it.
  200. This is a development directory that has not been checked for security issues,
  201. an it should *never* be accessible to final users on a production server.
  202. </p>
  203. <p><span class="text-muted">On Linux, Mac OS X and BSD operating systems you can use the <em>chmod 0775</em> command for this (although we recommend you seek advice from an
  204. experienced system administrator to avoid security issues). On Windows, you may need to check the properties of the folders (by right-clicking on them).</span></p>
  205. <h3>Post-installation security checklist</h3>
  206. <ul>
  207. <li><strong>Protect your configuration folder: </strong>
  208. make sure no one (but you) can overwrite it. You can find the config directory in
  209. <em>(chamilo folder)</em>/app/config.
  210. Make it read-only (windows/xwindows: right-click the file to edit the
  211. properties. linux/bsd/macosx: use the chmod 0555 command). The config
  212. file is created by your web server (Apache + PHP, usually) so you may
  213. need to be root user to change its permissions.</li>
  214. <li><strong>Configure your Chamilo portal: </strong>
  215. in the administration section of Chamilo, you can use the Chamilo Configuration
  216. Settings to adjust the behavior of your installation.</li>
  217. <li>For stronger security tips, please check our new <a href="./security.html">security guide</a> for more</li>
  218. </ul>
  219. <br />
  220. <h3>PHP configuration</h3>
  221. To get the best out of Chamilo, you need to finetune your PHP settings. Consider : <br />
  222. <ul>
  223. <li>Configuring Chamilo mail: Most of Chamilo uses the mail settings from the php.ini file. However,
  224. if you use a distinct e-mail server, you might need to adjust the
  225. e-mail setting in <em>(chamilo folder)</em>/app/config/mail.conf.php.</li>
  226. <li>Editing php.ini file (on Windows can usually be located at
  227. <span style="font-weight: bold;">C:\xampp\php\php.ini</span>,
  228. on Ubuntu Linux :
  229. <span style="font-weight: bold;">/etc/php5/apache2/php.ini</span></li>
  230. <li>search the word "_max" and increase the following values to optimise the server</li>
  231. </ul>
  232. <pre>
  233. max_execution_time = 300; Maximum execution time of each script, in seconds
  234. max_input_time = 600; Maximum amount of time each script may spend parsing request data
  235. memory_limit = 256M; Maximum amount of memory a script may consume (128MB)
  236. post_max_size = 100M
  237. upload_max_filesize = 100M;
  238. short_open_tag = Off
  239. safe_mode = Off
  240. magic_quotes_gpc = Off
  241. magic_quotes_runtime = Off</pre>
  242. <p><strong>Important:</strong> You need to set
  243. your <em>date.timezone</em> setting to whatever your server's timezone is. For example, if your server is in the 'America/New_York' timezone,
  244. set the date.timezone parameter to this value in your php.ini:</p>
  245. <pre>
  246. date.timezone = 'America/New_York'
  247. </pre>
  248. <br />
  249. <p><strong>Note:</strong> <span class="text-muted">PHP 5.3.9 introduces a new setting "max_input_vars", which limits the number of elements you can send in one single form. If you are dealing with numerous users or very long learning paths (many items), make sure you set this setting higher than its default value of 1000.</span></p>
  250. <p><strong>BSD and CentOS users:</strong> these php libraries have to be included during the PHP installation (php5 might have to be replaced by php in some instances):</p>
  251. <ul>
  252. <li>php5-session: The session shared extension for php</li>
  253. <li>php5-mysqlnd (or php5-mysqli): The mysql shared extension for php</li>
  254. <li>php5-zlib: The zlib shared extension for php</li>
  255. <li>php5-pcre: The pcre shared extension for php</li>
  256. <li>php5-xml</li>
  257. <li>php5-json</li>
  258. <li>php5-mcrypt</li>
  259. <li>php5-iconv or php5-mbstring (either one of them)</li>
  260. <li>php5-gd The graphics-generation extension for PHP</li>
  261. <li>php5-intl The international behaviours extension for PHP</li>
  262. </ul>
  263. <p>You might also add the following php modules and packages:</p>
  264. <ul>
  265. <li>php5-ctype</li>
  266. <li>php5-ldap</li>
  267. <li>php5-xapian</li>
  268. <li>php5-curl</li>
  269. <li>php5-xsl</li>
  270. </ul>
  271. <hr />
  272. <h2><a name="3._Upgrade"></a>3. Upgrade</h2>
  273. Before upgrading, we <b>heavily</b> recommend you do a full backup of the previous
  274. Chamilo directories and databases. If you are unsure how to achieve this
  275. please ask your hosting provider for advice <b>before</b> you continue further.<br /><br />
  276. <div class="text-muted"> NOTE: For very heavy Chamilo databases, some of our official
  277. providers have developed improved migration procedures that use more memory but
  278. process the upgrades much faster. If this is the kind of thing you
  279. need, we highly recommend you contact them (see reference below).</div>
  280. <br />
  281. <div class="text-muted"> NOTE: This version of Chamilo can only be used to upgrade
  282. from earlier versions of Chamilo 1.9.*. You cannot use the normal
  283. upgrade scripts from Chamilo 1.11 to upgrade from Chamilo 1.8.* or even Dok€os 2.0
  284. (which was born after the split with Chamilo). If you need this, please contact one
  285. of the Chamilo Association's <a href="https://chamilo.org/providers">official providers</a>)</div>
  286. <p></p>
  287. <h3>3.1 Upgrading from Chamilo 1.11.x (Minor version)</h3>
  288. As this is only a minor version change from previous 1.11.* versions of Chamilo, the only thing you need to do is:
  289. <ul>
  290. <li> check that you haven't left any customised stylesheet or image <span class="text-muted">(if you have, make sure you keep a copy on the side*)</span></li>
  291. <li> download the Chamilo 1.11 install package from the <a href="http://www.chamilo.org/download">Chamilo download page</a></li>
  292. <li> unzip the new files of Chamilo 1.11 over the files of the older version
  293. (or unzip the files in one folder and then copy the files from there to the
  294. older version's directory).</li>
  295. <li> clean your app/cache/twig directory: delete all the contents *in* this directory (do NOT remove the directory itself, only its contents!).
  296. It will all be re-generated.
  297. You can also delete the contents of this directory through the "Archive directory cleanup" option in the "System" box of the Administration page.</li>
  298. <li> you're done! No other upgrade procedure is required</li>
  299. </ul>
  300. <h3>3.2 Upgrading from Chamilo 1.10.x</h3>
  301. <ul>
  302. <li> check that you haven't left any customised stylesheet or image <span class="text-muted">(if you have, make sure you keep a copy on the side*)</span></li>
  303. <li> download the Chamilo 1.11 install package from the <a href="http://www.chamilo.org/download">Chamilo download page</a></li>
  304. <li> unzip the new files of Chamilo 1.11 over the files of the older version
  305. (or unzip the files in one folder and then copy the files from there to the
  306. older version's directory). Note that you should remove the "home" and
  307. "searchdb" directories from the package before you overwrite the previous
  308. files.</li>
  309. <li> clean your app/cache/twig directory: delete all the contents *in* this directory (do NOT remove the directory itself, only its contents!). It will all be re-generated. You can also delete the contents of this directory through the "Archive directory cleanup" option in the "System" box of the Administration page.</li>
  310. <li>Go to your portal install page (main/install/) and follow the upgrade procedure</li>
  311. </ul>
  312. Please note that if you (unluckily) upgraded from any of the 1.9 versions to 1.10.0 against our recommendations, we
  313. provide a patch script that should get most of it in order. The script is available here:<br />
  314. <a href="https://raw.githubusercontent.com/chamilo/chamilo-lms/1.10.x/tests/scripts/fix_migrations_1.9.x_1.10.0.php">https://raw.githubusercontent.com/chamilo/chamilo-lms/1.10.x/tests/scripts/fix_migrations_1.9.x_1.10.0.php</a> or, if
  315. you are using a development version of Chamilo, directly into you tests/scripts/ folder. You should place the file
  316. in the /tests/scripts/ folder, then edit it to remove the "die();" line, then launch it from your browser (after
  317. connecting to your Chamilo site as admin). You should also remove the scripts afterwards.<br />
  318. This script is provided without warranty. Please *always* take a backup before you use it.
  319. <br />
  320. <h3>3.3 Upgrading from Chamilo 1.9.x</h3>
  321. <p>Chamilo LMS 1.11.x comes with a new database structure in comparison to 1.9,
  322. as was the case between 1.9 and 1.8.
  323. Although the upgrade script takes the migration in charge, it might be generating
  324. a very heavy load on your server during the upgrade, and will change your
  325. database considerably, preserving the data as well as possible (we have tested
  326. the procedure many times, but remember this is GNU/GPLv3 and we cannot be held
  327. responsible for what would happen to your data without professional supervision).
  328. This is why we *really* recommend you take a full backup of your system before
  329. you upgrade.</p>
  330. Also note that Chamilo LMS 1.10 unites all language files from the
  331. main/lang/ directory into one single file by language.
  332. If you have changed language files directly (instead of
  333. using the recommended way: sub-languages), you should take a backup copy of
  334. these changed translations before you upgrade. Sublanguages might also require
  335. some manual work, but the upgrade procedure will not touch sublanguages directly.
  336. <br /><br />
  337. <ul>
  338. <li> make sure you don't have tables from previous versions of Chamilo still hanging around. These can cause the upgrade to fail. In particular, tables from versions 1.8.* could have multiple tables for each course, resulting in many tables with the same prefix. Only tables without prefix or with a "c_" prefix exist in 1.9 and superior versions. Make sure none of these tables persist. Take a backup of your database (just in case) and delete these prefixed tables (drop table ...).</li>
  339. <li> check that you haven't left any customised stylesheet or image <span class="text-muted">(if you have, make sure you keep a copy on the side*)</span></li>
  340. <li> download the Chamilo 1.11 install package from the <a href="http://www.chamilo.org/download">Chamilo download page</a></li>
  341. <li> unzip the new files of Chamilo 1.11 over the files of the older version (or unzip the files in one folder and then copy the files from there to the older version's directory)</li>
  342. <li> make *absolutely sure* that the .htaccess file of version 1.11 is copied as well</li>
  343. <li> make sure "AllowOverride All" is present in your Apache configuration, as interpreting the .htaccess files is very important for Chamilo to work (note that the Order-Allow directive has been replaced by "Require all granted" in Apache 2.4)</li>
  344. <li> point your browser on your portal URL + main/install/</li>
  345. <li> click&nbsp;<span style="font-style: italic;">Install</span>, then choose <span style="font-style: italic;">Upgrade from 1.9.*</span></li>
  346. <li> once your portal is upgraded, clean your app/cache/twig directory: delete all the contents *in* this directory (do NOT remove the directory itself, only its contents!). It will all be re-generated. You can also delete the contents of this directory through the "Archive directory cleanup" option in the "System" box of the Administration page.</li>
  347. </ul>
  348. <br />
  349. <span class="text-muted">* Styles and images are located in the main/css or main/img
  350. directories. You can still recover them from your backup if you have made it.
  351. Any modified style or image that uses the default style/image name will be
  352. overwritten by the next step. To avoid loosing your customisations, always
  353. ensure you copy the styles/images under a new name and use and modify the
  354. copy, not the original. The original will always be overwritten by newer
  355. versions. In Dok€os 1.8.5, we have changed the name of several CSS themes.
  356. Backwards compatibility is ensured by the fact that an upgrade only adds the
  357. new themes, but you should try and use these new themes rather than sticking
  358. to the old ones which will be deprecated shortly (not maintained).</span>
  359. <br />
  360. <p></p>
  361. <p>
  362. <b>WARNING:</b><br />
  363. Do not delete the previous Chamilo installation directory before installing
  364. the new one. The upgrade process should take care of all unrequired folders.</p>
  365. <h3>3.4 Upgrading from Chamilo 1.8.x</h3>
  366. To upgrade from version of Chamilo prior to 1.9.0, you will need to first upgrade them to 1.9.10.x, then upgrade again (separately) to 1.11.x.
  367. You can find the 1.9.10.x packages here: <a href="https://github.com/chamilo/chamilo-lms/releases">https://github.com/chamilo/chamilo-lms/releases</a>
  368. <p></p>
  369. <h3>3.5 Directories permissions when upgrading from 1.9.x</h3>
  370. The following directories need to be readable, writeable and executable for the web server:
  371. <ul>
  372. <li>[chamilo]/main/lang/ (in order to delete unnecessary language files)</li>
  373. <li>[chamilo]/courses/ (in order to move the courses files to the app/courses folder)</li>
  374. <li>[chamilo]/archive/ (in order to remove unnecessary files or move them to app/cache/)</li>
  375. <li>[chamilo]/home/ (in order to move files to app/home)</li>
  376. <li>[chamilo]/app</li>
  377. <li>[chamilo]/web</li>
  378. <li>[chamilo]/vendor</li>
  379. <li>[chamilo]/main/default_course_document/images/</li>
  380. </ul>
  381. On Linux, Mac OS X and BSD operating systems you can quick-fix this using the
  382. <em>chmod 0777</em> command, but if you are unsure, we recommend you seek advice for
  383. your own OS on <a href="https://chamilo.org/forum">our forum</a>.
  384. In Windows, you may need to check the properties of the folders.
  385. <p></p>
  386. <hr style="width: 100%; height: 2px;" />
  387. <h2><a name="4._Troubleshooting"></a>4. Troubleshooting</h2>
  388. <p>If you have problems, go to the <a href="https://chamilo.org">Chamilo website</a> and ask a question on the
  389. <a href="https://chamilo.org/forum">support forum</a>. Please read the previous messages first to see if there is
  390. already an answer to your question.</p>
  391. <hr style="width: 100%; height: 2px;" />
  392. <h2><a name="5._Administration_section"></a>5. Administration section</h2>
  393. <p>To access the Chamilo administration section, open browser, go to your Chamilo adress and log in with the admin user.
  394. Then you will see a "Administration" tab in the webpage header. You can manage users, courses, sessions, portal look
  395. and feel, homepage content, course categories etc. there&nbsp;</p>
  396. <p></p>
  397. <hr style="width: 100%; height: 2px;" />
  398. <h2><a name="6._LDAP"></a>6. LDAP</h2>
  399. <p>
  400. <i>This part is optional, only organisations with an LDAP server will need to read this.</i><br />
  401. An LDAP module is already provided in Chamilo, but it has to be configured to make it work.</p>
  402. <h3><b>Compiling</b></h3>
  403. <p>
  404. Linux servers: It's possible that you have to recompile php with ldap support.
  405. Newer distributions also allow downloading rpms for additional packages.</p>
  406. <h3><b>Activating LDAP in Chamilo</b></h3>
  407. <p class="text-muted">Note: Please check
  408. the LDAP configuration settings inside Chamilo to learn the details.</p>
  409. In [Chamilo folder]/app/config/configuration.php, around line 93, you'll find settings like the following: <br />
  410. <pre>
  411. // -> Uncomment the two lines below to activate LDAP AND edit main/inc/conf/auth.conf.php for configuration
  412. // $extAuthSource["extldap"]["login"] = $_configuration['root_sys'].$_configuration['code_append']."auth/external_login/login.ldap.php";
  413. // $extAuthSource["extldap"]["newUser"] = $_configuration['root_sys'].$_configuration['code_append']."auth/external_login/newUser.ldap.php";
  414. </pre>
  415. remove the // from the last two lines to activate LDAP.<br />
  416. <h3><b>Settings</b></h3>
  417. <p>
  418. Ask the LDAP server admin for the settings:</p>
  419. <ul>
  420. <li>ldap server name</li>
  421. <li>ldap server port (usually 389)</li>
  422. <li>ldap dc</li>
  423. </ul>
  424. Since 1.8.5, you have to change the LDAP settings inside the "Portal
  425. administration" panel, under "Chamilo configuration settings", section
  426. "LDAP".
  427. <br />
  428. As an example, you should find the following kind of values:<br />
  429. LDAP main server's address: "myldapserver.com"; // your ldap server<br />
  430. LDAP main server's port: 389; // your ldap server's port number<br />
  431. LDAP domain: "dc=xx, dc=yy, dc=zz"; //domain<br />
  432. <br />
  433. <h3><b>Teacher/student status</b></h3>
  434. <p>
  435. By default, Chamilo will check if the "employeenumber" field has a value. If it has, then Chamilo will
  436. consider this user as being a teacher.<br />
  437. If you want to change this behaviour, you can edit main/auth/ldap/authldap.php, function ldap_put_user_info_locally(),
  438. and change the <em>if (empty($info_array[$tutor_field]))</em> condition to whatever suits you.<br />
  439. You can also remove this check by removing the condition and leaving only the <em>$status = STUDENT;</em> line.</p>
  440. <h3><b>Protected LDAP servers</b></h3>
  441. <p>
  442. Some LDAP servers do not support anonymous use of the directory services.<br />
  443. In this case, you should fill in the appropriate fields in the
  444. administration panel (e.g. "manager" and "mypassword") and Chamilo will
  445. try to authenticate using these, or fall back to anonymous mode before
  446. giving up.</p>
  447. <h3>LDAP import into sessions</h3>
  448. <p>There is a new set of scripts now that allow you to insert users
  449. from LDAP directly into a Chamilo session. This, however, relies on a
  450. set of static choices in the LDAP contact attributes.<br />
  451. The fields used intensively by the Chamlio module are:<br />
  452. </p>
  453. <ul>
  454. <li>uid, which is matched to the username in Chamilo</li>
  455. <li>userPassword, which is matched to the user password, although
  456. this part will only work for non-encrypted passwords for now, but it
  457. shouldn't be necessary if using the LDAP server as authentication</li>
  458. <li>ou should end with the year of the person registration or any
  459. criteria you will use to filter users, so that they can be retrieved on
  460. that criteria</li>
  461. <li>sn is used as the lastname field in Chamilo</li>
  462. <li>givenName is used as the firstname field in Chamilo</li>
  463. <li>mail is used as the email field in Chamilo</li>
  464. </ul>
  465. <hr style="width: 100%; height: 2px;" />
  466. <h2><a name="9._WIRIS_mathematical_formulas"></a>7. Mathematical formulas with WIRIS</h2>
  467. <p>Installing this plugin you get WIRIS editor and WIRIS CAS. <br/>
  468. This activation will not be completed unless you have previously downloaded the <a href="http://www.wiris.com/plugins/ckeditor/download" target="_blank">PHP plugin for CKeditor WIRIS</a> and unzipped its contents into the main/inc/lib/ckeditor/editor/plugins/ckeditor_wiris/ directory. <br/>This is necessary because Wiris is proprietary software and its services are <a href="http://www.wiris.com/store/who-pays" target="_blank">commercial</a>. To make adjustments to the plugin, edit configuration.ini file or replace his content by configuration.ini.default Chamilo file.</p>
  469. <hr style="width: 100%; height: 2px;" />
  470. <h2><a name="10._Xapian_fulltext_indexing"></a>8. Full-text indexation with Xapian</h2>
  471. <p>
  472. <em>Note</em>: This step will require a dedicated server or a virtual dedicated server as the packages involved are not available on most shared hosting solutions.<br />
  473. On Debian or Ubuntu 10.04 and superior, you will simply need to install the php5-xapian package and restart your web server:
  474. <pre>
  475. sudo apt-get install php5-xapian
  476. sudo /etc/init.d/apache2 restart
  477. </pre>
  478. <p>
  479. Then go to your administration page -&gt; Configuration settings -&gt; Search
  480. and enable the search tool. Follow the recommendations on the page to get the
  481. complete indexing suite installed. Once you're done, all documents you import
  482. into your Chamilo portal in a recognized format will be indexed and searchable.
  483. Chamilo intermediate Administrators training (which you can ask any <a href="http://www.chamilo.org/en/providers">Chamilo's Official Provider</a> for) include a full review of the full-text search feature.</p>
  484. <p class="text-muted">
  485. Note: Xapian's licensing for the PHP extension is a bit different than what is necessary to enter the Debian repositories, so it has been excluded. You can, however, generate your own package by following the <a href="http://trac.xapian.org/wiki/FAQ/PHP%20Bindings%20Package">packaging instructions on Xapian's wiki</a>.
  486. </p>
  487. <hr style="width: 100%; height: 2px;" />
  488. <h2><a name="11._Chamilo_rapid_ppt_conversion"></a>9. Chamilo Rapid - PPT conversion system</h2>
  489. <p>
  490. <em>Note</em>: This step will require a dedicated server or a virtual dedicated server as the packages involved are not available on most shared hosting solutions.<br />
  491. On Debian or Ubuntu 11.10 and superior, install LibreOffice v3 (or v4) and start it as a headless server:
  492. <pre>
  493. sudo apt-get install libreoffice screen
  494. sudo adduser rapid
  495. sudo adduser rapid www-data
  496. screen
  497. sudo -s
  498. su - rapid
  499. soffice --accept="socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;" --headless --nodefault --nofirststartwizard --nolockcheck --nologo --norestore
  500. CTRL+a, CTRL+d
  501. </pre>
  502. Please note that this will effectively launch LibreOffice in a "headless" mode (thanks to the --headless option), in a "headless" terminal (thanks to screen). You can later get back into your "headless" terminal by launching:
  503. <pre>
  504. sudo screen -r
  505. </pre>
  506. You can then go to your administration page -&gt; <i>Chamilo Rapid</i> and set the host to "localhost" and the port to "2002". Save. Go to your course, learning path tool and see the new icon appeared. Import your PPT. This should work.
  507. <em>Note</em>: Sometimes, this doesn't work out so easily. You can probably ask for the assistance of any system administrator around with a bit of Java and PHP experience, or you can always ask one of the Chamilo's Official Providers for assistance (ask for a guaranteed commercial contract). The above is *not* meant for production servers with a high load. You should get a real system administrator to look at it and develop init scripts, in a way that makes monitoring and relaunching feasable. If any sysadmin wants to contribute this, feel free to contribute it to Chamilo: send us an e-mail at info@chamilo.org.
  508. <em>Note</em>: If you use LibreOffice 4, please note that version 4.2 (available in Ubuntu 14.04) has demonstrated to be more successfull at converting documents than version 4.1, which tended to crash when sending a document for conversion.
  509. <hr style="width: 100%; height: 2px;" />
  510. <h2><a name="12._Setting_cron_up"></a>10. Setting chronological tasks</h2>
  511. <p>
  512. Since Chamilo 1.8.8, a few tasks need to be executed regularly in order to get
  513. the best out of your server resources. One of such tasks (and the only one
  514. around at the time of Chamilo 1.8.8) is the sending of internal messaging
  515. notifications by e-mail, i.e. when you receive an e-mail from another person or
  516. from a group inside the internal messaging system of Chamilo, if all e-mails are
  517. sent immediately, then you might not have the chance to receive them at your
  518. pace, once a day or even once a week. For cases like this you, as a Chamilo
  519. administrator, should setup a cron process on the server to check the queue of
  520. e-mails and send is timely.</p>
  521. Setting up a cron task is easy and there are several ways to do it. We recommend
  522. you have a look at the <a href="http://drupal.org/cron">Drupal documentation
  523. for setting up cron</a> and define your own cron process as:
  524. <pre>
  525. 35 * * * * wget -O - -q -t 1 http://campus.example.com/main/cron/run.php
  526. </pre>
  527. Make sure you have a look into run.php as maybe you want to change a few
  528. settings there.
  529. <hr style="width: 100%; height: 2px;" />
  530. <h2><a name="13._Changing_language_names_order"></a>11. Changing the language's firstname/lastname order</h2>
  531. As Chamilo becomes more popular and crosses many borders now, it frequently happens that administrators want to re-order the firstname and lastname fields in tables, and also on which field it is sorted first.<br/><br />
  532. This can easily be modified by editing the app/config/configuration.php file, finding the following section, uncommenting the PHP lines and adapting it to your language:<br />
  533. <pre>// Custom name_order_conventions
  534. //$_configuration['name_order_conventions'] = array(
  535. // 'french' => array('format' => 'title last_name first_name', 'sort_by' => 'last_name')
  536. //);</pre><br />
  537. Feel free to change this to<br />
  538. <pre>// Custom name_order_conventions
  539. $_configuration['name_order_conventions'] = array(
  540. 'french' => array('format' => 'first_name last_name', 'sort_by' => 'last_name')
  541. );
  542. </pre>
  543. <br />
  544. for example. The effect should be immediate.
  545. <br />
  546. Please note that, although Chamilo allows you to define its position, the "title" field does not exist at this time, so no need to worry about it.
  547. <hr style="width: 100%; height: 2px;" />
  548. <h2><a name="14._Improving_files_download"></a>12. Improving files download efficiency</h2>
  549. File download can be very slow when passing through a PHP script to control permissions. One solution to this
  550. is to use the X-Sendfile header, which depends on a module on the webserver. <a href="http://stackoverflow.com/a/3731639/1406662">Check http://stackoverflow.com/a/3731639/1406662 for more details on implementing Sendfile</a>.
  551. Chamilo LMS 1.9.8 (and following versions) supports the X-Sendfile headers, but requires a specific line of configuration to be
  552. added to configuration.php:
  553. <pre>
  554. $_configuration['enable_x_sendfile_headers'] = true;
  555. </pre>
  556. If you have issues with files taking a long time to download, make sure you reconfigure your webserver and add this line. You should see an notable difference in download time.
  557. <hr style="width: 100%; height: 2px;" />
  558. <h2><a name="15._Videoconference"></a>13. Videoconference</h2>
  559. <p>
  560. Chamilo supports the connection to two different videoconference servers: BigBlueButton (versions 0.81, 0.9 and 1.0) and OpenMeetings.<br />
  561. While BigBlueButton seem easier to install, more clearly documented and more
  562. esthetically finished, some users have manifested that OpenMeetings
  563. consumes less bandwidth, is less restrictive in terms of running environments
  564. and offers more tools and connectors.<br />
  565. The decision is up to you, but in any case you will have to install a
  566. videoconference server separately from the normal Chamilo LMS installation
  567. process.<br />
  568. You will find the <a href="http://docs.bigbluebutton.org/install/install.html">installation guide for BigBlueButton here</a>. Once installed,
  569. issue a "bbb-conf --secret" on the command line to get the parameters to
  570. indicate in the "Videoconference" plugin in Chamilo (platform settings page).<br />
  571. This should make an additional "Videoconference" tool icon appear in every course.<br />
  572. </p>
  573. <hr style="width: 100%; height: 2px;" />
  574. <h2><a name="16._Rewrite"></a>14. Rewrite</h2>
  575. <p>
  576. Chamilo LMS 1.10 is the first version to require the web server to allow redirections of requests (and so 1.11 does as well).<br />
  577. For Apache, this is done through enabling the Rewrite module and either allowing overrides (through .htaccess) or adding a specific configuration section to the VirtualHost defined for Apache.<br />
  578. For Nginx, this is done through specific redirection rules in the corresponding virtual host (server clause).<br /><br />
  579. To make sure this isn't too complex for anyone, we recommend a configuration below to help you out in both cases.
  580. Please note that using .htaccess is the easiest way but might affect your server load considerably,
  581. given .htaccess files are interpreted on *every* request, while a configuration block in your VirtualHost
  582. section is compiled at configuration reload time.
  583. <h3>Apache + .htaccess</h3>
  584. To enable .htaccess on Apache, you just need to check 1 thing: In a &lt;Directory&gt; block of the root folder of Chamilo, ensure the following lines are present:
  585. <pre>
  586. &lt;Directory /&gt;
  587. AllowOverride All
  588. Order allow,deny
  589. allow from all
  590. &lt;/Directory&gt;
  591. </pre>
  592. or, if you are working with Apache 2.4, that syntax changed a little and looks more like this:
  593. <pre>
  594. &lt;Directory /&gt;
  595. AllowOverride All
  596. Require all granted
  597. &lt;/Directory&gt;
  598. </pre>
  599. <h3>Apache RewriteRules</h3>
  600. <pre>
  601. &lt;LocationMatch "/.git*"&gt;
  602. order deny,allow
  603. deny from all
  604. &lt;/LocationMatch&gt;
  605. &lt;Directory ~/.&gt;
  606. AllowOverride None
  607. Options -Indexes
  608. &lt;/Directory&gt;
  609. &lt;Directory "/var/www/chamilo"&gt;
  610. RewriteEngine On
  611. RewriteCond %{QUERY_STRING} ^id=(.*)$
  612. RewriteRule ^certificates/$ certificates/index.php?id=%1 [L]
  613. RewriteRule ^courses/([^/]+)/?$ main/course_home/course_home.php?cDir=$1 [QSA,L]
  614. RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cDir=$1 [QSA,L]
  615. RewriteRule ^courses/([^/]+)/scorm/(.*([\.js|\.css|\.png|\.jpg|\.jpeg|\.gif]))$ app/courses/$1/scorm/$2 [QSA,L]
  616. RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L]
  617. RewriteRule ^courses/([^/]+)/document/certificates/(.*)$ app/courses/$1/document/certificates/$2 [QSA,L]
  618. RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L]
  619. RewriteRule ^courses/([^/]+)/upload/course_home_icons/(.*([\.js|\.css|\.png|\.jpg|\.jpeg|\.gif]))$ app/courses/$1/upload/course_home_icons/$2 [QSA,L]
  620. RewriteRule ^courses/([^/]+)/upload/([^/]+)/(.*)$ main/document/download_uploaded_files.php?code=$1&type=$2&file=$3 [QSA,L]
  621. RewriteRule ^courses/([^/]+)/work/(.*)$ main/work/download.php?file=work/$2&cDir=$1 [QSA,L]
  622. RewriteRule ^courses/([^/]+)/course-pic85x85.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_source [QSA,L]
  623. RewriteRule ^courses/([^/]+)/course-pic.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_large_source [QSA,L]
  624. RewriteRule ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L]
  625. RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L]
  626. RewriteRule ^course/(\d{1,})/about/?$ main/course_info/about.php?course_id=$1 [L]
  627. RewriteRule ^badge/(\d{1,}) main/badge/issued.php?issue=$1 [L]
  628. RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L]
  629. RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L]
  630. RewriteRule ^main/exercice/(.*)$ main/exercise/$1 [QSA,L]
  631. RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L]
  632. RewriteRule ^service/(\d{1,})$ plugin/buycourses/src/service_information.php?service_id=$1 [L]
  633. RewriteRule ^lti/os$ plugin/ims_lti/outcome_service.php [L]
  634. RewriteRule ^([^/.]+)/?$ user.php?$1 [L]
  635. RewriteRule ^(tests|.git) - [F,L,NC]
  636. &lt;/Directory&gt;
  637. AddType application/font-woff .woff .woff2
  638. &lt;IfModule mod_expires.c&gt;
  639. ExpiresActive On
  640. ExpiresByType application/font-woff "access plus 1 month"
  641. &lt;/IfModule&gt;
  642. </pre>
  643. <h3>Nginx</h3>
  644. Nginx doesn't support .htaccess rules, so you have no other option than to apply the following rules (note that your PHP backend configuration may vary).
  645. These are only the redirection rules to be placed inside a server{} block, as other settings might differ from one installation to another.
  646. <pre>
  647. # Add your own "server {" header here with listen, server_name, access_log, error_log, index, root and error_page params
  648. charset utf-8;
  649. location @rewrite{
  650. rewrite ^certificates/$ certificates/index.php last;
  651. rewrite ^/courses/([^/]+)/$ /main/course_home/course_home.php?cDir=$1 last;
  652. rewrite ^/courses/([^/]+)/index.php$ /main/course_home/course_home.php?cDir=$1 last;
  653. rewrite ^/courses/([^/]+)/scorm/(.*)$ /main/document/download_scorm.php?doc_url=/$2&cDir=$1 last;
  654. # Alternatively, you can choose to give direct access to all SCORM files, which is much faster but less secure
  655. # rewrite "^/courses/([^/]+)/scorm/(.*)$" /app/courses/$1/scorm/$2 break;
  656. rewrite "^/courses/([^/]+)/document/certificates/(.*)$" /app/courses/$1/document/certificates/$2 last;
  657. rewrite ^/courses/([^/]+)/document/(.*)$ /main/document/download.php?doc_url=/$2&cDir=$1 last;
  658. rewrite ^/courses/([^/]+)/upload/([^/]+)/(.*)$ /main/document/download_uploaded_files.php?code=$1&type=$2&file=$3 last;
  659. rewrite ^/courses/([^/]+)/work/(.*)$ /main/work/download.php?file=work/$2&cDir=$1 last;
  660. rewrite ^/courses/([^/]+)/(.*)$ /app/courses/$1/$2 last;
  661. rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last;
  662. rewrite ^/course/([^/]+)/about/?$ /main/course_info/about.php?course_id=$1 last;
  663. rewrite ^/badge/(\d+) /main/badge/issued.php?issue=$1 last;
  664. rewrite ^/skill/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last;
  665. rewrite ^/badge/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last;
  666. rewrite ^/main/exercice/(.*)$ /main/exercise/$1 last;
  667. rewrite ^/main/newscorm/(.*)$ /main/lp/$1 last;
  668. rewrite ^/service/(\d+)$ /plugin/buycourses/src/service_information.php?service_id=$1 last;
  669. rewrite "^/main/upload/users/(.*)/(.*)/my_files/(.*)$" /app/upload/users/$1/$2/my_files/$3 last;
  670. try_files $uri /index.php$is_args$args;
  671. break;
  672. }
  673. location / {
  674. try_files $uri @rewrite;
  675. }
  676. location /main {
  677. rewrite ^/main/admin/?$ /main/admin/index.php last;
  678. }
  679. location ~ \.php$ {
  680. client_max_body_size 20M;
  681. try_files $uri @rewrite;
  682. fastcgi_pass unix:/var/run/php5-fpm.sock;
  683. fastcgi_split_path_info ^(.+\.php)(/.*)$;
  684. include fastcgi_params;
  685. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  686. fastcgi_param HTTPS off;
  687. }
  688. # Serve static files directly
  689. location ~* \.(png|jpe?g|gif|ico|js|css|mp3|swf|flv|mp4|ogg|woff|woff2)$ {
  690. expires 30d;
  691. access_log off;
  692. rewrite ^/courses/([^/]+)/course-pic85x85.png$ /app/courses/$1/course-pic85x85.png last;
  693. rewrite ^/courses/([^/]+)/course-pic.png$ /app/courses/$1/course-pic.png last;
  694. try_files $uri @rewrite;
  695. }
  696. location ~ ~\.(ht|git){
  697. deny all;
  698. }
  699. location ^~ /tests/ {
  700. deny all;
  701. }
  702. </pre>
  703. <h3>Apple on OS X servers</h3>
  704. <div>
  705. Scott Steven reports that Apache on OS X requires specific actions<br />
  706. <ul>
  707. <li>First, make sure you have the .htaccess file present at the root of your Chamilo folder</li>
  708. <li>Get to your Apache"s HTTPd.conf file and configure your domain and the fact that mod_rewrite is loaded</li>
  709. <li>In your Apple Server app, Advanced Settings, check the box to allow .htaccess</li>
  710. </ul>
  711. Alternatively, you can find the settings file for your domain in Apple's settings folder under
  712. /Library/Server/Web/Settings to update it manually.<br />
  713. You cannot, however, only allow .htaccess files in the main httpd.conf file, as OS X will override it with the
  714. domain-specific configuration file.
  715. </div>
  716. <h3>IIS</h3>
  717. <div>
  718. User @ullfindsmit on Github was kind enough to provide this IIS configuration after testing it based on our
  719. configurations above. This has not been tested by the Chamilo team, but the rules look legit:<br /><br />
  720. <pre>
  721. &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  722. &lt;configuration&gt;
  723. &lt;system.webServer&gt;
  724. &lt;rewrite&gt;
  725. &lt;rules&gt;
  726. &lt;rule name="rule 1v" stopProcessing="true"&gt;
  727. &lt;match url="^certificates/$" /&gt;
  728. &lt;action type="Rewrite" url="/certificates/index.php?id=%1" /&gt;
  729. &lt;/rule&gt;
  730. &lt;rule name="rule 2v" stopProcessing="true"&gt;
  731. &lt;match url="^courses/([^/]+)/?$" /&gt;
  732. &lt;action type="Rewrite" url="/main/course_home/course_home.php?cDir={R:1}" appendQueryString="true" /&gt;
  733. &lt;/rule&gt;
  734. &lt;rule name="rule 3v" stopProcessing="true"&gt;
  735. &lt;match url="^courses/([^/]+)/index.php$" /&gt;
  736. &lt;action type="Rewrite" url="/main/course_home/course_home.php?cDir={R:1}" appendQueryString="true" /&gt;
  737. &lt;/rule&gt;
  738. &lt;rule name="rule 4v" stopProcessing="true"&gt;
  739. &lt;match url="^courses/([^/]+)/scorm/(.*)$" /&gt;
  740. &lt;action type="Rewrite" url="/main/document/download_scorm.php?doc_url=/{R:2}&amp;cDir={R:1}" appendQueryString="true" /&gt;
  741. &lt;/rule&gt;
  742. &lt;rule name="rule 5v" stopProcessing="true"&gt;
  743. &lt;match url="^courses/([^/]+)/document/certificates/(.*)$" /&gt;
  744. &lt;action type="Rewrite" url="/app/courses/{R:1}/document/certificates/{R:2}" appendQueryString="true" /&gt;
  745. &lt;/rule&gt;
  746. &lt;rule name="rule 6v" stopProcessing="true"&gt;
  747. &lt;match url="^courses/([^/]+)/document/(.*)$" /&gt;
  748. &lt;action type="Rewrite" url="/main/document/download.php?doc_url=/{R:2}&amp;cDir={R:1}" appendQueryString="true" /&gt;
  749. &lt;/rule&gt;
  750. &lt;rule name="rule 7v" stopProcessing="true"&gt;
  751. &lt;match url="^courses/([^/]+)/upload/([^/]+)/(.*)$" /&gt;
  752. &lt;action type="Rewrite" url="/main/document/download_uploaded_files.php?code={R:1}&amp;type={R:2}&amp;file={R:3}" appendQueryString="true" /&gt;
  753. &lt;/rule&gt;
  754. &lt;rule name="rule 8v" stopProcessing="true"&gt;
  755. &lt;match url="^courses/([^/]+)/work/(.*)$" /&gt;
  756. &lt;action type="Rewrite" url="/main/work/download.php?file=work/{R:2}&amp;cDir={R:1}" appendQueryString="true" /&gt;
  757. &lt;/rule&gt;
  758. &lt;rule name="rule 9v" stopProcessing="true"&gt;
  759. &lt;match url="^courses/([^/]+)/course-pic85x85.png$" /&gt;
  760. &lt;action type="Rewrite" url="/main/inc/ajax/course.ajax.php?a=get_course_image&amp;code={R:1}&amp;image=course_image_source" appendQueryString="true" /&gt;
  761. &lt;/rule&gt;
  762. &lt;rule name="rule 10v" stopProcessing="true"&gt;
  763. &lt;match url="^courses/([^/]+)/course-pic.png$" /&gt;
  764. &lt;action type="Rewrite" url="/main/inc/ajax/course.ajax.php?a=get_course_image&amp;code={R:1}&amp;image=course_image_large_source" appendQueryString="true" /&gt;
  765. &lt;/rule&gt;
  766. &lt;rule name="rule 11v" stopProcessing="true"&gt;
  767. &lt;match url="^courses/([^/]+)/(.*)$" /&gt;
  768. &lt;action type="Rewrite" url="/app/courses/{R:1}/{R:2}" appendQueryString="true" /&gt;
  769. &lt;/rule&gt;
  770. &lt;rule name="rule 12v" stopProcessing="true"&gt;
  771. &lt;match url="^session/(\d{1,})/about/?$" /&gt;
  772. &lt;action type="Rewrite" url="/main/session/about.php?session_id={R:1}" /&gt;
  773. &lt;/rule&gt;
  774. &lt;rule name="rule 13v" stopProcessing="true"&gt;
  775. &lt;match url="^badge/(\d{1,})" /&gt;
  776. &lt;action type="Rewrite" url="/main/badge/issued.php?issue={R:1}" /&gt;
  777. &lt;/rule&gt;
  778. &lt;rule name="rule 14v" stopProcessing="true"&gt;
  779. &lt;match url="^skill/(\d{1,})/user/(\d{1,})" /&gt;
  780. &lt;action type="Rewrite" url="/main/badge/issued_all.php?skill={R:1}&amp;user={R:2}" /&gt;
  781. &lt;/rule&gt;
  782. &lt;rule name="rule 15v" stopProcessing="true"&gt;
  783. &lt;match url="^badge/(\d{1,})/user/(\d{1,})" /&gt;
  784. &lt;action type="Rewrite" url="/main/badge/issued_all.php?skill={R:1}&amp;user={R:2}" /&gt;
  785. &lt;/rule&gt;
  786. &lt;rule name="rule 16v" stopProcessing="true"&gt;
  787. &lt;match url="^main/exercice/(.*)$" /&gt;
  788. &lt;action type="Rewrite" url="/main/exercise/{R:1}" appendQueryString="true" /&gt;
  789. &lt;/rule&gt;
  790. &lt;rule name="rule 17v" stopProcessing="true"&gt;
  791. &lt;match url="^main/newscorm/(.*)$" /&gt;
  792. &lt;action type="Rewrite" url="/main/lp/{R:1}" appendQueryString="true" /&gt;
  793. &lt;/rule&gt;
  794. &lt;rule name="rule 18v" stopProcessing="true"&gt;
  795. &lt;match url="^service/(\d{1,})$" /&gt;
  796. &lt;action type="Rewrite" url="/plugin/buycourses/src/service_information.php?service_id={R:1}" /&gt;
  797. &lt;/rule&gt;
  798. &lt;rule name="rule 19v" stopProcessing="true"&gt;
  799. &lt;match url="^([^/.]+)/?$" /&gt;
  800. &lt;action type="Rewrite" url="/user.php?{R:1}" /&gt;
  801. &lt;/rule&gt;
  802. &lt;rule name="rule 20v" stopProcessing="true"&gt;
  803. &lt;match url="^(tests|.git)" ignoreCase="true" /&gt;
  804. &lt;action type="Rewrite" url="/-" /&gt;
  805. &lt;/rule&gt;
  806. &lt;/rules&gt;
  807. &lt;/rewrite&gt;
  808. &lt;/system.webServer&gt;
  809. &lt;/configuration&gt;
  810. </pre>
  811. </div>
  812. <h2><a name="17._Git_Upgrade"></a>15. Upgrading from Git</h2>
  813. If you have sufficient experience with Git and have installed your initial Chamilo portal
  814. from the Git version, you might want to upgrade from 1.9.x to 1.11.x using Git directly.<br />
  815. Here are a few tips that might help you:<br />
  816. <ul>
  817. <li>Get into your Chamilo Git repository</li>
  818. <li>Make sure you have no additional elements that were not commited (git status/git stash)</li>
  819. <li>If you have issues, you can always save your code somewhere else and ask Git to put you exactly at the most recent 1.9.x stage ("git pull"/"git reset --hard origin/1.9.x")</li>
  820. <li>Once you're sure you have a "clean" local Chamilo repository, create a 1.11.x branch with "git checkout -b 1.11.x"</li>
  821. <li>In the new branch, download all code from the 1.11.x branch upstream: "git pull origin 1.11.x"</li>
  822. <li>If you never used composer or used it only a few times in the past, you might need to update it (rm -rf ~/.composer/vendor; composer clear-cache) before trying the following command</li>
  823. <li>Update composer: "composer update" (you might need to give a Github token here)</li>
  824. <li>Change permissions on folders app, web, main/lang and main/default_course_document/images</li>
  825. <li>Go to your portal install page (main/install/) and follow the upgrade procedure</li>
  826. </ul>
  827. <p>
  828. <br />
  829. <br />
  830. Contact address<br />
  831. Mail: info@chamilo.org<br />
  832. <br />
  833. </p>
  834. <hr />
  835. </div>
  836. <hr />
  837. <a href="http://validator.w3.org/check?uri=referer"><img src="//www.w3.org/Icons/valid-xhtml10-blue" alt="Valid XHTML 1.0 Transitional" style="margin: 1em; float: right;" height="31" width="88" /></a>
  838. <a href="http://jigsaw.w3.org/css-validator/">
  839. <img src="//jigsaw.w3.org/css-validator/images/vcss-blue" style="margin: 1em; float: right;" alt="Valid CSS" />
  840. </a>
  841. </body>
  842. </html>