i-MSCP 1.4.x To add in errata - developer guide

  • Note for developers


    When developing i-MSCP, you must don't forget to enable the development mode on your dev server, else, you won't see any of your changes.


    By default (out of box), the i-MSCP frontend is configured for production

    • Classes are autoloaded using a classmap to avoid overhead of autoloader usage. This is achieved using the composer autoloader
    • PHP files are cached by the opcode cache (either APC for older Debian/Ubuntu versions or OPcache for recent versions).
    • The frontend appplication configuration (merged configuration) from all modules, and dynamic settings from the database `config` table are merged together and cached. Of course, cache is reseted on dynamic setting changes.
    • A classmap is generated for module classes to avoid overhead of autoloader usage
    • Doctrine ORM is configured to use APC or APCU userland cache for all its `components`

    It must be also noted that the DEBUG parameter from the imscp.conf file no longer have any effect on the FrontEnd. However, that parameter is still used by the backend for debug mode.


    To enable or disable development mode, a specific CLI command has been added. That command is available through the new frontEnd command line tool interface. In order, this command performs the following:


    When enabling development mode

    • The config/development.config.php.dist file, which override production parameters for developement environment, is copied to config/development.config.php
    • The application configuration file cache (merged configuration file cache) is removed if any
    • The classmap file cache for module classes is removed if any
    • The composer autoloader is dumped (any optimization such as usage of classmap is disabled)
    • The opcode cache is disabled for the frontEnd (it is done by editing its php.ini file)
    • The imscp_panel service is restarted (restart of PHP processes)

    When disabling development mode

    • The config/development.config.php, which override production parameters for developement environments, is removed
    • The application configuration file cache (merged configuration file cache) is removed if any (done for safety reasons)
    • The classmap file cache for module classes is removed if any (done for safety reasons)
    • The composer autoloader is dumped with all optimizations enabled (An authoritative classmap is generated)
    • The opcode cache is enabled for the frontEnd (it is done by editing its php.ini file)
    • The imscp_panel service is restarted (restart of PHP processes)

    Howto enable development mo

    Shell-Script
    1. # cd /var/www/imscp/gui/bin# php imscp.php imscp:development:mode enable


    Howto disable developement mode

    Shell-Script
    1. # cd /var/www/imscp/gui/bin
    2. # php imscp.php imscp:development:mode disable


    See also: https://github.com/i-MSCP/imsc…dard/gui/module/iMSCP/Dev for current documentation of the Dev module.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206