How to Active PHP Extension

In order to make a dynamic extension available for the used PHP module (i.e. engine), it should be enabled within the corresponding configuration file.Note: The inbuilt extensions should not be loaded manually, as they are constantly running at all PHP servers in CANTECH Cloud by default.
Below, you can find out how this can be accomplished:

1. Click the Config button for your app server.

2. Within the opened configuration tab, move to the, etc > php.ini file and scroll down to the Extensions provided by CANTECH Cloud section. Here, each dynamic extension has its own sub-section, where it can be enabled and configured.

3. Now, locate the required section (they are listed in the alphabetic order) and uncomment the extension={module_name}.directive inside (i.e. remove semicolons at the beginning of the corresponding line) to enable it:

Also, here you can adjust the extension by means of the stated configuration parameters (or specify your own ones).
4. After all the necessary changes are made, do not forget to Save them and Restart the node to apply the new configuration.

Configure Extension

All the necessary PHP modules’ settings are to be handled via the php.ini file. Herewith, the majority of provided dynamic extensions are specified with a set of possible configuration parameters alongside.

As an example, let’s consider such for the dynamic OPcache extension – PHP accelerator, based on the opcode caching and optimization:

  • opcache.enable=1
    enable/disable OPcache extension
  • opcache.memory_consumption=64
    set the amount of memory to use
  • opcache.interned_strings_buffer=8
    set the amount of memory to be used for storing internal strings (e.g. classnames)
  • opcache.max_accelerated_files=4000
    the maximum number of files to be cached
  • opcache.revalidate_freq=60
    the frequency of checking file timestamps for the shared memory storage allocation to be changed
  • opcache.fast_shutdown=1
    enable/disable a fast shutdown sequence for accelerated code
  • opcache.enable_cli=1
    enable/disable OPcache for the CLI version of PHP

Add Custom Extension

In addition to all of the modules, available at CANTECH Cloud out-of-box, you have the possibility to integrate your own PHP extensions to a server if needed. For that, just follow the instruction below:

1. Compile the extension itself.

2. Navigate to the CANTECH Cloud dashboard and click on the Config button for your PHP application server.3. Now, using the opened manager, upload your custom extension to the modules folder. ( download the module and upload it) ( click on the settings icon and upload the module )

4. Move to the etc > php.ini file, find the Dynamic Extensions section and add the next command directive:

Tip: You can define all the necessary settings for your extension in the same section if needed.
5. Save the changes and Restart the node.

If you need any help contact our support, Open support ticket from client area

Was this article helpful?

Related Articles