Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Working on i-MSCP

Laurent Declercq nuxwin

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

i-MSCP PhpSwitcher plugin v5.0.0

Provides additional PHP versions for customers.

Requirements

  • One of the supported distributions
  • i-MSCP Serie ≥ 1.5.3
  • The Fcgid or the FPM i-MSCP httpd server implementation
@nuxwin
nuxwin / SamplePlugin.php
Last active Jun 19, 2019
i-MSCP SamplePlugin entry point class
View SamplePlugin.php
<?php
/**
* i-MSCP SamplePlugin plugin
*
* @author Laurent Declercq <l.declercq@nuxwin.com>
* @copyright (C) 2019 Laurent Declercq <l.declercq@nuxwin.com>
* @license i-MSCP License <https://www.i-mscp.net/license-agreement.html>
*/
/** @noinspection PhpUnhandledExceptionInspection PhpDocMissingThrowsInspection */
@nuxwin
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
------------------------------------------------------------------------------------------------------------------------
BACKEND
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
nuxwin / config.php
Last active Nov 24, 2018
SpamAssassin - Make possible to add plugin configuration definitions
View config.php
<?php
/**
* i-MSCP SpamAssassin plugin
* Copyright (C) 2015-2018 Laurent Declercq <l.declercq@nuxwin.com>
* Copyright (C) 2013-2016 Rene Schuster <mail@reneschuster.de>
* Copyright (C) 2013-2018 Sascha Bay <info@space2place.de>
*
* 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
nuxwin / howto_build_php_builtin_ext_without_full_php_dist.md
Last active Nov 21, 2018
Howto build a PHP builtin extension without having to rebuild full PHP distribution
View howto_build_php_builtin_ext_without_full_php_dist.md

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

View distros-with-possible-external-makefiles.pl
=pod
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.
=cut
my %distros = {
"$CPAN/authors/id/A/AG/AGENT/Lemplate-0.15.tar.gz" => { "doc/Makefile" => 1, "src/Makefile" => 1 },
@nuxwin
nuxwin / README.md
Last active May 27, 2018
i-MSCP Let's Encrypt plugin
View README.md

i-MSCP LetsEncrypt plugin v3.4.0

Introduction

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

Requirements

  • i-MSCP Serie 1.4.x, 1.5.x
@nuxwin
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
<?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;
View gnome-tracker-disable.md

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: http://lduros.net/posts/tracker-sucks-thanks-tracker/

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

Directories

View imscp_test_rspamd_listener.pl
#!/usr/bin/perl
# 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 https://gist.github.com/nuxwin/3a855ecbaae7d2482b68126e8206c534
# under the /etc/imscp/listeners.d directory, e.g: /etc/imscp/listeners.d/10_postfix_rspamd.pl
# - Download that script under the /usr/local/src directory with name imscp_test_rspamd_listener.pl
# - Run the script as follows: perl /usr/local/src/imscp_test_rspamd_listener.pl