Installing custom php modules (xdebug etc.)

hendr1x

Verified User
Joined
Jun 9, 2016
Messages
15
Hello everyone,
I have directadmin installed but I need to reinstall php5.5 to php5.6 with custom modules. So far I have done the following :

```
cd /usr/local/directadmin/custombuild
./build set php1_release 5.6
mkdir -p custom/ap2
cp -p configure/ap2/configure.php56 custom/ap2
vi custom/ap2/configure.php56
```

But I seem to have a fundamental lack of knowledge of what i am doing :)

The modules I need are as follows

```
xdebug
imagick
ffmpeg
magickwand
id3
```

Do I need to download/compile these before adding them to the configure.php56 file? Can i use PECL with custombuild?

Thanks for any light you can provide.
 
Hello,

Whenever PHP extension can be installed through PECL, you should use it independently whether or not you have custombuild.

As for xdebug instructions are as the following:

[h=2]PECL Installation[/h]As of Xdebug 0.9.0 you can install Xdebug through PEAR/PECL. This only works with with PEAR version 0.9.1-dev or higher and some UNIX.
Installing with PEAR/PECL is as easy as:
# pecl install xdebug
but you still need to add the correct line to your php.ini: (don't forget to change the path and filename to the correct one — but make sure you use the full path)
zend_extension="/usr/local/php/modules/xdebug.so"
Note: You should ignore any prompts to add "extension=xdebug.so" to php.ini — this will cause problems.

https://xdebug.org/docs/install


The general ideas:

You might need to specify a full patch to pecl (you might need to use it twice per PHP version), or add it's location to PATH.
Final location of *.so file might differ, so check output of installation process.
It's better to add custom modules into a separate ini file, e.g. /usr/local/php56/lib/php.conf.d/99-custom.ini for PHP 5.6 and /usr/local/php55/lib/php.conf.d/99-custom.ini for PHP 5.5.
 
Back
Top