Tag Archives: directadmin

enable webp support in php GD library

If you are using directadmin and want enable webp support (Centos OS)
yum install libwebp-devel
vi /usr/local/directadmin/custombuild/custom/fpm/configure.php71
--with-webp-dir=/usr/lib64
./build php
If you have php 5.6 so use --with-vpx-dir

php -r 'var_dump(gd_info());'
array(12) {
  ["GD Version"]=>
  string(26) "bundled (2.1.0 compatible)"
  ["FreeType Support"]=>
  bool(true)
  ["FreeType Linkage"]=>
  string(13) "with freetype"
  ["GIF Read Support"]=>
  bool(true)
  ["GIF Create Support"]=>
  bool(true)
  ["JPEG Support"]=>
  bool(true)
  ["PNG Support"]=>
  bool(true)
  ["WBMP Support"]=>
  bool(true)
  ["XPM Support"]=>
  bool(false)
  ["XBM Support"]=>
  bool(true)
  ["WebP Support"]=>
  bool(true)
  ["JIS-mapped Japanese Font Support"]=>
  bool(false)
}

sni for exim directadmin

It should fix Outlook errors like Cannot verify Security Certificate or Internet security warning
Common name: localhost issue


cd /usr/local/directadmin
echo mail_sni=1 >> conf/directadmin.conf
service directadmin restart
cd custombuild
./build update
./build set eximconf yes
./build set eximconf_release 4.5
./build set dovecot_conf yes
./build exim_conf
./build dovecot_conf

directadmin custom extension exif with php-fpm

cd /usr/local/directadmin/custombuild
mkdir /usr/local/directadmin/custombuild/custom/fpm
cp -v /usr/local/directadmin/custombuild/configure/fpm/configure.php72 /usr/local/directadmin/custombuild/custom/fpm/
cp -v /usr/local/directadmin/custombuild/configure/fpm/configure.php56 /usr/local/directadmin/custombuild/custom/fpm/

vi /usr/local/directadmin/custombuild/custom/fpm/configure.php56
#!/bin/sh
./configure \
--prefix=/usr/local/php56 \
--program-suffix=56 \
--enable-fpm \
--with-config-file-scan-dir=/usr/local/php56/lib/php.conf.d \
--with-curl=/usr/local/lib \
--with-gd \
--enable-gd-native-ttf \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-libxml-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=mysqlnd \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-mysqli=mysqlnd \
--with-pcre-regex=/usr/local \
--with-pdo-mysql=mysqlnd \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xsl \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--enable-zip \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-sockets \
--enable-soap \
--enable-mbstring \
--with-icu-dir=/usr/local/icu \
--enable-intl \
--enable-exif

./build php n

php -i | grep exif
exif
exif.decode_jis_intel => JIS => JIS
exif.decode_jis_motorola => JIS => JIS
exif.decode_unicode_intel => UCS-2LE => UCS-2LE
exif.decode_unicode_motorola => UCS-2BE => UCS-2BE
exif.encode_jis => no value => no value
exif.encode_unicode => ISO-8859-15 => ISO-8859-15

[core:emerg] [pid :tid ] (28)No space left on device: AH00023: Couldn’t create the proxy mutex

[core:emerg] [pid 7732:tid 140396300543936] (28)No space left on device: AH00023: Couldn’t create the proxy mutex
[proxy:crit] [pid 7732:tid 140396300543936] (28)No space left on device: AH02478: failed to create proxy mutex

Fix:

ipcs | grep apache | awk ‘{print $2}’ > sem.txt
for i in `cat sem.txt`; do { ipcrm -s $i; }; done

Permanant fix:

vi /etc/sysctl.conf

kernel.msgmni = 1024
kernel.sem = 250 256000 32 1024

No space left on device: AH00023: Couldn’t create the ssl-cache mutex AH00016: Configuration Failed

Error: [core:emerg] [pid 10804:tid 140601303058368] (28)No space left on device: AH00023: Couldn’t create the ssl-cache mutex

ipcs | grep apache | awk '{print $2}' > sem.txt
for i in `cat sem.txt`; do { ipcrm -s $i; }; done;

You can try to avoid such issues:
vi /etc/sysctl.conf
kernel.sem = 250 256000 32 1024
sysctl -p

vi /root/bin/sem.sh
#!/bin/bash
for i in $(ipcs -s | grep apache | awk '{print $2}'); do ipcrm sem $i; done && service httpd restart

crontab -e
MAILTO=""
@daily /root/bin/sem.sh

directadmin SpamAssassin

yum -y install perl-ExtUtils-MakeMaker perl-Digest-SHA perl-Net-DNS perl-NetAddr-IP perl-Archive-Tar perl-IO-Zlib perl-Digest-SHA perl-Mail-SPF perl-IP-Country perl-Razor2 perl-Net-Ident perl-IO-Socket-INET6 perl-IO-Socket-SSL perl-Mail-DKIM perl-DBI perl-Encode-Detect perl-HTML-Parser perl-HTML-Tagset perl-Time-HiRes perl-libwww-perl perl-Sys-Syslog

cd /usr/local/directadmin/custombuild
./build set spamassassin yes
./build spamassassin

grep “exim.spamassassin.conf” /etc/exim.conf # shuld return: .include_if_exists /etc/exim.spamassassin.conf
(wget -O /etc/exim.spamassassin.conf http://files.directadmin.com/services/exim.spamassassin.conf)
/etc/init.d/exim restart

ps ax |grep spamd

directadmin install soap

mkdir /usr/local/DirectAdmin/custombuild/custom
mkdir /usr/local/DirectAdmin/custombuild/custom/ap2
cp /usr/local/DirectAdmin/custombuild/configure/ap2/configure.php5 /usr/local/DirectAdmin/custombuild/custom/ap2/configure.php5
echo “–enable-soap” >> /usr/local/DirectAdmin/custombuild/custom/ap2/configure.php5

cd /usr/local/DirectAdmin/custombuild/
./build php n