httpd won't start

adampaulsen

Verified User
Joined
Aug 5, 2017
Messages
12
Hello,

I'm getting the following error when I try to start httpd:

Code:
httpd[30745]: httpd: Syntax error on line 50 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf/extra/httpd-phpmodules.conf: Cannot load /usr/lib/apache/libphp5.so into server: /usr/local/lib/libxslt.so.1: symbol xmlBufContent, version LIBXML2_2.9.0 not defined in file libxml2.so.2 with link time reference

I've done some googling on the issue, but I've been unable to find a solution.

Thanks,
Adam
 
Hello Adam,

Code:
cd /usr/local/directadmin/custombuild
./build update
./build clean
./build apache
./build php
./build rewrite_confs

should fix it.
 
Alex,

I tried that, still no luck. Here's the full output from systemctl status:

Code:
root@redactedhostname:/usr/local/directadmin/custombuild# systemctl status -l httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/etc/systemd/system/httpd.service; enabled)
   Active: failed (Result: exit-code) since Fri 2019-05-03 12:39:06 PDT; 25s ago
  Process: 28463 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 28462 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 28462 (code=exited, status=1/FAILURE)

May 03 12:39:06 redactedhostname.redacteddomain.redacted httpd[28462]: httpd: Syntax error on line 50 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf/extra/httpd-phpmodules.conf: Cannot load /usr/lib/apache/libphp5.so into server: /usr/local/lib/libxslt.so.1: symbol xmlBufContent, version LIBXML2_2.9.0 not defined in file libxml2.so.2 with link time reference
May 03 12:39:06 redactedhostname.redacteddomain.redacted systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
May 03 12:39:06 redactedhostname.redacteddomain.redacted kill[28463]: kill: failed to parse argument: ''
May 03 12:39:06 redactedhostname.redacteddomain.redacted systemd[1]: httpd.service: control process exited, code=exited status=1
May 03 12:39:06 redactedhostname.redacteddomain.redacted systemd[1]: Failed to start The Apache HTTP Server.
May 03 12:39:06 redactedhostname.redacteddomain.redacted systemd[1]: Unit httpd.service entered failed state.
root@redactedhostname:/usr/local/directadmin/custombuild#
 
I would suspect either one or both commands failed:

Code:
./build apache

Code:
./build php

What are the final 10-20 lines of each?
 
here's the last 20 of ./build apache

Code:
make[1]: Leaving directory '/usr/local/directadmin/custombuild/httpd-2.4.46'
Restoring certificate and key, and turning on httpd for DirectAdmins's check.
Checking to ensure /etc/httpd/conf/ssl.crt/server.ca is set.
Enabling httpd in systemd...
Checking to ensure /etc/httpd/conf/ssl.crt/server.ca is set.
Using REDACTED_IP_ADDRESS for your server IP
**************************************

Apache 2.4.27 and higher will not negotiate http2 with mpm_prefork. Please do not use mod_php or disable http2 in the directadmin.conf
https://www.apache.org/dist/httpd/CHANGES_2.4.27

**************************************
/sbin/ldconfig.real: /usr/local/mysql/lib/libndbclient.so.2 is not a symbolic link

/sbin/ldconfig.real: /usr/local/mysql/lib/libmysqlclient_r.so.15 is not a symbolic link

/sbin/ldconfig.real: /usr/local/mysql/lib/libmysqlclient.so.15 is not a symbolic link

Restarting apache.
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
root@redactedhostname:/usr/local/directadmin/custombuild#


here's the last 20 of ./build php

Code:
PHP Warning:  PHP Startup: Unable to load dynamic library './IcePHP.so' - ./IcePHP.so: cannot open shared object file: No such file or directory in Unknown on line 0
Downloading updated /usr/lib/ssl/cert.pem
Downloading        cacert.pem...
converted 'https://files.directadmin.com/services/custombuild/all/ssl/cacert.pem' (ANSI_X3.4-1968) -> 'https://files.directadmin.com/services/custombuild/all/ssl/cacert.pem' (UTF-8)
--2021-01-06 09:01:32--  https://files.directadmin.com/services/custombuild/all/ssl/cacert.pem
Resolving files.directadmin.com (files.directadmin.com)... 69.162.69.58, 104.128.54.74, 185.42.221.168
Connecting to files.directadmin.com (files.directadmin.com)|69.162.69.58|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 221418 (216K)
Saving to: '/usr/local/directadmin/custombuild/cacert.pem'

/usr/local/directadmin/custombuild/cacert.pem                      100%[===============================================================================================================================================================>] 216.23K  1.10MB/s   in 0.2s   

2021-01-06 09:01:32 (1.10 MB/s) - '/usr/local/directadmin/custombuild/cacert.pem' saved [221418/221418]

Restarting apache.
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
Rewriting all users httpd.conf files, please wait...
Debug mode. Level 10

dataskq: command: action=rewrite&value=httpd
PHP 5.6.40 Installed.
root@redactedhostname:/usr/local/directadmin/custombuild# 
[CODE]
 
See 'systemctl status httpd.service' and 'journalctl -xn' for details.
Any clues here.

Are you responding for the same issue from last may 2019? just curious.

If so looks like you might have some custom config maybe in your apache config. Maybe you did not sue the template system?

What's the OS and version
Is all of that up to date?
 
Last edited:
Any clues here.

Are you responding for the same issue from last may 2019? just curious.

If so looks like you might have some custom config maybe in your apache config. Maybe you did not sue the template system?

What's the OS and version
Is all of that up to date?
I am, I've been poking at this on and off since then. I mainly use DA for it's handy DNS handling, but I'd like to get apache working again

The same info is output as in my reply from May 3rd.

I'll check the apache configs, but I've not done any hand customizations that I can recall.

Running Debian 8.11, and all packages are up to date. (update using DA tools, and not apt.)
 
Check httpd -t


This is not something that comes with DA, so it must be a custom-installed PHP module.
Code:
httpd: Syntax error on line 51 of /etc/httpd/conf/httpd.conf: Syntax error on line 4 of /etc/httpd/conf/extra/httpd-phpmodules.conf: Cannot load /usr/lib/apache/libphp5.so into server: /usr/local/lib/libxslt.so.1: symbol xmlBufContent, version LIBXML2_2.9.0 not defined in file libxml2.so.2 with link time reference
 
line 51 of httpd.conf --
Code:
Include /etc/httpd/conf/extra/httpd-phpmodules.conf

line 4 of httpd-phpmodules.comf
Code:
LoadModule php5_module /usr/lib/apache/libphp5.so
 
What is all of this?

Code:
cat /usr/local/directadmin/custombuild/options.conf

Code:
cat /etc/httpd/conf/extra/httpd-phpmodules.conf

Code:
ls -al /usr/lib/apache/libphp5.so
 
What is all of this?

Code:
cat /usr/local/directadmin/custombuild/options.conf

Code:
cat /etc/httpd/conf/extra/httpd-phpmodules.conf

Code:
ls -al /usr/lib/apache/libphp5.so

Code:
cat /usr/local/directadmin/custombuild/options.conf
#PHP Settings
php1_release=5.6
php1_mode=mod_php
php2_release=no
php2_mode=php-fpm
php_ini=no
php_timezone=America/Los_Angeles
php_ini_type=production
x_mail_header=yes

#MySQL Settings
mysql=5.6
mariadb=10.0
mysql_inst=no
mysql_backup=yes
mysql_backup_gzip=no
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
mysql_force_compile=no

#WEB Server Settings
webserver=apache
litespeed_serialno=trial
modsecurity=no
modsecurity_ruleset=comodo
apache_ver=2.4
apache_mpm=auto
mod_ruid2=yes
userdir_access=yes
harden_symlinks_patch=yes
use_hostname_for_alias=no
redirect_host=REDACTED_DOMAIN
redirect_host_https=no

#WEB Applications Settings
phpmyadmin=yes
phpmyadmin_ver=4
squirrelmail=yes
roundcube=yes
webapps_inbox_prefix=no

#ClamAV-related Settings
clamav=no
clamav_exim=yes
modsecurity_uploadscan=no
proftpd_uploadscan=no
pureftpd_uploadscan=no
suhosin_php_uploadscan=no

#Mail Settings
exim=no
eximconf=no
eximconf_release=4.4
blockcracking=no
easy_spam_fighter=no
spamd=spamassassin
sa_update=daily
dovecot=yes
dovecot_conf=yes
pigeonhole=no

#FTP Settings
ftpd=pureftpd

#Statistics Settings
awstats=no
webalizer=yes

#CustomBuild Settings
custombuild=2.0
autover=no
bold=yes
clean=yes
cleanapache=yes
clean_old_tarballs=yes
clean_old_webapps=yes
downloadserver=files.directadmin.com

#Cronjob Settings
cron=no
cron_frequency=weekly
[email protected]
notifications=yes
da_autoupdate=no
updates=no
webapps_updates=yes

#CloudLinux Settings
cloudlinux=no
cloudlinux_beta=no
cagefs=no

#Advanced Settings
autoconf=yes
automake=yes
libtool=yes
curl=yes
new_pcre=no

http_methods=GET:HEAD:POST
php3_release=no
php4_release=no
php3_mode=php-fpm
php4_mode=php-fpm
secure_php=no
mail_compress=no
unofficial_mirrors=no
unit=no
phpmyadmin_public=yes
ssl_configuration=intermediate
custombuild_plugin=yes

Code:
cat /etc/httpd/conf/extra/httpd-phpmodules.conf
LoadModule ruid2_module /usr/lib/apache/mod_ruid2.so
Mutex posixsem
LoadModule mpm_prefork_module /usr/lib/apache/mod_mpm_prefork.so
LoadModule php5_module /usr/lib/apache/libphp5.so

Code:
ls -al /usr/lib/apache/libphp5.so
-rwxr-xr-x 1 root root 38837552 Jan  6 09:00 /usr/lib/apache/libphp5.so
 
Code:
find /usr/local/directadmin/custombuild/custom -name configure.php56

Code:
find / -name IcePHP.so

Code:
php -m
 
Code:
find /usr/local/directadmin/custombuild/custom -name configure.php56

Code:
find / -name IcePHP.so

Code:
php -m
Code:
root@REDACTEDHOST:/# find /usr/local/directadmin/custombuild/custom -name configure.php56
find: `/usr/local/directadmin/custombuild/custom': No such file or directory
root@REDACTEDHOST:/# locate configure.php56
/usr/local/directadmin/custombuild/configure/ap2/configure.php56
/usr/local/directadmin/custombuild/configure/fastcgi/configure.php56
/usr/local/directadmin/custombuild/configure/fpm/configure.php56
/usr/local/directadmin/custombuild/configure/litespeed/configure.php56
/usr/local/directadmin/custombuild/configure/php/configure.php56
/usr/local/directadmin/custombuild/configure/suphp/configure.php56
/usr/local/directadmin/custombuild_1.x/custombuild/configure/ap2/configure.php56
/usr/local/directadmin/custombuild_1.x/custombuild/configure/fastcgi/configure.php56
/usr/local/directadmin/custombuild_1.x/custombuild/configure/fpm/configure.php56
/usr/local/directadmin/custombuild_1.x/custombuild/configure/litespeed/configure.php56
/usr/local/directadmin/custombuild_1.x/custombuild/configure/suphp/configure.php56
root@REDACTEDHOST:/# find / -name IcePHP.so
^C
root@REDACTEDHOST:/# locate IcePHP.so
/usr/local/php56/lib/php/extensions/IcePHP.so
/usr/local/php56/lib/php/extensions/no-debug-non-zts-20060613/IcePHP.so

root@REDACTEDHOST:/# php -m
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libexslt.so.0)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libexslt.so.0)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libexslt.so.0)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libexslt.so.0)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libxslt.so.1)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libxslt.so.1)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libxslt.so.1)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libxslt.so.1)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libxslt.so.1)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libxslt.so.1)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libxslt.so.1)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libxslt.so.1)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libxslt.so.1)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libxslt.so.1)
php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/local/lib/libxslt.so.1)
PHP Warning:  PHP Startup: Unable to load dynamic library './IcePHP.so' - ./IcePHP.so: cannot open shared object file: No such file or directory in Unknown on line 0
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]

root@REDACTEDHOST:/#
 
Code:
httpd: Syntax error on line 51 of /etc/httpd/conf/httpd.conf: Syntax error on line 4 of /etc/httpd/conf/extra/httpd-phpmodules.conf: Cannot load /usr/lib/apache/libphp5.so into server: /usr/local/lib/libxslt.so.1: symbol xmlBufContent, version LIBXML2_2.9.0 not defined in file libxml2.so.2 with link time reference
Hm.. Try:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build libxml2
./build libxslt
./build php
 
Code:
dpkg -l | grep php-zeroc-ice

Looks like you have zeroc ice installed

if you dont need this run
Code:
apt remove php-zeroc-ice
 
alrighty. I figured it out. I had some odd symlinks that got created in /usr/local/lib for libxml2.so.2. basically it was a symlink to a symlink to a non-functional or incorrect version of a library. Once I corrected the symlink httpd spun right up!

Code:
root@REDACTEDHOST:/usr/local/lib# ls -lah | grep xml
lrwxrwxrwx  1 root root    16 Jan  6  2012 libxml12.so.2.bak -> libxml2.so.2.7.8
-rw-r--r--  1 root root  8.7M Jan  5 12:27 libxml2.a
-rwxr-xr-x  1 root root   976 Jan  5 12:27 libxml2.la
lrwxrwxrwx  1 root root    17 Jan  5 12:27 libxml2.so -> libxml2.so.2.9.10
lrwxrwxrwx  1 root root    17 Jan  5 12:27 libxml2.so.2 -> libxml12.so.2.bak
-rwxr-xr-x  1 root root  4.1M Jul 27  2011 libxml2.so.2.7.6
-rwxr-xr-x  1 root root  4.1M Jan  6  2012 libxml2.so.2.7.8
-rwxr-xr-x  1 root root  4.6M Jan  5 12:27 libxml2.so.2.9.10
-rwxr-xr-x  1 root root  4.7M Aug  8  2017 libxml2.so.2.9.4
-rw-r--r--  1 root root   238 Jan  5 12:27 xml2Conf.sh
root@REDACTEDHOST:/usr/local/lib# ln -sfn libxml2.so.2.9.10 libxml2.so.2
root@REDACTEDHOST:/usr/local/lib# ls -lah | grep xml
lrwxrwxrwx  1 root root    16 Jan  6  2012 libxml12.so.2.bak -> libxml2.so.2.7.8
-rw-r--r--  1 root root  8.7M Jan  5 12:27 libxml2.a
-rwxr-xr-x  1 root root   976 Jan  5 12:27 libxml2.la
lrwxrwxrwx  1 root root    17 Jan  5 12:27 libxml2.so -> libxml2.so.2.9.10
lrwxrwxrwx  1 root root    17 Jan  6 11:43 libxml2.so.2 -> libxml2.so.2.9.10
-rwxr-xr-x  1 root root  4.1M Jul 27  2011 libxml2.so.2.7.6
-rwxr-xr-x  1 root root  4.1M Jan  6  2012 libxml2.so.2.7.8
-rwxr-xr-x  1 root root  4.7M Aug  8  2017 libxml2.so.2.9.4
-rw-r--r--  1 root root   238 Jan  5 12:27 xml2Conf.sh
root@REDACTEDHOST:/usr/local/lib# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/etc/systemd/system/httpd.service; enabled)
   Active: active (running) since Wed 2021-01-06 11:44:02 PST; 9min ago
  Process: REDACTEDPID ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
 Main PID: REDACTEDPID (httpd)
   Status: "Total requests: 18; Idle/Busy workers 100/0;Requests/sec: 0.0328; Bytes served/sec: 195 B/sec"
   CGroup: /system.slice/httpd.service
           ├─REDACTEDPID /usr/sbin/httpd -DFOREGROUND
           ├─REDACTEDPID /usr/sbin/httpd -DFOREGROUND
           ├─REDACTEDPID /usr/sbin/httpd -DFOREGROUND
           ├─REDACTEDPID /usr/sbin/httpd -DFOREGROUND
           ├─REDACTEDPID /usr/sbin/httpd -DFOREGROUND
           ├─REDACTEDPID /usr/sbin/httpd -DFOREGROUND
           ├─REDACTEDPID /usr/sbin/httpd -DFOREGROUND
           ├─REDACTEDPID /usr/sbin/httpd -DFOREGROUND
           ├─REDACTEDPID /usr/sbin/httpd -DFOREGROUND
           └─REDACTEDPID /usr/sbin/httpd -DFOREGROUND

Jan 06 11:44:02 REDACTEDHOST.REDACTEDDOMAIN.com httpd[REDACTEDPID]: AH00112: Warning: DocumentRoot [/home/REDACTEDUSER1/domains/REDACTEDDOMAIN.net/public_html] does not exist
Jan 06 11:44:02 REDACTEDHOST.REDACTEDDOMAIN.com httpd[REDACTEDPID]: AH00112: Warning: DocumentRoot [/home/REDACTEDUSER1/domains/REDACTEDDOMAIN.net/private_html] does not exist
Jan 06 11:44:02 REDACTEDHOST.REDACTEDDOMAIN.com httpd[REDACTEDPID]: AH00112: Warning: DocumentRoot [/home/REDACTEDUSER1/domains/REDACTEDDOMAIN2.com/public_html] does not exist
Jan 06 11:44:02 REDACTEDHOST.REDACTEDDOMAIN.com httpd[REDACTEDPID]: AH00112: Warning: DocumentRoot [/home/REDACTEDUSER1/domains/REDACTEDDOMAIN2.com/private_html] does not exist
Jan 06 11:44:02 REDACTEDHOST.REDACTEDDOMAIN.com httpd[REDACTEDPID]: AH00112: Warning: DocumentRoot [/home/REDACTEDUSER2/domains/REDACTEDDOMAIN3.com/public_html/tpctest] does not exist
Jan 06 11:44:02 REDACTEDHOST.REDACTEDDOMAIN.com systemd[1]: Started The Apache HTTP Server.
Jan 06 11:47:23 REDACTEDHOST.REDACTEDDOMAIN.com systemd[1]: Started The Apache HTTP Server.
 
Thank you everyone for all your help. It is very much appreciated to have this years old problem solved!
 
You doing something wrong, why you have many libs? is clearly you doing manually and not with custombuild.

You every time you going to update symlink time to time.
 
You doing something wrong, why you have many libs? is clearly you doing manually and not with custombuild.

You every time you going to update symlink time to time.
I appreciate your concern.
I think when I first started TSing this problem, I had gone down the 'wrong lib' rabbit-hole, and and tried installing libxml manually. However, at this point, custombuild is handling it.
 
Back
Top