Posts by Starlight

    I improved the script to not add redundant code (50% less lines of code) for each new version:

    The latest PHP Switchre plug-in has a dependency between libgd-dev and libgd2-xpm-dev that cannot be resolved in jessie. It leads to an error while compiling PHP versions.

    This package should and can be safely removed in Debian jessie (transitional package) and strech (virtual package).

    I'll and I hope that following you work, you'll participate too.

    Sure, I will do. Let me first try to get my plugin working as expected and I'm going to document the important parts. Nevertheless, for the tricky parts, I need your help. You know the code better.

    Quote from Starlight

    b) find out what API version is the minimum possible to provide a plugin for?

    Here you got me wrong. I actually wanted to find out, how to identify the lowest API version, the plugin would probably work with. It's a bit tricky: I develop a plugin with iMSCP 1.5.1 and API v 1.5.0. And I wonder, is this also working with iMSCP 1.1.6 or 1.4.7 or not. Just to set the api_version parameter right.

    I'm searching for an easy way to include vendor namespaces in a plugin.

    Currently, I try to develop a plugin, that requires third party software organized in namespaces. If I call the namespaces (e.g. use vendor\Base64), I get an error (Class 'vendor\Base64' not found), because the namespace is unknown. I also tried to autoload the namespace without success. I don't want to include all files. Is there a good practice how to do this?

    1. function __autoload($namespace)
    2. {
    3. $namespace = getcwd() . '/../plugins/Plugin1/vendors/' . str_replace('\\', '/', $namespace) . '.php';
    4. require_once($namespace);
    5. }

    Your second proposal sounds good. Especially, the the easy way for customers to add IPv4 and / or IPv6 addresses to their domains / sub domains as resellers via virtual IP ranges.

    Current status - How to

    Currently, I added 1000 IPv6 Addresses via a mysql procedure:

    1. DELIMITER $$
    2. CREATE PROCEDURE addips(p1 INT, p2 INT)
    3. BEGIN
    4. SET @x = p1;
    5. REPEAT
    6. INSERT INTO `server_ips` (`ip_id`, `ip_number`, `ip_netmask`, `ip_card`, `ip_config_mode`, `ip_status`) VALUES (NULL, CONCAT('2001:dead:beef:3::', HEX(@x)), '124', 'eth0', 'auto', 'toadd');
    7. SET @x = @x + 1;
    8. UNTIL @x > p2 END REPEAT;
    9. END$$
    10. DELIMITER ;

    I assigned the resellers a bunch of IPv6 addresses via the front end.
    Added IPv6 addresses for every Domain, Subdomain and Alias Domain via database.

    Then I downloaded and configured the listeners for apache2 and bind9 (added one IPv4 address for all Domains).

    Last, I re-run the i-mscp setup.


    I'd like to setup my system with IPv4 and IPv6 addresses for every Domain hosted. I played a bit around with single IPv4, single IPv6 and dual stack via listener.

    I plan the following setup:
    Every domain should get its own IPv6 address and all domains the same IPv4 (via apache2 listener).

    Do I need to add every single IPv6 address manually (or via script to the DB) or is there a possibility to do this via the net mask?
    Do I need to use the Bind9 listener, too?