Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache (PHP) fails to start
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3333
Location: de

PostPosted: Wed Apr 11, 2012 8:15 am    Post subject: Apache (PHP) fails to start Reply with quote

Hi there,

after the last system update my apache refuses to start. There are no vhosts, nothing professional. It's a simple home net configuration, which means, it's the default configuration.

Code:
 /etc/init.d/apache2 start
 * Caching service dependencies ...                                       [ ok ]
 * apache2 has detected an error in your setup:
[Wed Apr 11 10:07:35.367567 2012] [core:warn] [pid 14877:tid 140516044105536] AH00111: Config variable ${SVN_REPOS_LOC} is not defined
[Wed Apr 11 10:07:35.367808 2012] [core:warn] [pid 14877:tid 140516044105536] AH00111: Config variable ${SVN_REPOS_LOC} is not defined
apache2: Syntax error on line 140 of /etc/apache2/httpd.conf: Syntax error on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load /usr/lib64/apache2/modules/libphp5.so into server: /usr/lib64/apache2/modules/libphp5.so: undefined symbol: unixd_config
 * ERROR: apache2 failed to start


Line 140 of httpd.conf
Code:
Include /etc/apache2/modules.d/*.conf


Line 4 of 70_mod_php5.conf
Code:
LoadModule php5_module    modules/libphp5.so


Installed is:
- php-5.4.1_rc1
- apache-2.4.1-r2

Any ideas? revdep-rebuild assured me, that my system would be in a consistent state.
Back to top
View user's profile Send private message
theotherjoe
Guru
Guru


Joined: 22 Nov 2003
Posts: 393

PostPosted: Wed Apr 11, 2012 8:45 am    Post subject: Reply with quote

Code:
eselect php list apache2

should print the list of currently installed versions
of php apache2 modules. In your case only php5.4
should be in the output.
In case you dont have any output make sure the
apache2 use flag is used for php compilation/installation.
you could also have a look in /usr/lib/apache2/modules
for libphp5.so which should be a symlink to the apache module
for the currently selected php version.
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Wed Apr 11, 2012 10:26 am    Post subject: Reply with quote

you may follow the migration, changes listed in this bugreport: https://bugs.gentoo.org/show_bug.cgi?id=410607

i.e.: undefined symbol: unixd_config

-> needs in httpd.conf: LoadModule unixd_module modules/mod_unixd.so
_________________
hear hear
Back to top
View user's profile Send private message
binro
l33t
l33t


Joined: 06 May 2005
Posts: 724
Location: Bangkok, Thailand

PostPosted: Sat Dec 01, 2012 3:34 pm    Post subject: Reply with quote

I have just hit this problem despite reading this thread first and following the advice! I still get:
Code:

 * apache2 has detected an error in your setup:
[Sat Dec 01 22:25:45.997063 2012] [core:warn] [pid 18018] AH00111: Config variable ${SVN_REPOS_LOC} is not defined
[Sat Dec 01 22:25:45.997185 2012] [core:warn] [pid 18018] AH00111: Config variable ${SVN_REPOS_LOC} is not defined
apache2: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load modules/libphp5.so into server: /usr/lib64/apache2/modules/libphp5.so: undefined symbol: unixd_config
 * ERROR: apache2 failed to start

I included unixd in the APACHE_MODULES variable and the correct LoadModule statement is in httpd.conf and the modules exist in /usr/lib/apache2/modules. So any idea what else is missing?

TIA
_________________
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Back to top
View user's profile Send private message
Art Vandalay
Guru
Guru


Joined: 16 Sep 2003
Posts: 335
Location: Melbourne - VIC

PostPosted: Tue Dec 18, 2012 10:52 pm    Post subject: Reply with quote

binro wrote:
I have just hit this problem despite reading this thread first and following the advice! I still get:
Code:

 * apache2 has detected an error in your setup:
[Sat Dec 01 22:25:45.997063 2012] [core:warn] [pid 18018] AH00111: Config variable ${SVN_REPOS_LOC} is not defined
[Sat Dec 01 22:25:45.997185 2012] [core:warn] [pid 18018] AH00111: Config variable ${SVN_REPOS_LOC} is not defined
apache2: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load modules/libphp5.so into server: /usr/lib64/apache2/modules/libphp5.so: undefined symbol: unixd_config
 * ERROR: apache2 failed to start

I included unixd in the APACHE_MODULES variable and the correct LoadModule statement is in httpd.conf and the modules exist in /usr/lib/apache2/modules. So any idea what else is missing?

TIA


Hi,

Having the same issue....where you able to solve this? and what version of apache and php are you using?
_________________
I might not have morals...but at least I have standards
Back to top
View user's profile Send private message
binro
l33t
l33t


Joined: 06 May 2005
Posts: 724
Location: Bangkok, Thailand

PostPosted: Wed Dec 19, 2012 7:48 am    Post subject: Reply with quote

No solution as yet, I am still using apache-2.2.23. The failing version is 2.4.3; php is 5.3.15.
_________________
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Back to top
View user's profile Send private message
websterr
n00b
n00b


Joined: 20 Dec 2012
Posts: 1

PostPosted: Thu Dec 20, 2012 8:53 pm    Post subject: my solution Reply with quote

I found that the /usr/lib/apache2/modules/libphp5.so was soft linked to the a non existent file.
ls -l /usr/lib/apache2/modules/libphp5.so
lrwxrwxrwx 1 root root 34 Mar 15 2011 /usr/lib/apache2/modules/libphp5.so -> /usr/lib/php5.3/apache2/libphp5.so
It seems that upon upgrading to php5.4 this link was not changed once I linked to the right file I was able to start apache2.

ls -l /usr/lib/apache2/modules/libphp5.so
lrwxrwxrwx 1 root root 50 Dec 20 15:28 /usr/lib/apache2/modules/libphp5.so -> /usr/lib/php5.4/usr/lib/apache2/modules/libphp5.so
Back to top
View user's profile Send private message
binro
l33t
l33t


Joined: 06 May 2005
Posts: 724
Location: Bangkok, Thailand

PostPosted: Fri Dec 21, 2012 2:59 am    Post subject: Reply with quote

I seem to have both php-5.3 and php-5.4 installed. I will try changing the link and see what happens. Thanks for the tip!
_________________
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Back to top
View user's profile Send private message
binro
l33t
l33t


Joined: 06 May 2005
Posts: 724
Location: Bangkok, Thailand

PostPosted: Sat Dec 22, 2012 4:07 pm    Post subject: Reply with quote

You can use "eselect php list" to choose which php to use, I found out. However, neither works for me, I still get the error. Apache-2.3 is hard-masked now on my system.
_________________
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Back to top
View user's profile Send private message
jasonaward
n00b
n00b


Joined: 09 May 2003
Posts: 5

PostPosted: Sun Dec 30, 2012 9:48 am    Post subject: Reply with quote

I had this problem with Apache 2.4.3 and PHP 5.4.9. The solution was to re-build PHP.

Did you actually re-build PHP or just rely on revrep-rebuild to check consistency?
Back to top
View user's profile Send private message
binro
l33t
l33t


Joined: 06 May 2005
Posts: 724
Location: Bangkok, Thailand

PostPosted: Sun Dec 30, 2012 11:37 am    Post subject: Reply with quote

jasonaward wrote:
I had this problem with Apache 2.4.3 and PHP 5.4.9. The solution was to re-build PHP.
Did you actually re-build PHP or just rely on revrep-rebuild to check consistency?

Thanks, that was the solution! Of course I thought about rebuilding php (usually fixes a lot of things on Gentoo) but assumed that because php was dynamically selectable, the two packages were independent. Obviously not! Thanks again. :)
_________________
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Back to top
View user's profile Send private message
heheman3000
n00b
n00b


Joined: 22 Oct 2006
Posts: 33

PostPosted: Wed Sep 18, 2013 5:49 pm    Post subject: Reply with quote

I had this problem with apache 2.4.6-r2 and php-5.5.2. Doing

Code:

emerge -1av php


fixed the problem. revdep-rebuild didn't find anything.
Back to top
View user's profile Send private message
sunhaowei
n00b
n00b


Joined: 10 Apr 2015
Posts: 1

PostPosted: Fri Apr 10, 2015 7:13 am    Post subject: I also encounter this problem Reply with quote

I also encounter this problem
Cannot load modules/libphp5.so into server: /opt/rh/httpd24/root/etc/httpd/modules/libphp5.so: undefined symbol: unixd_config
httpd24 and php5.5.23
Back to top
View user's profile Send private message
freke
l33t
l33t


Joined: 23 Jan 2003
Posts: 962
Location: Somewhere in Denmark

PostPosted: Fri Apr 10, 2015 9:23 am    Post subject: Re: I also encounter this problem Reply with quote

sunhaowei wrote:
I also encounter this problem
Cannot load modules/libphp5.so into server: /opt/rh/httpd24/root/etc/httpd/modules/libphp5.so: undefined symbol: unixd_config
httpd24 and php5.5.23


You've tried re-emerging PHP? ie.
Code:
emerge -1av php
Back to top
View user's profile Send private message
Krog
Guru
Guru


Joined: 26 Jun 2007
Posts: 339
Location: Roma, Italy

PostPosted: Tue Apr 12, 2016 1:03 pm    Post subject: Reply with quote

same problem here, I reinstalled apache and php

Code:
 eselect php list apache2
  [1]   php5.5
  [2]   php5.6 *


Code:
/etc/init.d/apache2 restart
 * Caching service dependencies ...                                                                                               [ ok ]
 * apache2 has detected an error in your setup:
apache2: Syntax error on line 180 of /etc/apache2/httpd.conf: Syntax error on line 7 of /etc/apache2/modules.d/70_mod_php.conf: Syntax error on line 2 of /var/lib/eselect-php/mod_php.conf: Cannot load modules/mod_php.so into server: /usr/lib64/apache2/modules/mod_php.so: undefined symbol: unixd_config
 * ERROR: apache2 failed to start
Back to top
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 619
Location: France

PostPosted: Thu Apr 14, 2016 7:04 am    Post subject: Reply with quote

Which USE flags did you use for apache and php ?
Back to top
View user's profile Send private message
Krog
Guru
Guru


Joined: 26 Jun 2007
Posts: 339
Location: Roma, Italy

PostPosted: Thu Apr 14, 2016 7:08 am    Post subject: Reply with quote

Syl20 wrote:
Which USE flags did you use for apache and php ?


Code:
[ebuild   R    ] www-servers/apache-2.4.18:2::gentoo  USE="ldap ssl threads -debug -doc (-libressl) (-selinux) -static -suexec" APACHE2_MODULES="actions alias asis auth_basic auth_digest authn_alias authn_anon authn_core authn_dbd authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta charset_lite dav dav_fs dav_lock dbd deflate dir dumpio env expires ext_filter file_cache filter headers ident imagemap include info log_config log_forensic logio mime mime_magic negotiation proxy proxy_ajp proxy_connect proxy_ftp proxy_http rewrite setenvif socache_shmcb speling status substitute unique_id unixd userdir usertrack version vhost_alias -access_compat -authz_dbd -cache_disk -cgi -cgid -http2 -lbmethod_bybusyness -lbmethod_byrequests -lbmethod_bytraffic -lbmethod_heartbeat -macro -proxy_balancer -proxy_fcgi -proxy_html -proxy_scgi -proxy_wstunnel -ratelimit -remoteip -reqtimeout -slotmem_shm" APACHE2_MPMS="-event -peruser -prefork -worker" 5084 KiB


Code:
[ebuild   R    ] dev-lang/php-5.5.34:5.5::gentoo  USE="apache2 berkdb bzip2 cgi cjk cli crypt ctype curl exif fileinfo filter fpm ftp gd gdbm hash iconv inifile json ldap mysql mysqli nls opcache pdo phar posix readline session simplexml sockets spell sqlite ssl threads tokenizer truetype unicode xml xmlwriter zip zlib -bcmath -calendar -cdb -debug -embed -enchant (-firebird) -flatfile (-frontbase) -gmp -imap -intl -iodbc -ipv6 -kerberos -ldap-sasl -libedit -libmysqlclient -mhash -mssql -oci8-instant-client -odbc -pcntl -postgres -qdbm -recode (-selinux) -sharedmem -snmp -soap -sybase-ct -systemd -sysvipc -tidy -vpx -wddx -xmlreader -xmlrpc -xpm -xslt" 13366 KiB


thanks for the help
Back to top
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 619
Location: France

PostPosted: Thu Apr 14, 2016 8:59 am    Post subject: Reply with quote

Certainly a dumb question, but... As you show the USE flags for php _5.5_, are you sure you recompiled php _5.6_ after upgrading apache ?
Back to top
View user's profile Send private message
Krog
Guru
Guru


Joined: 26 Jun 2007
Posts: 339
Location: Roma, Italy

PostPosted: Thu Apr 14, 2016 9:01 am    Post subject: Reply with quote

Syl20 wrote:
Certainly a dumb question, but... As you show the USE flags for php _5.5_, are you sure you recompiled php _5.6_ after upgrading apache ?


DOH! ssh to house pc NOW... i will let you know :-P

edit:
this is indeed strange:

Code:
emerge --unmerge --pretend php

 * This action can remove important packages! In order to be safer, use
 * `emerge -pv --depclean <atom>` to check for reverse dependencies before
 * removing packages.

>>> These are the packages that would be unmerged:

 dev-lang/php
    selected: 5.5.34 5.6.17
   protected: none
     omitted: none


but if I do:

Code:
 emerge =dev-lang/php-5.6.17 --oneshot

These are the packages that would be merged, in order:

Calculating dependencies       ... done!

emerge: there are no ebuilds to satisfy "=dev-lang/php-5.6.17".


emerging dev-lang/php-5.6.19
Back to top
View user's profile Send private message
Krog
Guru
Guru


Joined: 26 Jun 2007
Posts: 339
Location: Roma, Italy

PostPosted: Thu Apr 14, 2016 9:41 am    Post subject: Reply with quote

SOLVED! thanks!!
I also had to add "ServerName localhost" to my httpd.conf to suppress a warning
strange that emerge @preserved-rebuild or revdep-rebuild did not complain about this, or portage did not offered an upgrade or downgrade of php 5.6...
probably would be a good idea to let portage automatically rebuild php after an update of apache
Back to top
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 619
Location: France

PostPosted: Fri Apr 15, 2016 1:47 pm    Post subject: Reply with quote

dev-lang/php-5.6.17 has been removed from portage, so the message from emerge is normal.
Have a look on your world file and on your package.mask file(s), maybe there are some limitations on the 5.6 versions.

If you don't use it, you should unmerge php 5.5.

Concerning the auto-update of php after apache, why not, but, in your case, the problem was the update from apache 2.2.x to apache 2.4.x. Minor versions updates don't need so much care.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum