Loading...
 
Skip to main content

History: htaccess

Source of version: 10

Copy to clipboard
            Also see Tiki ((Check)).


! htaccess

The .htaccess-file is mainly separated in two parts
# some php/apache-settings
# 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.

{CODE()} ln -s _htaccess .htaccess {CODE}

!! PHP Settings
In some cases it is possible to overwrite some values from the ((php.ini)) file given by your ISP. 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)

{CODE(wrap=>1)}
# memory limit
php_value memory_limit 128M
{CODE}


!!! 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.
{CODE(wrap=>1)}
# to activate the error display, uncomment the following line
#php_flag display_errors on
{CODE}


!!! 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
{CODE(wrap=>1)}
# 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
{CODE}


!!! Maximum File and Post Size
The maximum allowed size for uploaded files and maximum size of POST data that PHP will accept.
{CODE(wrap=>1)}
# 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
{CODE}


!!! Include Path
{CODE(wrap=>1)}
# 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 "."
{CODE}

Also see [http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/trunk/_htaccess?view=markup|latest default htaccess from code base]


!! Related Links
* ((Search engine optimization))
* ((Rewrite Rules))
* ((apache))
* ((lighttpd))
* ((Operating System independence))
* ((php.ini))
* ((Upload file size))
* ((Clean URLs))
* http://www.htaccessredirect.net/

!! Alias
(alias(_htaccess)) | (alias(.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