Loading...
 
Skip to main content

History: htaccess

Preview of version: 15

htaccess


The .htaccess-file is mainly separated in two parts

  1. some php/apache-settings
  2. rewrite rules for sefurls


The second part, the search engine friendly URLs and rewrite rules, are described in Rewrite Rules. See there for more information.

To activate

Tiki bundles a file named _htaccess. You should copy it to .htaccess

Alternatively, on Linux, you can make a symlink.

Copy to clipboard
ln -s _htaccess .htaccess

PHP Settings

In some cases it is possible to overwrite some values from the php.ini file given by your ISP, by means of a file php.ini in the tiki root folder, or by means of some changes in the .htaccess file in the tiki root folder also. In this second case, place your special .htaccess file in the tiki root directory or just rename the _htaccess file given by Tiki to .htaccess an make your changes. You can visit tiki-phpinfo.php to check whether or not your changes where successful.

PHP Memory Limit

The most important setting is the php memory limit. The maximum amount of memory a script may consume. On many shared hosts this variable is set to 64MB. Tiki runs fine with 64MB but depending on your special needs and options it is necessary to uncomment and increase this value to 128MB. (which is the default value on recent PHP versions)

Copy to clipboard
# memory limit php_value memory_limit 256M


Error Display

To display php errors on your display activate / uncomment this setting. Error output is very useful during development, but it could be very dangerous in production environments. Depending on the code which is triggering the error, sensitive information could potentially leak out of your application such as database usernames and passwords or worse.

Copy to clipboard
# to activate the error display, uncomment the following line php_flag display_errors on # to set the error_reporting level, uncomment the following line. Values are explained here: http://www.php.net/manual/en/errorfunc.constants.php php_value error_reporting E_ALL


Execution Time

PHP uses a default script execution time of 30s before a script is terminated by the server. In some cases with huge wiki pages with many plugins it´s necessary to increase the execution time to 90s

Copy to clipboard
# increase execution time (default value in php use to be 30, and in some cases of long wiki pages with many plugins it may take longer) php_value max_execution_time = 90 ; Maximum execution time of each script, in seconds php_value max_input_time = 90 ; Maximum amount of time each script may spend parsing request data


Maximum File and Post Size

The maximum allowed size for uploaded files and maximum size of POST data that PHP will accept.

Copy to clipboard
# increase the maximum file size for uploads allowed by php for Tiki (default value in apache use to be 2M which is usually too low for pdf or documents with some images, screenshots, etc) php_value upload_max_filesize 10M php_value post_max_size 11M


Include Path

Copy to clipboard
# In some cases you may see open_basedir warnings about Smarty accessing php files that it shouldn't # The following line (uncommented) will reset the include path to use only Tiki's files which will solve this in most cases php_value include_path "."


Also see latest default htaccess from code base

Alias names for this page:

_htaccess | .htaccess

History

Advanced
Information Version
Marc Laporte 24
Marc Laporte 22
Marc Laporte 21
Bernard Sfez / Tiki Specialist Updated some information about PHP version and htaccess content (I couldn’t keep both 12.x and 21.x within tabs... code broke) 20
Yves Kipondo 19
Xavier de Pedro 18
Xavier de Pedro 17
Xavier de Pedro 16
Xavier de Pedro 15
Xavier de Pedro 14
Xavier de Pedro uncommented the code lines so that they get highlighted differently from the comments, etc. and easier to read and find what new users may be looking for 13
Marc Laporte Code Plugin modified by editor. 12
Marc Laporte Code Plugin modified by editor. 11
Marc Laporte 10
Marc Laporte 9
Marc Laporte A nice site to generate 8
Marc Laporte 7
Marc Laporte 6
Marc Laporte 5
Marc Laporte 4
Marc Laporte 3
Leu Add link 2
Leu Created 1