Explore our in-depth
tutorials
crafted by
skilled professionals!

Our Latest News, Advice and Thoughts

Add Custom PHP Modules with Custombuild in DirectAdmin

You are here:

 

PHP is an open supply scripting language which primarily used to create dynamic internet pages. PHP is supported by a lot of the internet servers and OSs. PHP modules are extensions principally written in C language. It may be compiled with PHP to allow static loading or dynamic loading. PHP modules are used for various functions with just a few extensions.

 

Listed below are the primary causes to make use of PHP modules.

1) To increase a PHP performance for a specific function like arithmetic, statistics, and so forth.

2) To get greater efficiency and effectivity.

 

On this tutorial, we are going to talk about how you can allow a PHP modules on DirectAdmin server.

In order for you an extra module to PHP in DirectAdmin, you’ll need to compile with possibility –with module.

 

1) First, it’s important to discover out which configuration file that system is utilizing. Login to the server by means of SSH as a root consumer and run the next instructions.

# cd /usr/native/directadmin/custombuild

# ./construct used_configs | grep configure.php

It appears like:

PHP (default) configuration file: /usr/native/directadmin/custombuild/configure/ap2/configure.php56

Change within the values if they’re totally different.

 

2) Run the next command so as to add this flag.

# cd /usr/native/directadmin/custombuild

# mkdir -p customized/ap2

# cp -fp configure/ap2/configure.php56 customized/ap2/configure.php56

 

3) Open the file /usr/native/directadmin/custombuild/ap2/configure.php56 and add your –with-module line to the tip of the road.

Please be sure the character exists on the finish of all strains besides the final one. The character tells the road to configure, line to loop to the subsequent line, making the configure settings simpler to learn.  With out the character to set off the wrap, the subsequent line turns into a separate command, which isn’t right. (see error under).

4) As soon as it’s accomplished, run the next command.

# cd /usr/native/directadmin/custombuild

# ./construct php n

 

5) Then restart apache.

# /sbin/service httpd restart

 

Zend OpCache Set up Steps.

Zend OpCache supplies sooner PHP execution through opcode caching and optimization. It improves the efficiency of PHP.

Listed below are the steps to put in Zend OpCache on DirectAdmin with custombuild 2.0.

1) Enter into the custombuild listing.

# cd /usr/native/directadmin/custombuild

2) Setting OpCache to sure.

# ./construct set opcache sure

3) Compile OpCache module.

# ./construct opcache

4) As soon as it’s accomplished, verify if OpCache is itemizing

# php -v

# php -m | grep -i zend

 

In the event you want any additional assist, please do attain our assist division.

 

Leave a Comment