Skip to content

Configuration File Settings

The configuration file (~/admin/includes/config.php) contains advanced system settings that control core application behavior. These settings are typically configured during installation but may need adjustment when deploying behind proxies, load balancers, or in specialized hosting environments.

Location

The configuration file is located at:

~/admin/includes/config.php

Proxy and Load Balancer Configuration v8.7.2

If your Interspire Email Marketer installation is behind a reverse proxy, load balancer, or CDN (such as nginx, Apache reverse proxy, Cloudflare, AWS ELB, or similar), you need to enable proxy header support for accurate IP address detection.

When to Enable Proxy Headers

Enable this setting if:

  • Your installation is behind nginx or Apache configured as a reverse proxy
  • You’re using a CDN like Cloudflare
  • You’re using a load balancer (AWS ELB, HAProxy, etc.)
  • IP addresses in login logs and statistics show your proxy’s IP instead of actual client IPs
  • IP banning is not working correctly because all requests appear to come from the same IP

Configuration

Add the following line to your ~/admin/includes/config.php file:

define('SENDSTUDIO_TRUST_PROXY_HEADERS', true);

This enables support for the following HTTP headers:

  • X-Forwarded-For - Standard proxy header containing the original client IP
  • X-Real-IP - Alternative header used by some proxies (nginx)

Example Configuration

<?php
// Database configuration
define('SENDSTUDIO_DATABASE_TYPE', 'mysql');
define('SENDSTUDIO_DATABASE_HOST', 'localhost');
// ... other settings ...
// Proxy header support (add this line)
define('SENDSTUDIO_TRUST_PROXY_HEADERS', true);
?>

Features Affected by Proxy Configuration

When properly configured, proxy header support improves:

  • Login failure tracking - Accurately identifies client IPs for failed login attempts
  • IP banning - Bans the actual client IP, not the proxy IP

Verification

After enabling proxy headers:

  1. Check login failure logs to verify real client IPs are being recorded
  2. Test IP banning functionality with failed login attempts
  3. Review subscriber records to ensure IPs are being tracked correctly
  4. Monitor statistics to confirm accurate IP tracking

Troubleshooting

Problem: IP addresses still show the proxy IP after enabling the setting

  • Solution: Verify your proxy is actually sending X-Forwarded-For or X-Real-IP headers
  • Check your proxy configuration (nginx, Apache, Cloudflare, etc.)
  • Review proxy logs to confirm headers are being sent

Problem: Application stops working after adding the setting

  • Solution: Check for PHP syntax errors in config.php
  • Ensure you added the line inside the <?php ?> tags
  • Verify file permissions are correct (typically 644 or 640)

Large System Mode Configuration v8.7.3

Large System Mode is designed for Interspire Email Marketer installations managing very large contact databases. As subscriber volumes grow into the millions, traditional page-based navigation becomes less efficient due to the way record counts are calculated. Large System Mode enables cursor-based pagination, which removes expensive count queries and keeps subscriber management responsive at scale.

When to Enable Large System Mode

Enable this setting if:

  • Your total contact count across all lists exceeds several million records
  • Administrative views take noticeably longer to load as data grows
  • Aggregated views such as “View All Contacts” are slow to respond
  • Large lists must be managed together rather than individually

Understanding the Constraint

Traditional pagination relies on COUNT(*) queries to calculate total records and display page numbers (for example, “Page 1 of 4,532”). On large tables, these count operations become increasingly expensive because the database must evaluate the full result set before displaying records.

When viewing “All Contacts” or applying filters across large datasets, the system may need to join subscriber data with related contact attributes and count all matching records before returning results. As database size increases, this approach no longer reflects the most efficient way to retrieve data.

Large System Mode replaces this behavior with cursor-based navigation, which retrieves records relative to a known position instead of calculating total page counts.

Configuration

Add the following line to your ~/admin/includes/config.php file:

define('LARGE_SYSTEM_MODE', true);

Example configuration:

<?php
// Database configuration
define('SENDSTUDIO_DATABASE_TYPE', 'mysql');
define('SENDSTUDIO_DATABASE_HOST', 'localhost');
// ... other settings ...
// Large System Mode
define('LARGE_SYSTEM_MODE', true);
?>

The change takes effect immediately. No restart or cache clearing is required.

What Changes When Enabled

When Large System Mode is active, the subscriber management interface adjusts:

  • Pagination controls change from numbered page buttons (1, 2, 3) to “Previous” and “Next” navigation
  • Page indicators display the current record count rather than total page numbers
  • Per-page selector remains available (50, 100, 500, 1000 records per page)
  • Browser navigation (back and forward buttons) continues to work normally
  • Filtering, search, bulk actions, and exports continue to function as before

With Large System Mode enabled:

  • Records are navigated sequentially using “Previous” and “Next”
  • Contacts are displayed in subscriber ID order
  • Direct page-number navigation is not available
  • Column-based sorting is not supported

These changes prioritize consistent performance over arbitrary page positioning.

Performance Characteristics

Large System Mode uses cursor-based pagination:

  • Records are retrieved relative to the last record shown, using indexed lookups
  • No COUNT(*) queries are executed for page navigation
  • Query time remains stable regardless of total database size
  • Next and Previous navigation relies on index seeks instead of full-table scans

The required database indexes are created during installation or upgrade to v8.7.3 if they do not already exist. Enabling Large System Mode does not trigger additional schema changes.

Verification

After enabling Large System Mode:

  1. Navigate to Subscribers → Manage Subscribers
  2. Select “View All Contacts”
  3. Confirm that:
    • Pagination displays “Previous” and “Next” buttons
    • Page numbers are no longer shown
    • The per-page selector is available
  4. Navigate forward and backward using the buttons to confirm consistent page loading

If the interface still displays numbered page buttons:

  • Verify that LARGE_SYSTEM_MODE is defined correctly in config.php
  • Confirm that the constant is set to true (not a string value)
  • Ensure the line appears within the <?php ?> tags
  • Check for syntax errors in the configuration file

Disabling Large System Mode

To return to traditional pagination:

  1. Remove or comment out the LARGE_SYSTEM_MODE line in config.php:

    // define('LARGE_SYSTEM_MODE', true);
  2. Save the file

The change takes effect immediately.

Disabling Large System Mode on very large databases may reintroduce the performance limitations associated with traditional pagination.

For standard configuration options like database settings, application URL, and email server details, see: