Loading...
 
Skip to main content

History: php.ini

Source of version: 25 (current)

Copy to clipboard
            ! php.ini

Generally, you shouldn't need to change your [http://www.google.com/search?q=php.ini|php.ini], but if you do (like in ((ISPCOnfig3)) setups), this page is to share tips & tricks about Tiki-related configs.

You have to place your custom php.ini file in your Tiki root folder.
Keep in mind that some servers have two different php.ini files, one for php scripts used through a web server and browser, and another one for php scripts being run in the commadn line (CLI). These 2 are common locations for those 2 php.ini files (in Debian GNU/Linux servers):
* /etc/php5/apache2/php.ini
* /etc/php5/cli/php.ini

Related:
* ((htaccess))
* ((Check))

!! .user.ini
Since php 5.3 you can use .user.ini placed in your Tiki root to customise your PHP setting.


!! Samples
!!! Performance
{CODE(colors="properties")}
; if you want to reduce CPU usage, set it to off
; if you want to limit traffic, set to on
zlib.output_compression = Off

max_execution_time = 60     ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 256M ; 128M is PHP's default value. If you still get blank pages, raise it.

; realpath_cache_size determines the size of the cache used by PHP used each time it references a file
; The size value should be increased for Tiki as the default is only 16K 
; see http://www.php.net/manual/en/ini.core.php#ini.realpath-cache-size
realpath_cache_size = 64k
; The time to live value defaults to 120 seconds so can be increased on stable sites, e.g.
; realpath_cache_ttl = 360
{CODE}

!!! Upload larger files
{CODE(colors="properties")}
memory_limit=128M
upload_max_filesize=10M
post_max_size=11M
max_execution_time=90
{CODE}

!!! Medium/Big Tiki
{CODE(colors="properties")}
memory_limit = 384M 
upload_max_filesize = 16M 
post_max_size = 16M
max_execution_time = 90
zlib.output_compression = 1
realpath_cache_size = 64k
{CODE}

See also:
* ((Upload file size))
* https://www.php.net/manual/en/ini.list.php

Add on 2015-11-23:
Since php 5.3 you can use .user.ini instead of php.ini,
Since php 5.5 it is also necessary!! For example on site5.com as they explain here: [http://kb.site5.com/php/how-to-make-custom-php-changes-using-a-user-ini-file/] (see the link for more information)