DokuWiki

It's better when it's simple

User Tools

Site Tools


install:php

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
install:php [2014-10-26 22:00] – old revision restored (2014-05-17 11:44) achinstall:php [2024-02-22 12:45] (current) – old revision restored (2024-02-21 13:04) oiv
Line 1: Line 1:
-====== PHP Configuration for DokuWiki ======+====== PHP Configuration for DokuWiki =======
  
 DokuWiki will run out of the box on nearly every PHP installation and the [[:installer]] will check that the minimum of needed PHP functionality is available. DokuWiki will run out of the box on nearly every PHP installation and the [[:installer]] will check that the minimum of needed PHP functionality is available.
Line 6: Line 6:
  
 Please consult the online [[http://www.php.net/manual/en/|PHP manual]] for more details. Please consult the online [[http://www.php.net/manual/en/|PHP manual]] for more details.
 +
 +
 +===== PHP extensions =====
 +
 +Below you can find which extensions should be enabled for your PHP setup. On some systems these extension might need to be installed separately, other systems might bundle them in a single install package and only need them to be enabled in ''php.ini''
 +
 +==== required ====
 +
 +These extensions are usually enabled by default anyway.
 +
 +  * ''json'' -- JSON decoding, encoding
 +  * ''pcre'' -- Regular expression handling
 +  * ''session'' -- Session handling
 +  
 +
 +==== recommended ====
 +
 +  * ''bz2'' -- compression handling for attic files, plugin installs
 +  * ''zlib'' -- compression handling for attic files, plugin installs
 +  * ''mbstring'' -- faster UTF-8 handling
 +  * ''openssl'' -- SSL/TLS connections, used for plugin downloading
 +  * ''gd'' -- image resizing
 +  * ''intl'' -- internationalization handling, for example for locale aware sorting
 +
 +==== special use cases ====
 +
 +The following extensions are often used by plugins and thus might come in handy.
 +
 +  * ''pdo_sqlite'' -- used by the [[plugin:sqlite]] plugin
 +  * ''xml''
 +
  
 ===== php.ini ===== ===== php.ini =====
Line 18: Line 49:
  
 On the other hand, always be warned that what may be a good or even suggested value for DokuWiki might in some cases break other PHP applications you also host. This is especially true when enabling directives that enhance PHP security while having other PHP applications that rely on insecure features of PHP like register_globals etc. On the other hand, always be warned that what may be a good or even suggested value for DokuWiki might in some cases break other PHP applications you also host. This is especially true when enabling directives that enhance PHP security while having other PHP applications that rely on insecure features of PHP like register_globals etc.
- 
-==== register_globals ==== 
- 
-Controls if any passed CGI parameters will be registered as global variable automatically instead of being available through $_GET, $_POST or $_REQUEST only. Enabling this often leads to [[phpfn>registerglobals|security]] problems. 
- 
-DokuWiki will run with ''register_globals'' set to off. 
- 
-  * Suggested: register_globals = Off 
- 
  
 ==== short_open_tag ==== ==== short_open_tag ====
Line 38: Line 60:
 However, note that some [[:templates]] or [[:plugins]] might rely on this feature being set to ''On''. However, note that some [[:templates]] or [[:plugins]] might rely on this feature being set to ''On''.
  
-==== safe_mode ==== +==== open_basedir ====
- +
-[[phpfn>features.safe-mode|Safe Mode]] attempts to solve the shared-server security problem by restricting/disabling certain PHP functions. +
- +
-DokuWiki will run even with ''safe_mode'' set to on.+
  
-However, depending on your hosters configuration you may need to use the [[:config:safemodehack|safemodehack]] option.+This limits access of your PHP process to configured paths. This is meant as an additional security feature but should not be relied on. It will disable readdir caching and might significantly slow down your PHP processing. See [[:performance]] for details.
  
-If in doubt, or when troubleshooting, start with ''safe_mode Off''.+  * Suggested: open_basedir 
  
  
Line 106: Line 124:
 Maximum amount of memory a script may consume. Maximum amount of memory a script may consume.
  
-  * Suggested: memory_limit = 32M+  * Suggested: memory_limit = 128M
  
 ====  error_reporting ====  ====  error_reporting ==== 
Line 147: Line 165:
   * Suggested: register_argc_argv = Off   * Suggested: register_argc_argv = Off
  
-==== Magic Quotes ==== 
- 
-[[phpfn>security.magicquotes|Magic Quotes]] is a process that automagically escapes incoming data to the PHP script. It's preferred to code with magic quotes off and to instead escape the data at runtime, as needed. 
- 
-DokuWiki will detect the used settings and will handle the given values as needed. However disabling these options is recommended. 
- 
-=== magic_quotes_gpc ===  
- 
-Affects HTTP Request data (GET, POST, and Cookie). 
- 
-  * Suggested: magic_quotes_gpc = Off 
- 
-=== magic_quotes_runtime ===  
- 
-If enabled, most functions that return data from an external source, including databases and text files (SQL, from ''exec()'', etc), will have quotes escaped with a backslash. 
- 
-  * Suggested: magic_quotes_runtime = Off 
- 
-=== magic_quotes_sybase ===  
- 
-Use Sybase-style magic quotes (a single-quote is escaped with a single-quote instead of a backslash). 
- 
-  * Suggested: magic_quotes_sybase = On 
  
 ==== file_uploads ==== ==== file_uploads ====
Line 196: Line 191:
 ==== extension ==== ==== extension ====
  
-Dynamic Extensions.  +Dynamic Extensions. See [[#PHP extensions]] above for recommendations.
- +
-=== GD ===+
  
-PHP's [[phpfn>ref.image|GD extension]] for use with [[http://www.boutell.com/gd/|libGD 2]] (a graphics library) is recommended but not needed. When available it will be used for resizing [[:images]]. 
  
install/php.1414357221.txt.gz · Last modified: 2014-10-26 22:00 by ach

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki