Add custom modules to php with custombuild

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » CustomBuild » ./build php

Add custom modules to php with custombuildLast Modified: Apr 3, 2015, 6:17 pm
If you want to add any extra modules to php, they'll most likely need to be compiled in. Any module that needs to be compiled in will have a --with-module type flag which will need to be used.

1) To add this flag, run the following:

cd /usr/local/directadmin/custombuild
mkdir -p custom/ap2
cp -fp configure/ap2/configure.php5 custom/ap2/configure.php5

If you're using CustomBuild 2.0, the file might be configure.php55 (where 55 is the php 5.5 version, adjust as needed).
Also, "ap2" applies to mod_php. If you're using suPhp, it's "suphp". Also possible: fpm, fastcgi.
See 4) below, to confirm which configure file to copy to ./custom.

2) Add your --with-module line to the end of the custom/ap2/configure.php5 file, and make sure the \ character exists at the end of all lines except the last one. The \ character tells the line configure line to loop to the next line, making the configure settings easier to read.  Without the \ character to trigger the wrap, the next line becomes a separate command, which is not correct. (see error below). Once set, type:

./build php n

change configure.php5 to configure.php4 if you're using php4.
If you're using suphp, the paths would be configure/suphp/configure.php5 and custom/suphp/configure.php5.

3) Restart apache:


/sbin/service httpd restart


/usr/local/etc/rc.d/httpd restart

Please keep in mind that any changes to your stock DirectAdmin setup are beyond our techinal support, and you do so at your own risk.

4) To confirm that you're actually editing the correct configure file, type the following to see which configure files the custombuild script is using:

./build used_configs

A common error people run into looks like this:

/usr/local/directadmin/custombuild/custom/ap2/configure.php5: line 32: --with-module: command not found

which simply means that the \ character was not correctly added on the line before --with-module.
Related Helpfiles
Adding custom modules to php with customapache

2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST