0

When I trying to restart apache service getting below error:

root@localhost:/# /etc/init.d/apache2 restart
[FAIL] Restarting web server: apache2 failed!
[warn] The apache2 configtest failed. ... (warning).
Output of config test was:
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load   /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: undefined symbol: unixd_config
Action 'configtest' failed.
The Apache error log may have more information.

root@localhost:/# ls -l /etc/apache2/mods-enabled/php5.load
lrwxrwxrwx 1 root root 27 Nov 17 10:31 /etc/apache2/mods-enabled/php5.load -> ../mods-available/php5.load

root@localhost:~# apache2ctl -M
php5_module (shared) --MISSNG

root@localhost:/# apache2 -v
Server version: Apache/2.4.10 
Server built:   Sep 15 2016 20:44:43
root@localhost:/# php5 -v
PHP 5.6.29-1~dotdeb+7.1 (cli) (built: Dec  9 2016 16:30:46)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Following action taken:

root@localhost:/# apt-get install libapache2-mod-php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-php5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 290 not upgraded.

I've followed Apache2 start error when using php5 module ( Ubuntu Server) link but not work my case.

Any one know that, How can troubleshoot and resolve this error?

Nullpointer
  • 1,151
  • 3
  • 15
  • 32
  • 2
    Possible duplicate of [Apache2 start error when using php5 module ( Ubuntu Server)](http://askubuntu.com/questions/536128/apache2-start-error-when-using-php5-module-ubuntu-server) – Parto Dec 15 '16 at 08:54
  • @Parto i've tried this link but not work for me ! – Nullpointer Dec 15 '16 at 08:59
  • Which command did you try and what response did you get? Kindly edit your question and include this information. – Parto Dec 15 '16 at 09:13
  • @Parto Pls check edited question – Nullpointer Dec 15 '16 at 09:22
  • Try using `sudo apt install libapache2-mod-php` instead – Parto Dec 15 '16 at 09:42
  • @Parto `Package libapache2-mod-php is not available, but is referred to by another package` unable to install – Nullpointer Dec 15 '16 at 09:47
  • @Parto: Read the error message! "libphp5.so: undefined symbol: unixd_config" obviously means that libphp5.so exists, else it couldn't have a dependency on that symbol. Your possible "duplicate" explicitly states that libphp5.so is missing. – MSalters Jan 30 '17 at 13:42

1 Answers1

1

libapache2-mod-php is most certainly available here for all currently supported Ubuntu versions. There could be an issue with your network connection or the mirror you are using to install packages from or perhaps you need to upgrade to a supported version.

Elder Geek
  • 35,476
  • 25
  • 95
  • 181