Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Apache2 Segmentation fault, Help please.

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
Ironik
n00b
n00b
Posts: 1
Joined: Fri Jun 01, 2007 5:18 pm

Apache2 Segmentation fault, Help please.

  • Quote

Post by Ironik » Fri Jun 01, 2007 5:28 pm

Hello all,

I'm pretty new to linux and even more so to Gentoo. I'm running an apache server on a box and have been doing a number of configuration changes recently. I am getting an errow now, however, and i'm not sure exactly what the problem is. Can somone please point me in the right direction? Thank you.

ERROR:
/etc/init.d/apache2: line 23: 5477 Segmentation fault $APACHE2 ${APACHE2_OPTS} -t >/dev/null 2>&1
* Apache2 has detected a syntax error in your configuration files:
/etc/init.d/apache2: line 23: 5479 Segmentation fault ${APACHE2} ${APACHE2_OPTS} -t
Also, here's line 23's function
checkconfig() {

SERVERROOT="${SERVERROOT:-/usr/lib/apache2}"
if [ ! -d ${SERVERROOT} ]; then
eerror "SERVERROOT does not exist: ${SERVERROOT}"
return 1
fi

CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
[ ${CONFIGFILE:0:1} != "/" ] && CONFIGFILE="${SERVERROOT}/${CONFIGFILE}"
if [ ! -r "${CONFIGFILE}" ]; then
eerror "Unable to read configuration file: ${CONFIGFILE}"
return 1
fi

# check to see if the old config files exist and aren't used
if [[ "${CONFIGFILE}" != "/etc/apache2/conf/apache2.conf" &&
-e "/etc/apache2/conf/apache2.conf" ]]; then
eerror "Found old apache2.conf in /etc/apache2/conf. Configuration locations \n have moved, please check ${CONFIGFILE} to make sure it is correct, \n and remove /etc/apache2/conf/apache2.conf.\n\n Please see http://www.gentoo.org/doc/en/apache-upgrading.xml\n for more information."
return 1
fi
[ -n "${SERVERROOT}" ] && APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"
[ -n "${CONFIGFILE}" ] && APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
[ -n "${STARTUPERRORLOG}" ] && APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"

# set a sane default for KEEPENV and OLDENV
KEEPENV=${KEEPENV:-PATH}
OLDENV=

for env_var in ${KEEPENV}; do
OLDENV="${OLDENV} ${env_var}=`printenv ${env_var}`"
done

APACHE2="env -i ${OLDENV} /usr/sbin/apache2"

$APACHE2 ${APACHE2_OPTS} -t 1>/dev/null 2>&1
ret=$?
if [ $ret -ne 0 ]; then
eerror "Apache2 has detected a syntax error in your configuration files:"
${APACHE2} ${APACHE2_OPTS} -t
fi

return $ret
}
Top
alex.blackbit
Advocate
Advocate
Posts: 2397
Joined: Tue Jul 26, 2005 8:04 pm

  • Quote

Post by alex.blackbit » Fri Jun 01, 2007 10:56 pm

it looks like you have upgraded apache to a newer version and now the syntax in the configuration file wants some work.
or have you maybe just forgotten to run etc-update?
Top
Hu
Administrator
Administrator
Posts: 24395
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Jun 02, 2007 12:54 am

Based on that output, Apache is crashing at startup. The syntax error message is bogus, and is only appearing because Apache is exiting non-zero. What modules are you using in Apache? Are they all up to date? What is the output of emerge --info; emerge -pv apache?

Can you capture a core dump from the server? Read How to get meaningful backtraces in Gentoo before trying to capture the core dump.
Top
fctk
Veteran
Veteran
Posts: 1424
Joined: Wed Jan 28, 2004 8:08 pm
Location: Milan, Italy, EU

  • Quote

Post by fctk » Wed Jun 20, 2007 10:20 am

i had the same problem. i removed /etc/init.d/apache2 and re-emerged apache. now it works!
Top
Post Reply

4 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic