Welcome Guest, Not a member yet? Register   Sign In
  Mastering Email Delivery in SHONiR CMS — Guide to Multiple SMTP Servers, Relay Limits
Posted by: shonirits - Yesterday, 02:44 PM - No Replies

Hi everyone,

I wanted to share a detailed guide I just published on email delivery in SHONiR CMS — a modern Content Management System built on the CodeIgniter 4 framework.

SHONiR CMS includes a powerful Mail Servers management system that lets you configure multiple SMTP servers with relay limits and automatic failover. This means you can add SMTP providers like Gmail, Yahoo, Hotmail, Brevo (Sendinblue), SendPulse, or your own mail servers — and SHONiR CMS will use them intelligently for sending notification, transactional, and bulk emails.

? Read the full guide here:
https://8.shonir.com/shonir-cms/bpd20/ma...lover.html

What’s covered in the article?

? Why multiple SMTP servers are useful
? How SHONiR CMS chooses a random SMTP for delivery
? Detailed Brevo SMTP setup (API & SMTP key, domain verification)
? Step-by-step admin panel setup in SHONiR CMS
? Priority, encryption, relay limits & reset type
? Automatic retry system with failover (up to 12 retries, 5–15 sec intervals)
? Real-world example scenarios
? Benefits like reliability, load balancing & avoidance of email loss

Why this matters for CodeIgniter developers

If you’re building applications that rely on email notifications — order alerts, user registrations, newsletter delivery — having a robust email delivery system is essential. SHONiR CMS simplifies this by abstracting SMTP server management and handling smart retries and failovers internally.

Questions for the community

Has anyone implemented a similar multi‑SMTP system in CodeIgniter?

What are best practices for handling SMTP relay limits across providers?

Any recommendations for monitoring or logging email delivery success/failures in CodeIgniter?

Looking forward to feedback, ideas, and improvements from experienced developers here!

Thanks! ?


  ? Just Published: A Complete Guide to Installing SHONiR CMS Built on CodeIgniter 4
Posted by: shonirits - 03-09-2026, 04:04 PM - No Replies

If you work with PHP and the CodeIgniter 4 framework, or if you're exploring lightweight, scalable content management systems, you might find this new guide useful.

I’ve put together a detailed, step-by-step tutorial on how to configure SHONiR CMS on your localhost (WampServer/XAMPP). It covers everything from downloading the project from GitHub to getting the admin panel up and running.

? In the guide, you'll learn how to:

Set up the database and import the structure.

Configure the .env file for your local environment.

Update core system URLs in the database.

Clear the cache for a clean local launch.

Access the admin dashboard with demo credentials.

? Repository: https://github.com/shonirits/SHONiR-CMS
? Full Article: https://8.shonir.com/shonir-cms/bpd19/se...ework.html
? Video Tutorials:
YouTube: https://www.youtube.com/watch?v=49x44HNG2-o
Dailymotion: https://www.dailymotion.com/video/xa1lp3s

SHONiR CMS aims to reduce development workload with its modular components, built-in caching, and SEO-friendly structure. It's an interesting project for anyone building dynamic websites or web applications with CodeIgniter.

Feel free to share with your network if you know someone who might find this helpful! ?

#CodeIgniter4 #PHP #WebDevelopment #OpenSource #SHONiRCMS #CMS #Programming #Tutorial #DevCommunity #MySQL


  100k Requests on Shared Hosting via Triple-Layer Caching (Built on CI4)
Posted by: shonirits - 03-08-2026, 01:03 PM - No Replies

I wanted to share how we are utilizing the power of CodeIgniter 4 in our project, SHONiR CMS, to achieve high-speed content delivery (100k+ requests) even on low-end shared hosting environments.

One of our core philosophies is: Don't touch the core. We believe the CI4 team is elite and the framework is already one of the most stable PHP foundations available. Instead of modifying core files, we focused on "utilizing" the framework's native power more efficiently.

How it Works: The Triple-Layer Cache Architecture
To maintain high performance without expensive infrastructure, SHONiR CMS implements three distinct layers:

1. Native CI4 Web Page Caching
We use the built-in $this->cachePage(300) functionality. It’s a "work like charm" feature that handles the generated output of a page, bypassing controller logic on subsequent hits.
Reference: CodeIgniter 4 Caching User Guide: https://codeigniter.com/user_guide/general/caching.html

2. Static HTML Caching (The DB Killer)
For sites like business portfolios or catalogs that don't update every minute, querying the database for every hit is a waste of resources.

Mechanism: SHONiR generates a fully rendered HTML file and stores it in writable/cache/htmls.

The Result: On request, the system delivers the static HTML directly. No DB connection, no heavy PHP processing.

Traceability: We inject generation timestamps into the source code for developer transparency:
<!-- SHONiR Cache generated: 03/08/26 15:07:42 UTC -->

3. Image Optimization Layer
Large images are the biggest performance killers. SHONiR automatically:

Converts images to WebP extension.

Compresses files to reduce size while maintaining visual quality.

Stores them in a dedicated image cache (Controlled via tbl_config).

Real-World Performance
In our testing, even on average servers, the memory usage remains incredibly low:
Usage: 659.19 kb | Peak: 659.73 kb

How to Configure (For CI4 Newbies)
We’ve made activation simple via the database (tbl_config) and the .env file:

Global Cache Time: In tbl_config, set cache_time to your desired seconds (e.g., 3600 for 1 hour). Setting this to 0 clears/disables the cache.

Enable HTML Cache: In your .env, simply set html.cache = true.

Image Quality: Control the compression ratio (0-100) via the image_quality key in the config table.

Conclusion
By keeping a Clean Architecture and respecting the CI4 core, we’ve built a system that is both maintainable and incredibly fast. It’s proof that you don’t need a complex stack to handle massive traffic—you just need to use CodeIgniter the right way.

Check out a live cached demo: https://8.shonir.com/shonir-cms/bpd17/mu...mance.html

Would love to hear your thoughts or answer any questions about our implementation!


  Generative AI and LLMs for Dummies Free
Posted by: InsiteFX - 03-08-2026, 10:30 AM - No Replies

FREE. Generative AI and LLMs for Dummies


  feat(pager): Allow Pager to go beyond the page limits
Posted by: ozornick - 03-04-2026, 01:52 AM - No Replies

https://github.com/codeigniter4/CodeIgni...3991942872

I'm trying to solve a problem with page limits. Please review the Issue and provide an answer.

1. What should HTML look like on missing pages? I would not show it at all except for error 404, because there is no data. It doesn't match for Pager.

2. Do I need to allow pages < 1? To also receive an error notification.

3. Perhaps in both cases it is worth displaying a simple message without links?

Don't forget, we have several types of output:

First .. 5 6 7 .. Last
Newest Older
API pagination


Lightbulb Optimizing PHP 8 + MariaDB CMS for High Performance on Low-End VPS
Posted by: shonirits - 03-03-2026, 03:32 PM - Replies (5)

Hi everyone,

I’ve been experimenting with building a high-performance dynamic CMS using PHP 8 and MariaDB 10, designed to run on a single-core VPS with 1GB RAM.

Some interesting observations:

Even on low-end hosting, the CMS can handle 100,000+ concurrent requests without performance degradation.

Using proper query optimization, caching strategies, and lightweight templates makes a big difference.

The CMS architecture allows fast project development while maintaining security and code quality.

The system can behave like a static HTML site in terms of perceived speed, despite being fully dynamic.

I’ve also shared the project source code on GitHub for anyone interested in exploring or testing:
? GitHub Repository: https://github.com/shonirits/SHONiR-CMS

And there’s a live demo available to experience performance firsthand:
? Live Demo: https://8.shonir.com/shonir-cms/

I’m curious to know:

What strategies do you use in CodeIgniter to handle extremely high traffic on minimal server resources?

Any tips for optimizing PHP 8 + MariaDB performance in such environments?

How do you balance dynamic content with server load for large-scale requests?

I’d love to hear about other developers’ experiences and best practices in this area.

Thanks in advance!


  Content Security Policy
Posted by: donpwinston - 03-03-2026, 06:47 AM - Replies (7)

I noticed some new properties in ContentSecurityPolicy.php:

PHP Code:
  /**
    * Specifies valid sources for stylesheets <link> elements.
    *
    * @var list<string>|string
    */
    public array|string $styleSrcElem 'self';

    /**
    * Specifies valid sources for stylesheets inline
    * style attributes and `<style>` elements.
    *
    * @var list<string>|string
    */
    public array|string $styleSrcAttr 'self'
I override them in Registrar.php like this:
PHP Code:
public static function ContentSecurityPolicy(): array
  {
    return [
      'defaultSrc' => [
        'self',
        '*.uscourts.gov',
        '*.bsg.na.baesystems.com',
      ],
      'scriptSrc' => [
        'self',
        '*.uscourts.gov',
        '*.bsg.na.baesystems.com',
      ],
      'scriptSrcElem' => [
        'self',
        '*.uscourts.gov',
        '*.bsg.na.baesystems.com',
      ],
      'scriptSrcAttr' => [
        'self',
        '*.uscourts.gov',
        '*.bsg.na.baesystems.com',
      ],
      'styleSrc' => [
        'self',
        '*.uscourts.gov',
        '*.bsg.na.baesystems.com',
      ],
      'styleSrcElem' => [
        'self',
        '*.uscourts.gov',
        '*.bsg.na.baesystems.com',
      ],
      'styleSrcAttr' => [
        'self',
        '*.uscourts.gov',
        '*.bsg.na.baesystems.com',
      ], 
It is not working like it used to. I get "Refused to apply a stylesheet because its hash, its nonce, or 'unsafe-inline' does not appear in the style-src directive of the Content Security Policy." in the JS console.  This has always been a big headache with CI. I'm not liking it. I need to use nonces occasionally. I do not want to use 'unsafe-inline'. I thought CI added the nonces automatically and matched it to the style <?= csp_style_nonce() ?>> in my views. This appears to no longer work for some reason.

  feat(flags): Implementing A/B testing with flags
Posted by: patel-vansh - 03-03-2026, 01:58 AM - Replies (1)

Hello everyone,
I’d like to propose a standardized Feature Flag system for CI4.
Right now, gradual rollouts, A/B tests, or SaaS-tier restrictions usually mean custom DB checks or environment-based logic. A first-party, modular package (similar to Shield or Settings) could provide a clean, consistent API without adding bloat to the core.
Proposed Approach
Using CI4’s Handler pattern:

  • ConfigHandler – config-based flags
  • DatabaseHandler – per-user, per-tenant, or global toggles
  • Class Resolvers – for complex logic (e.g., subscription tiers)
Developer Experience:

PHP Code:
if (service('flags')->active('new-dashboard')) { ... }
if (
flag('new-dashboard')) { ... }
$routes->get('/beta''Beta::index', ['filter' => 'flag:beta-access']); 

Why It Matters
Cleaner SaaS feature control, safer rollouts, easier A/B testing—and even smoother CI4 upgrade transitions through opt-in flags.
This is just a proposal for discussion.
  • Do you feel this is a missing piece in the ecosystem?
  • Preferred name: codeigniter4/flags or codeigniter4/toggles or something else?
Would love to hear your thoughts.

  CodeIgniter 4 Shield session cookie expiration not being updated
Posted by: janiceades - 03-03-2026, 12:51 AM - Replies (2)

Hello,
I'm using CI4 with Shield and would like the session to remain active indefinitely. In Config\Session.php, I set the expiration and timeToUpdate properties to 60×60×24×365 (and also tried setting it to 0). However, the created ci_session cookie still expires on the same day. How can I actually change this?
Action: Set Config\Session->expiration to = 60×60×24×365.

Expectation: I expected the ci_session cookie to have an expiration date set for next year.
Result: The ci_session cookie is still created with a same-day expiration.


  feat: Reduce the number of config files
Posted by: ozornick - 03-01-2026, 01:16 PM - Replies (4)

It's not the first time I've seen that the app/Config directory contains a lot of unused files (Mime, UserAgent,..)
There is an opportunity for appstarter to reduce their number to a minimum. There are nuances.

1. You can leave the following configs:

Code:
.
├── ./Config
│   ├── ./Config/App.php
│   ├── ./Config/Autoload.php
│   ├── ./Config/Constants.php
│   ├── ./Config/Database.php
│   ├── ./Config/Events.php
│   ├── ./Config/Filters.php
│   ├── ./Config/Modules.php
│   ├── ./Config/Paths.php
│   ├── ./Config/Routes.php
│   └── ./Config/Services.php

2. Update composer.json:

Code:
"psr-4": {
            "App\\": "app/",
            "Config\\": ["app/Config/", "vendor/codeigniter4/framework/app/Config/"]
        },
        "exclude-from-classmap": [
            "**/Database/Migrations/**",
            "vendor/codeigniter4/framework/app/Config/App.php",
            "vendor/codeigniter4/framework/app/Config/Modules.php",
           // Other files here
        ]

3. All basic settings are possible via .env (except arrays). When you need to redefine the settings in the file, copy the config from vendor/ and add the file to the exclude in composer.json.

You don't have to add exclude, it will work, but composer will issue a warning.


I did not run the tests in the develop branch, it works on the appstarter project. It doesn't look very nice, for fans.
How do you feel about this?

Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Mastering Email Delivery ...
by shonirits
Yesterday, 02:44 PM
? Just Published: A Compl...
by shonirits
03-09-2026, 04:04 PM
100k Requests on Shared H...
by shonirits
03-08-2026, 01:03 PM
Generative AI and LLMs fo...
by InsiteFX
03-08-2026, 10:30 AM
feat(mcp): Add MCP server...
by michalsn
03-06-2026, 11:52 PM
Content Security Policy
by grimpirate
03-06-2026, 06:28 AM
Coming in 4.7: API Improv...
by Baki
03-06-2026, 12:31 AM
Optimizing PHP 8 + MariaD...
by shonirits
03-04-2026, 06:47 AM
feat(pager): Allow Pager ...
by ozornick
03-04-2026, 01:52 AM
Pagination for RESTContro...
by ozornick
03-04-2026, 01:20 AM

Forum Statistics
» Members: 201,730
» Latest member: QHotel
» Forum threads: 78,643
» Forum posts: 380,730

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB