菜单

Special settings for TYPO3 localconf.php

2010年04月8日 - typo3

When you set up a new installation of TYPO3 experienced installers will make changes to the typo3conf/localconf.php  file either manually or through the install tool.

I have listed my regular changes with discussion:

$TYPO3_CONF_VARS[‘GFX’][‘jpg_quality’] = ’80’;

I find that the default TYPO3 output of jpegs contain too many artifacts so I increase the quality slightly.

$TYPO3_CONF_VARS[‘GFX’][‘TTFLocaleConv’] = ‘UTF-8’;
$TYPO3_CONF_VARS[‘SYS’][‘UTF8filesystem’] = ‘1’;
$TYPO3_CONF_VARS[‘SYS’][‘multiplyDBfieldSize’] = ‘2’;
$TYPO3_CONF_VARS[‘BE’][‘forceCharset’] = ‘utf-8’;

In most cases using UTF-8 is the most sensible suggestion for character encoding as it encompases the widest range of characters. I remain puzzled why TYPO3 does not default to UTF-8.

$TYPO3_CONF_VARS[‘GFX’][‘TTFdpi’] = ’96’;

Most modern hosting comes with Gdlib2 so this should be set to 96dpi. I don’t know why TYPO3 does not set this by default.

$TYPO3_CONF_VARS[‘SYS’][‘curlUse’] = ‘1’;

When TYPO3 fetches external pages – using cURL is just a little bit quicker so enable it if available.

$TYPO3_CONF_VARS[‘SYS’][‘setMemoryLimit’] = ’64’;

Although this setting is probably set atserver level some configurations allow you to over-ride it here in the localconf.php so set it to something sensible. Most modern servers have a good amount of RAM available.

$TYPO3_CONF_VARS[‘SYS’][‘systemLogLevel’] = ‘1’;

This reduces the amount of logging slightly – can be set higher to reduce load slightly.

$TYPO3_CONF_VARS[‘EXT’][‘noEdit’] = ‘0’;

I am always tweaking/editing extension files so this setting allows you to do this within the TYPO3 extension manager.

$TYPO3_CONF_VARS[‘BE’][‘RTE_imageStorageDir’] = ‘fileadmin/user_upload/’;

I have never understood why TYPO3 defaults the user upload to a directory outside the accessible fileadmin folder. So set this and you’ll be able to access the files that people upload more easily from the TYPO3 backend.

$TYPO3_CONF_VARS[‘BE’][‘warning_email_addr’] = ’email@domain.com’;

This allows you to receive emails when failed attempts to log in are detected. This is useful to help spot bad behaviour but more often I see clients forgetting their log-ins so I help them out by reminding them pro-actively!

$TYPO3_CONF_VARS[‘BE’][‘warning_mode’] = ‘2’;

Set this so that you get an email if an admin user logs in. It includes yourself of course.

$TYPO3_CONF_VARS[‘BE’][‘lockIP’] = ‘3’;

I reduce this from the default of 4 as my ISP tweaks my IP address part way through sessions. Sometimes they change my IP completely and it stops my session being maintained so if this happens you’d need to reduce this amount to 0.

$TYPO3_CONF_VARS[‘BE’][‘sessionTimeout’] = ‘3600*24*365’;

I get annoyed when TYPO3 keeps popping up my alerts and logging me out when I work on a site for long hours so this helps reduce the nags.

$TYPO3_CONF_VARS[‘BE’][‘compressionLevel’] = ‘2’;

This compresses theTYPO3 backend and helps speed things up a bit.

$TYPO3_CONF_VARS[‘BE’][‘interfaces’] = ‘backend,frontend’;

I like to have the option to login to the backend and the frontend. This option gives you the choice when you login.

$TYPO3_CONF_VARS[‘BE’][‘accessListRenderMode’] = ‘checkbox’;

This is a special tweak that helps you to see better what each access control item is and uses check boxes instead of that slightly tricky combo box.

$TYPO3_CONF_VARS[‘FE’][‘logfile_dir’] = ‘fileadmin/logs’;

Set your typo3 log directory somewhere you can easily see the files.

$TYPO3_CONF_VARS[‘FE’][‘publish_dir’] = ‘/’;

For me this is the coolest modification and so few developers use it! It allows you to publish a static version of your web pages as real html and dynamically alongside pages that are not published. Speeds up page delivery more than normal TYPO3 caching.

$TYPO3_CONF_VARS[‘FE’][‘compressionLevel’] = ‘2’;

This compresses the front end to speed up the page slightly.

$TYPO3_CONF_VARS[‘FE’][‘pageNotFound_handling’] = ‘READFILE:fileadmin/notfound.html’;

At last TYPO3 serves up good 404 page handling  – I need to test this fully and provide a useful tutorial.

$TYPO3_CONF_VARS[‘FE’][‘lifetime’] = ‘3600*24*7*52’;

Set longer cookie lengths for your logged in website visitors.

$TYPO3_CONF_VARS[‘FE’][‘dontSetCookie’] = ‘1’;

I always set this on sites that do not use front end log ins. The reason – it stops the cookie nag in some browsers and can put people off entering the site.

$TYPO3_CONF_VARS[‘FE’][‘pageCacheToExternalFiles’] = ‘1’;

This creates a static html page of the cached TYPO3 output and will speed up the delivery of the page to the browser. Files are stored in /typo3temp/cachedfiles/ I’ve not tested it fully yet but so far seems to work fine. On clearing cache the old pages are not deleted so better clear out this folder from time to time is server space is an issue.

www.aoline.com

发表评论

电子邮件地址不会被公开。 必填项已用*标注