Skip to content

Instantly share code, notes, and snippets.

Working on i-MSCP

Laurent Declercq nuxwin

Working on i-MSCP
View GitHub Profile
nuxwin /
Last active Sep 16, 2019
Documentation for the next PhpSwitcher plugin version (5.0.0) - Review needed.

i-MSCP PhpSwitcher plugin v5.0.0

Provides additional PHP versions for customers.


  • One of the supported distributions
  • i-MSCP Serie ≥ 1.5.3
  • The Fcgid or the FPM i-MSCP httpd server implementation
nuxwin / SamplePlugin.php
Last active Jun 19, 2019
i-MSCP SamplePlugin entry point class
View SamplePlugin.php
* i-MSCP SamplePlugin plugin
* @author Laurent Declercq <>
* @copyright (C) 2019 Laurent Declercq <>
* @license i-MSCP License <>
/** @noinspection PhpUnhandledExceptionInspection PhpDocMissingThrowsInspection */
nuxwin / changelog
Last active Jan 24, 2019
i-MSCP (next version) CHANGELOG - Lot of enhancement, fixes... (finalization stage...)
View changelog
i-MSCP ChangeLog
Git 1.5.x
Added: Support for PHP 7.2 , 7.3
Enhancement: Make it possible to change backup time for the control panel (control panel backup cron task)
Enhancement: Make it possible to enable/disable the CGI and PHP features on a per site basis
nuxwin / config.php
Last active Nov 24, 2018
SpamAssassin - Make possible to add plugin configuration definitions
View config.php
* i-MSCP SpamAssassin plugin
* Copyright (C) 2015-2018 Laurent Declercq <>
* Copyright (C) 2013-2016 Rene Schuster <>
* Copyright (C) 2013-2018 Sascha Bay <>
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
nuxwin /
Last active Nov 21, 2018
Howto build a PHP builtin extension without having to rebuild full PHP distribution

Howto build a PHP builtin extension without having to rebuild full PHP distribution

Sometime, we need to dig into PHP extension code to make some adjustements. For instance that is currently our case with the PHP openssl extension as provided by older PHP versions (5.3, 5.4, 5.5) which is not compatible with openssl >= 1.1... We need patch the code to add openssl 1.1 support...

To do so, it would be tedious for us to have to recompile full PHP distribution each time we want try a build of the openssl extension with our changes. A build of the openssl extension take ~3 seconds while a build of the full PHP distribution

Here is a list of CPAN distributions which B<may> have external Makefiles.
I have not built or used any of these, so your mileage may vary.
my %distros = {
"$CPAN/authors/id/A/AG/AGENT/Lemplate-0.15.tar.gz" => { "doc/Makefile" => 1, "src/Makefile" => 1 },
nuxwin /
Last active May 27, 2018
i-MSCP Let's Encrypt plugin

i-MSCP LetsEncrypt plugin v3.4.0


Provides free SSL certificates through the Let's Encrypt CA.


  • i-MSCP Serie 1.4.x, 1.5.x
nuxwin / Application\Service\MemcachedStorageFactory.php
Created Apr 23, 2018 — forked from dkemper/Application\Service\MemcachedStorageFactory.php
Zend Framework 2 - Session Memcached Configuration with Failover
View Application\Service\MemcachedStorageFactory.php
namespace Application\Service;
use Zend\Cache\Storage\Adapter\MemcachedOptions;
use Zend\Cache\Storage\Adapter\MemcachedResourceManager;
use Zend\Cache\StorageFactory;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\Session\SaveHandler\Cache;

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here:

After discovering it chowing 2 cores, I decided to go about disabling it.


# Make it possible to test the i-MSCP iMSCP::Listener::Postfix::Rspamd listener
# file by triggering the afterMtaBuildConf event manually.
# How to process:
# - Install the listener file that you can find at
# under the /etc/imscp/listeners.d directory, e.g: /etc/imscp/listeners.d/
# - Download that script under the /usr/local/src directory with name
# - Run the script as follows: perl /usr/local/src/