Changes

m
no edit summary
Line 97: Line 97:     
====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.
    
[[File:Activer l'affichage des Extensions de noms de fichiers.png|none|frame|Enable Display of '''File Name Extensions'''.|link=Special:FilePath/Activer_l'affichage_des_Extensions_de_noms_de_fichiers.png]]
 
[[File:Activer l'affichage des Extensions de noms de fichiers.png|none|frame|Enable Display of '''File Name Extensions'''.|link=Special:FilePath/Activer_l'affichage_des_Extensions_de_noms_de_fichiers.png]]
 +
 +
====Create PHP configuration file from template======
 +
To customize your PHP installation, you will have to modify the php configuration file (the file <code>php.ini</code>).
 +
 +
*Go to the folder where you unpacked PHP (<code>C:\php</code>) using the <nowiki/> '''File Explorer''' Windows > '''Local Disk (C: )''' > '''php''' (if you had checked the '''Show extracted folders when done''' box when extracting the archive, the Windows '''File Explorer''' should already be open in the right place).
 +
 +
In this folder containing the PHP files, you will find two configuration files "template" <code>php.ini-development</code> and <code>php.ini-production</code>.
 +
 +
*Make a copy (right click, '''Copy''') of the file <code>php.ini-production</code> and paste it in the same directory (right click, '''Paste''').
 +
 +
*Rename the copied file (<code>php - Copy.ini-production</code>) to <code>php.ini</code> (right click, '''Rename''' on the file).
 +
 +
When validating the new filename, Windows will warn you following the modification of the file extension (you must answer '''Yes''' to this question to validate the renaming of the file).
 +
[[File:Avertissement renommage.png|none|frame|Windows warning when changing file extension.|link=Special:FilePath/Avertissement_renommage.png]]
 +
 +
<br />
 +
 +
====Activate PHP extensions needed for Dolibarr=====
 +
Double-click on the file <code>php.ini</code> to open it in '''Notepad''' Windows and thus be able to modify it.
 +
 +
Scroll through the file to find the section starting with <code>Dynamic Extensions</code> framed by <code>;</code> (about halfway through the file) :<syntaxhighlight lang="ini">
 +
;;;;;;;;;;;;;;;;;;;;;;
 +
; Dynamic Extensions ;
 +
;;;;;;;;;;;;;;;;;;;;;;
 +
</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>.
 +
<br />
 +
 +
====Modify some other PHP parameters====
 +
<u>Tip :</u> To easily find a parameter in the file <code>php.ini</code>, you can use the '''Search''' function of the '''Notepad''' Windows (menu '''Edit''' > '''Search''' or <kbd>Ctrl</kbd> + <kbd>F</kbd>). Enter your search then click on '''Next'''. Depending on your position in the file, feel free to reverse the direction of the search by selecting the option '''Top''' instead of '''Bottom''' in the frame '''Direction''' then click again on next to search in the opposite direction of the file.
 +
[[File:Recherche Bloc-notes Windows.png|none|frame|The '''Search''' dialog box allows you to search a text in the file.|link=Special:FilePath/Recherche_Bloc-notes_Windows.png]]
 +
<br />
 +
 +
=====Set the time zone=====
 +
Below the section :<syntaxhighlight lang="ini">
 +
;;;;;;;;;;;;;;;;;;;
 +
; Module Settings ;
 +
;;;;;;;;;;;;;;;;;;;
 +
</syntaxhighlight>Under the sub-section <code>[Date]</code>, replace the line <code>;date.timezone =</code> with <code>date.timezone = Europe/Paris</code> (don't forget to remove the <code>;</code> at the beginning of the line).
 +
 +
====Increase the size of files that can be uploaded===
 +
By default, files that can be uploaded on server through button '''Browse...''' of Dolibarr forms (PDF bank statements, supplier invoices, etc.) are limited to a size of 2M.
 +
 +
If you want, you can increase this limit by modifying these lines :
 +
 +
*replace line <code>upload_max_filesize = 2M</code> by <code>upload_max_filesize = 16M</code> for example ;
 +
*if you choose a value greater than 8M for <code>upload_max_filesize</code>, you will also need to replace <code>post_max_size = 8M</code> by <code>post_max_size = 16M</code>.
 +
 +
 +
Save the file ('''File''' > '''Save''' or <kbd>Ctrl</kbd> + <kbd>S</kbd>) and close it.
 +
 +
We have now configured PHP.
 +
<br />
676

edits