Line 15:
Line 15:
−
The interest to install even the different "Server" components needed for Dolibarr to work properly is the possibility to choose newer versions than those proposed by the DoliWamp installer.
+
The interest to install by yourself the different "Server" components needed for Dolibarr to work properly is the possibility to choose newer versions than those proposed by the DoliWamp installer.
It is also an excellent way to understand how it works and to deepen your knowledge about deployment and maintenance of a Dolibarr instance.
It is also an excellent way to understand how it works and to deepen your knowledge about deployment and maintenance of a Dolibarr instance.
Line 54:
Line 54:
**Check the box '''Windows''' in the '''Operating System,''' section.
**Check the box '''Windows''' in the '''Operating System,''' section.
**in the '''Package Type''' section, tick '''MSI Package'''.
**in the '''Package Type''' section, tick '''MSI Package'''.
−
**In the '''CPU''' section, check '''32-bit''' or '''64-bit''' depending on your operating system (if you do not know, refer to the Appendix [[#How do I know if my computer runs the 32-bit or 64-bit version of Windows ?|How do I know if my computer runs the 32-bit or 64-bit version of Windows ?]]).
+
**In the '''CPU''' section, check '''32-bit''' or '''64-bit''' depending on your operating system (if you do not know, refer to the Appendix [[#How_do_I_know_if_my_computer_is_running_32-bit_or_64-bit_version_of_Windows.3F|How do I know if my computer runs the 32-bit or 64-bit version of Windows ?]]).
*Click on the link to download the only file now displayed in the list.
*Click on the link to download the only file now displayed in the list.
Line 77:
Line 77:
*Please visit https://windows.php.net/download
*Please visit https://windows.php.net/download
*In the list of proposed downloads, take the latest '''Thread Safe''' version of PHP corresponding to your architecture ('''x64''' if your system is 64 bits or '''x86''' if your system is 32 bits).
*In the list of proposed downloads, take the latest '''Thread Safe''' version of PHP corresponding to your architecture ('''x64''' if your system is 64 bits or '''x86''' if your system is 32 bits).
−
** This is normally the second proposed download ('''<u>Warning !</u> Be careful to download the ''Thread Safe'' version and NOT ''<u>No</u> Thread Safe'''''').
+
**This is normally the second proposed download ('''<u>Warning !</u> Be careful to download the ''Thread Safe'' version and NOT ''<u>No</u> Thread Safe'<nowiki/>''''').
*Once you have found the right version, download the file by clicking on the link '''<u>Zip</u>'''.
*Once you have found the right version, download the file by clicking on the link '''<u>Zip</u>'''.
Line 83:
Line 83:
===Extract the archive to install PHP===
===Extract the archive to install PHP===
+
*Once downloaded, right click on the archive and select '''Extract all...'''.
*Once downloaded, right click on the archive and select '''Extract all...'''.
*Indicate <code>C:\php</code> as the destination path and click '''Extract'''.
*Indicate <code>C:\php</code> as the destination path and click '''Extract'''.
Line 97:
Line 98:
====Enable Display of Filename Extensions====
====Enable Display of Filename Extensions====
+
*In the Windows '''File Explorer''', click on the '''View''' tab and check the '''File Name Extensions''' checkbox in the '''Show/Hide''' group.
*In the Windows '''File Explorer''', click on the '''View''' tab and check the '''File Name Extensions''' checkbox in the '''Show/Hide''' group.
Line 126:
Line 128:
</syntaxhighlight>In this section, you will need to remove the <code>;</code> in front of some of the extensions to load them (change for example <code>;extension=gd2</code> to <code>extension=gd2</code>).
</syntaxhighlight>In this section, you will need to remove the <code>;</code> in front of some of the extensions to load them (change for example <code>;extension=gd2</code> to <code>extension=gd2</code>).
−
Remove the <code>;</code> in front of the lines <code>;extension=curl</code>, <code>;extension=gd2</code>, <code>;extension=intl</code>, <code>;extension=mysqli</code>.
+
Remove the <code>;</code> in front of the lines <code>;extension=curl</code>, <code>;extension=gd2</code>, <code>;extension=intl</code>, <code>;extension=mysqli</code>, <code>;extension=mbstring</code>, <code>;extension=imap</code>.
<br />
<br />
Line 161:
Line 163:
*Go to https://www.apachelounge.com/download/
*Go to https://www.apachelounge.com/download/
*Download the file corresponding to the architecture of your operating system by clicking on the link (Win64 for 64 bits or Win32 for 32 bits).
*Download the file corresponding to the architecture of your operating system by clicking on the link (Win64 for 64 bits or Win32 for 32 bits).
+
<br />
<br />
Line 189:
Line 192:
====Treat the files <code>index.php</code> as index files====
====Treat the files <code>index.php</code> as index files====
−
* Look for the block
+
*Look for the block
+
<syntaxhighlight lang="apacheconf">
<syntaxhighlight lang="apacheconf">
<IfModule dir_module>
<IfModule dir_module>
Line 205:
Line 209:
*At the very end of the file <code>httpd.conf</code>, skip a line and paste the following block of code to tell '''Apache2''' to interpret the files <code>*.php</code> :
*At the very end of the file <code>httpd.conf</code>, skip a line and paste the following block of code to tell '''Apache2''' to interpret the files <code>*.php</code> :
+
+
*Before PHP 8.0:
+
<syntaxhighlight lang="apacheconf">
<syntaxhighlight lang="apacheconf">
LoadModule php7_module "c:/php/php7apache2_4.dll"
LoadModule php7_module "c:/php/php7apache2_4.dll"
Line 211:
Line 218:
</syntaxhighlight>
</syntaxhighlight>
−
*This will tell '''Apache2''' to use the <code>php7_module</code> provided with PHP that we installed earlier to interpret the <code>*.php</code> files.
+
*[https://www.php.net/manual/en/install.windows.apache2.php From PHP 8.0:]
+
+
<syntaxhighlight lang="apacheconf">
+
LoadModule php_module "c:/php/php8apache2_4.dll"
+
<FilesMatch \.php$>
+
SetHandler application/x-httpd-php
+
</FilesMatch>
+
PHPIniDir "C:/php"
+
</syntaxhighlight>
+
+
*This will tell '''Apache2''' to use the <code>phpX_module</code> provided with PHP that we installed earlier to interpret the <code>*.php</code> files.
*Save the file <code>httpd.conf</code> ('''File''' > '''Save''' or <kbd>Ctrl</kbd> + <kbd>S</kbd>) and close it.
*Save the file <code>httpd.conf</code> ('''File''' > '''Save''' or <kbd>Ctrl</kbd> + <kbd>S</kbd>) and close it.
Line 228:
Line 245:
*With the '''File Explorer''' Windows, go to the '''Local Disk (C:)''' then in the directory '''Apache24''' and then in the sub directory '''bin''' (<code>C:\Apache24\bin</code>).
*With the '''File Explorer''' Windows, go to the '''Local Disk (C:)''' then in the directory '''Apache24''' and then in the sub directory '''bin''' (<code>C:\Apache24\bin</code>).
*Paste the files (right click, then '''Copy''' or Ctrl + V).
*Paste the files (right click, then '''Copy''' or Ctrl + V).
+
<br />
<br />
Line 237:
Line 255:
We will therefore create a Windows "Service" to automatically start '''Apache2''' when the computer is (re)started.
We will therefore create a Windows "Service" to automatically start '''Apache2''' when the computer is (re)started.
−
* Next to the Windows button that opens the start menu, in the search box "'''Type here to search'''", click then type <code>cmd</code>. In the list of proposed options, choose '''Run as administrator''' then validate the '''User Account Control''' window.
+
*Next to the Windows button that opens the start menu, in the search box "'''Type here to search'''", click then type <code>cmd</code>. In the list of proposed options, choose '''Run as administrator''' then validate the '''User Account Control''' window.
[[File:Exécuter Invite de commandes en tant qu'administrateur.png|none|Execute '''Command Prompt''' Windows as administrator|thumb|613x613px|link=Special:FilePath/Exécuter_Invite_de_commandes_en_tant_qu'administrateur.png]]
[[File:Exécuter Invite de commandes en tant qu'administrateur.png|none|Execute '''Command Prompt''' Windows as administrator|thumb|613x613px|link=Special:FilePath/Exécuter_Invite_de_commandes_en_tant_qu'administrateur.png]]
*Enter the following command in the Windows '''Command Prompt''' and validate with the Enter key :
*Enter the following command in the Windows '''Command Prompt''' and validate with the Enter key :
+
<syntaxhighlight lang="batch">
<syntaxhighlight lang="batch">
C:/Apache24/bin/httpd.exe -k install
C:/Apache24/bin/httpd.exe -k install
Line 250:
Line 269:
*Enter the following command in the Windows '''Command Prompt''' and validate with the Enter key :
*Enter the following command in the Windows '''Command Prompt''' and validate with the Enter key :
+
<syntaxhighlight lang="batch">
<syntaxhighlight lang="batch">
net start Apache2.4
net start Apache2.4
Line 263:
Line 283:
This command tests the validity of your <code>httpd.conf</code> file and should return the line where the error is encountered.
This command tests the validity of your <code>httpd.conf</code> file and should return the line where the error is encountered.
−
In addition to common syntax errors due to carelessness, one of the most common errors is the absence of the file <code>C:\php\php7apache2_4.dll</code>. This file is indeed missing if you have downloaded the wrong version of PHP ('''<u>No</u>''' '''Thread Safe''') instead of the '''Thread Safe''' version. In this case, download the good archive ('''Thread Safe''') and perform the [[Manual_Installation_On_Windows#Extract_the_archive_for_PHP_installation]] part again.
+
In addition to common syntax errors due to carelessness, one of the most common errors is the absence of the file <code>C:\php\php7apache2_4.dll</code>. This file is indeed missing if you have downloaded the wrong version of PHP ('''<u>No</u>''' '''Thread Safe''') instead of the '''Thread Safe''' version. In this case, download the good archive ('''Thread Safe''') and perform the [[#Extract_the_archive_to_install_PHP]] part again.
−
Another problem that can be encountered is the impossibility to start '''Apache2''' because the port '''80''' is already used by another program. See the appendix [[Manual_Installation_On_Windows#What are "Listening Ports" and how to know if a program already occupies a specific port? |What are "Listening Ports" and how to know if a program already occupies a specific port?]] for instructions on how to proceed.
+
Another problem that can be encountered is the impossibility to start '''Apache2''' because the port '''80''' is already used by another program. See the appendix [[#What_are_.22Listening_Ports.22_and_how_do_I_know_if_a_program_already_occupies_a_specific_port.3F|What are "Listening Ports" and how to know if a program already occupies a specific port?]] for instructions on how to proceed.
Once you have corrected any errors, try again to start the '''Apache2.4''' Service with the command mentioned above.
Once you have corrected any errors, try again to start the '''Apache2.4''' Service with the command mentioned above.
Line 356:
Line 376:
===Download Dolibarr===
===Download Dolibarr===
+
*Please visit the SourceForge mirrors at https://sourceforge.net/projects/dolibarr/files/.
*Please visit the SourceForge mirrors at https://sourceforge.net/projects/dolibarr/files/.
*Click on the folder '''Dolibarr ERP-CRM''', then on the last version number and click on the file with extension '''.zip''' to download it.
*Click on the folder '''Dolibarr ERP-CRM''', then on the last version number and click on the file with extension '''.zip''' to download it.
Line 453:
Line 474:
======Restricting Web Server write access to the file <code>conf.php</code>======
======Restricting Web Server write access to the file <code>conf.php</code>======
−
* With the '''File Explorer''' Windows, go to the '''Local Disk (C:)''' then to the directory '''Apache24'''. Go to the '''htdocs''' directory then to '''dolibarr''' and finally to '''conf''' (<code>C:\Apache24\htdocs\dolibarr\conf</code>).
+
*With the '''File Explorer''' Windows, go to the '''Local Disk (C:)''' then to the directory '''Apache24'''. Go to the '''htdocs''' directory then to '''dolibarr''' and finally to '''conf''' (<code>C:\Apache24\htdocs\dolibarr\conf</code>).
*Right click on the file <code>conf.php</code> and select the option '''Properties'''.
*Right click on the file <code>conf.php</code> and select the option '''Properties'''.
*In the dialog box '''Properties of: conf.php''', check the box '''Read only''' for the option '' 'Attributes'' then click '''OK'''.
*In the dialog box '''Properties of: conf.php''', check the box '''Read only''' for the option '' 'Attributes'' then click '''OK'''.
*In your Internet Browser, click again on link '''My dashboard''' in left column of Dolibarr and see that second warning related to write accessibility to Web Server of file <code>conf.php</code> has disappeared.
*In your Internet Browser, click again on link '''My dashboard''' in left column of Dolibarr and see that second warning related to write accessibility to Web Server of file <code>conf.php</code> has disappeared.
*[[File:Lecture seule fichier de configuration Dolibarr.png|none|thumb|636x636px|Enable attribute '''Read only''' for main configuration file <code>conf.php</code>of Dolibarr.|link=Special:FilePath/Lecture_seule_fichier_de_configuration_Dolibarr.png]].
*[[File:Lecture seule fichier de configuration Dolibarr.png|none|thumb|636x636px|Enable attribute '''Read only''' for main configuration file <code>conf.php</code>of Dolibarr.|link=Special:FilePath/Lecture_seule_fichier_de_configuration_Dolibarr.png]].
+
<br />
<br />
==Appendix==
==Appendix==
−
===What are "Listening Ports" and how do I know if a program already occupies a specific port? ===
+
===What are "Listening Ports" and how do I know if a program already occupies a specific port?===
====What's a "listening port"====
====What's a "listening port"====
Line 478:
Line 500:
To check which program is listening on which port, you can use the Windows '''Resource Monitor'''.
To check which program is listening on which port, you can use the Windows '''Resource Monitor'''.
−
* Next to the Windows button to open the start menu, in the '''Type here to search''' box, click and type <code>resource monitor</code>. In the list of options on the right, choose "'''Open'''" or click on the full title of the software to launch it ('''Resource Monitor''').
+
*Next to the Windows button to open the start menu, in the '''Type here to search''' box, click and type <code>resource monitor</code>. In the list of options on the right, choose "'''Open'''" or click on the full title of the software to launch it ('''Resource Monitor''').
[[File:Moniteur de ressources Windows.png|none|thumb|516x516px|Run the '''Resource Monitor''' software application of Windows|link=Special:FilePath/Moniteur_de_ressources_Windows.png]]
[[File:Moniteur de ressources Windows.png|none|thumb|516x516px|Run the '''Resource Monitor''' software application of Windows|link=Special:FilePath/Moniteur_de_ressources_Windows.png]]
Line 508:
Line 530:
Windows is delivered with a software allowing to manage graphically the "Services". It is thus possible to consult their status (started, stopped) and to act on them (start, stop, restart).
Windows is delivered with a software allowing to manage graphically the "Services". It is thus possible to consult their status (started, stopped) and to act on them (start, stop, restart).
−
* Next to the Windows button allowing to open the start menu, in the search box "'''Type here to search'''", click then type <code>services</code>. In the list of options on the right, choose "'''Open'''" or click on the full title of the software to launch it ('''Services''').
+
*Next to the Windows button allowing to open the start menu, in the search box "'''Type here to search'''", click then type <code>services</code>. In the list of options on the right, choose "'''Open'''" or click on the full title of the software to launch it ('''Services''').
[[File:Lancer l'application Windows Services.png|none|thumb|510x510px|Run the '''Services''' application of Windows|link=Special:FilePath/Lancer_l'application_Windows_Services.png]]
[[File:Lancer l'application Windows Services.png|none|thumb|510x510px|Run the '''Services''' application of Windows|link=Special:FilePath/Lancer_l'application_Windows_Services.png]]
Line 583:
Line 605:
*In '''Compression''', select - for simplicity - '''None''' (Windows does not include a standard utility to decompress Gzip files but you can activate it if you have for example 7-Zip, PeaZip, WinZip or WinRar).
*In '''Compression''', select - for simplicity - '''None''' (Windows does not include a standard utility to decompress Gzip files but you can activate it if you have for example 7-Zip, PeaZip, WinZip or WinRar).
*Click on '''Generate Backup'''.
*Click on '''Generate Backup'''.
+
<br />
<br />
[[File:Télécharger la sauvegarde de base de données.png|Download database backup|none|frame|link=Special:FilePath/Télécharger_la_sauvegarde_de_base_de_données.png]]
[[File:Télécharger la sauvegarde de base de données.png|Download database backup|none|frame|link=Special:FilePath/Télécharger_la_sauvegarde_de_base_de_données.png]]
Line 591:
Line 614:
*Next to the Windows button to open the start menu, in the search box '''Type here to search''', click and type <code>heidisql</code>. In the list of options on the right, choose "'''Open'''" or click on the full title of the software to launch it ('''HeidiSQL''').
*Next to the Windows button to open the start menu, in the search box '''Type here to search''', click and type <code>heidisql</code>. In the list of options on the right, choose "'''Open'''" or click on the full title of the software to launch it ('''HeidiSQL''').
+
[[File:Démarrer HeidiSQL.png|none|thumb|501x501px|Run the '''HeidiSQL''' software|link=Special:FilePath/Démarrer_HeidiSQL.png]]
[[File:Démarrer HeidiSQL.png|none|thumb|501x501px|Run the '''HeidiSQL''' software|link=Special:FilePath/Démarrer_HeidiSQL.png]]
Line 604:
Line 628:
*Right click on the database '''<code>dolibarr</code>''' and select '''Export database to SQL...'''
*Right click on the database '''<code>dolibarr</code>''' and select '''Export database to SQL...'''
+
<br />
<br />
[[File:Paramétres d'export de base de données HeidiSQL.png|none|frame|Set up the database export in '''HeidiSQL''' software|link=Special:FilePath/Paramétres_d'export_de_base_de_données_HeidiSQL.png]]
[[File:Paramétres d'export de base de données HeidiSQL.png|none|frame|Set up the database export in '''HeidiSQL''' software|link=Special:FilePath/Paramétres_d'export_de_base_de_données_HeidiSQL.png]]
−
* Check the box '''Remove/DROP''' in the section '''Table(s):''' then, in '''File name:''' choose the path where you want to export the backup and the name of the file. If you followed all installation documentation, a good practice is to place export at the same place as when you realize it with Dolibarr interface (method of above paragraph): <code>C:\dolibarr\documents\admin\backup\%db-%date.sql</code> . <code>%db</code> will be replaced automatically by database name ('''<code>dolibarr</code>''') and <code>%date</code> by date and hour of export.
+
*Check the box '''Remove/DROP''' in the section '''Table(s):''' then, in '''File name:''' choose the path where you want to export the backup and the name of the file. If you followed all installation documentation, a good practice is to place export at the same place as when you realize it with Dolibarr interface (method of above paragraph): <code>C:\dolibarr\documents\admin\backup\%db-%date.sql</code> . <code>%db</code> will be replaced automatically by database name ('''<code>dolibarr</code>''') and <code>%date</code> by date and hour of export.
*Click on '''Export''' to launch the export.
*Click on '''Export''' to launch the export.
+
<br />
<br />
=====Manually using the Windows Command Prompt=====
=====Manually using the Windows Command Prompt=====
−
* Next to the Windows button to open the start menu, in the search box "'''Type here to search'''", click and type <code>mariadb</code>. In the list of options on the right, choose "'''Open'''" or click on the full title of the software to launch it ('''Command Prompt (MariaDB 10.4 (x64))''').
+
*Next to the Windows button to open the start menu, in the search box "'''Type here to search'''", click and type <code>mariadb</code>. In the list of options on the right, choose "'''Open'''" or click on the full title of the software to launch it ('''Command Prompt (MariaDB 10.4 (x64))''').
[[File:Démarrer Command Prompt (MariaDB 10.4 (x64)).png|none|thumb|550x550px|Start the '''Command Prompt (MariaDB 10.4 (x64))''']]
[[File:Démarrer Command Prompt (MariaDB 10.4 (x64)).png|none|thumb|550x550px|Start the '''Command Prompt (MariaDB 10.4 (x64))''']]