Jump to content

Overriding Default Cookie Options


You should only change your cookie options if you have a genuine need. Incorrectly setting these options may cause issues for users in your community.

Why you may need to override cookie options

IPS Community Suite 4 intelligently detects the most appropriate values to set cookies for your site effectively and securely.  For most users these default values work perfectly and you will not have a need to override the default settings.  If you find, however, that these default options are not appropriate for your site (for instance, if you are integrating your Community Suite with an external website), then you can override the default detected options through the constants.php file.


How to set up overrides in constants.php

If you do not have a constants.php in your site root already, create one with just the following line at the top.  This file can be used to set many different power-user level options (occasionally, some settings in the ACP will have you add to this file as well).



After this line you can set the following constants to override the default cookie options.  Be aware that you should ONLY set the values you need to set, and leave the rest of the constants commented out.

//define( 'COOKIE_DOMAIN', '.example.com' );
//define( 'COOKIE_PREFIX', 'prefix_' );
//define( 'COOKIE_PATH', '/' );

// If your front end website does not serve over SSL but your community suite does, you may need to set this


  Report Guide

  • Create New...