LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-19-2006, 10:59 AM   #1
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Rep: Reputation: 0
Exclamation Apache2.2 won't start


I had a working web server with PHP, which a friend of mine help set up. Hes been afraid of compiling from source in Linux. We had apache 2.0, php5, mySQL5 and everything seemed to be okay. One of our web guys told us we were missing GD. After some work, I saw that it won't configure in the PHP rpm that was installed.

With much digging, I was able to get PHP to compile, found all the dependencies and fixed them all right up. PHP and it added its module to apache. Then apache stopped giving me pages. White pages were all I got at home (I did all of this over putty). I restarted the server, and then httpd wouldn't start. The weird thing is, it does not provide an error message in terminal. When I start it from the service manager it only reports 'httpd could not start'

I tried bringing it up to 2.2. Downloaded and compiled source, no issues there, But it still won't start.

Running FC4

Any help would be much appreciated, and Im going to see if I can answer other questions in the forums now that I feel confident enough to.
 
Old 01-19-2006, 11:03 AM   #2
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
Check the web server logs. Typically found in (or some sub-dir of) /var/log
 
Old 01-19-2006, 11:16 AM   #3
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
okay, /var/log/httpd has several logs. I opend the 'error_log' and found today's date. here are the most rcent entries.

[Thu Jan 19 09:42:32 2006] [notice] child pid 7623 exit signal Segmentation fault (11)
[Thu Jan 19 09:42:34 2006] [notice] child pid 7625 exit signal Segmentation fault (11)
[Thu Jan 19 09:42:44 2006] [notice] child pid 5535 exit signal Segmentation fault (11)
[Thu Jan 19 09:42:51 2006] [notice] child pid 7619 exit signal Segmentation fault (11)
[Thu Jan 19 09:42:54 2006] [notice] child pid 6222 exit signal Segmentation fault (11)
[Thu Jan 19 09:43:03 2006] [notice] child pid 7626 exit signal Segmentation fault (11)
[Thu Jan 19 09:43:38 2006] [notice] child pid 7620 exit signal Segmentation fault (11)
[Thu Jan 19 09:43:42 2006] [notice] child pid 7621 exit signal Segmentation fault (11)
[Thu Jan 19 09:44:04 2006] [notice] child pid 7622 exit signal Segmentation fault (11)
[Thu Jan 19 09:44:04 2006] [notice] child pid 7624 exit signal Segmentation fault (11)
[Thu Jan 19 09:45:18 2006] [notice] child pid 6221 exit signal Segmentation fault (11)
[Thu Jan 19 09:47:41 2006] [notice] child pid 6220 exit signal Segmentation fault (11)
[Thu Jan 19 09:47:42 2006] [notice] child pid 22238 exit signal Segmentation fault (11)
[Thu Jan 19 09:47:44 2006] [notice] child pid 22241 exit signal Segmentation fault (11)
[Thu Jan 19 09:49:31 2006] [notice] child pid 22242 exit signal Segmentation fault (11)
[Thu Jan 19 09:49:34 2006] [notice] child pid 22243 exit signal Segmentation fault (11)
[Thu Jan 19 09:49:37 2006] [notice] child pid 22272 exit signal Segmentation fault (11)
[Thu Jan 19 09:50:49 2006] [notice] child pid 22275 exit signal Segmentation fault (11)
[Thu Jan 19 09:50:50 2006] [notice] child pid 22276 exit signal Segmentation fault (11)
[Thu Jan 19 10:01:56 2006] [notice] child pid 22291 exit signal Segmentation fault (11)
[Thu Jan 19 10:01:57 2006] [notice] child pid 22292 exit signal Segmentation fault (11)
[Thu Jan 19 10:01:59 2006] [notice] child pid 22293 exit signal Segmentation fault (11)
[Thu Jan 19 10:03:31 2006] [notice] caught SIGTERM, shutting down

other logs in there are 'access_log', 'ssl_access_log', 'ssl_error_log' 'ssl_request_log'

The access logs show my requests tot eh server, and the pages that i pulled up, bot nothing wrong with it.

The SSL error log shows one entry from the 15th (note related)

The server stopped responding about 10:00 when i finshed compiling PHP

Last edited by dana340; 01-19-2006 at 11:17 AM.
 
Old 01-19-2006, 11:22 AM   #4
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
your webserver is crashing. very likely due to improper compilation or a broken compiler. What version of gcc/binutils are you on? Are you using overly-aggressive optimisations in your CFLAGS?
 
Old 01-19-2006, 11:43 AM   #5
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
I installed gcc4.0.2.8 just the other day. (libgcc and cpp is there too).

I tried compiling again. I did not make any settings for CFLAGS, but that did spark my memory.

//httpd.apache.org/docs/2.2/install.html#configure

I tried using these parameters, and it did not recognize the command. so i tired to start at ./configure (and I added on --enable-so). it returned right back to the prompt. I did

make clean and
make distclean
And tired ./configure (etc) again, and it still returns me right back to the prompt.

The other thing I have tried to do is find an RPM, but I can't install an RPM over a newer version, and YUM is having difficulty finding httpd too (I’m assuming I have the line right).

Would you recommend removing apache and installing say a 2.0.5 rpm? And if so, how would I go about removing apache 2.2?
 
Old 01-19-2006, 11:49 AM   #6
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
A source build by default installs to /usr/local/apache2, you should be pretty safe simply deleting this directory.

Uh...did you run make after configuring?
 
Old 01-19-2006, 11:57 AM   #7
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
prior to my original posts, yes, but when I noticed that configuring wasn't doing anyhting, I thought something was wrong, so I dind't run make and make install.
 
Old 01-19-2006, 12:32 PM   #8
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
sounds like your source is borked somehow. redownload the tarball.
 
Old 01-19-2006, 01:23 PM   #9
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
I’ve deleted the apache2 directory, and removed apache dependencies (mod_perl and the httpd_manual) and I still can't get the RPM I have to install. I downloaded a fresh tarball, verified the file signature, and remade the whole thing. Looks like no change so far. One thing that came to mind, maybe the httpd.conf fine is still not right, maybe I missed something when I edited it. Any recommendations to bringing that back to defaults?
 
Old 01-19-2006, 02:16 PM   #10
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Ugenn has been very helpful (thank you so much), but i'm still having the same problem.

I have also tried unloading all of the DSO modules from the httpd.conf file, still no luck.

also, even after all of tehse attemtps to get it back up and running, ther error logs havn't changes since this morning. i ahve no new errors, but it's still not starting.
 
Old 01-19-2006, 07:48 PM   #11
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
What error is rpm giving you? If it's failing because of an existing file conflict, try specifying the 'force' option on the command-line.
 
Old 01-20-2006, 01:39 AM   #12
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Since this morning a couple of things have happened. I was able to get apache to compile again, (had to use a -nodeps to remove it. Which caused for a very messy time recompiling apache and PHP. Both have been recompiled.
the PHP module has been added to the httpd.conf file, and the module was put in the proper directory. I also included the AddHandler .php and put the virtual hosts back in.

so apache starts and stops, but it does not appear to be parsing through PHP (getting code when i try to visit the sites.

I greatly appreciate your help, (as well as anyone else who may post here) and I’ll check in the morning.
 
Old 01-20-2006, 05:29 AM   #13
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Make sure your httpd.conf has the following
Code:
AddType application/x-httpd-php .php
Code:
DirectoryIndex index.html index.html.var index.php
Code:
LoadModule php5_module modules/libphp5.so
 
Old 01-20-2006, 01:10 PM   #14
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
I checked that, and I did some more snooping around, I made sure that the httpd.conf file that doesn’t work only has these changes, then I commented out each one at a time. And it refuses to load libphp5.so (when that’s commented out, apache starts w/o php) Which makes it difficult to get PHP to work. I cheeked to make sure that the file actually exists, but beyond that I don't know how to test or debug it.

Finally, I've also started looking for an RPM that has GD, (which is how all of this got started in the first place), and I think I have found one, but I'm having some issues with circular dependencies when I go to install it.
 
Old 01-20-2006, 07:56 PM   #15
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Figured out how to solve the circular dependencies. it is possible to use rpm to remove or install multiple packages. , so i did jsut that. Have semi-working version fo PHP on the server now.

the server is acting as if the virtual hosts are not working right. I'm using name based virtual hosts, and i added the virtual hosts , bust sitll no doings. I thught I used my backup file of the httpd.conf file already, but i did not, and when i replaced that, Apache started up like a charm. with PHP support.

PHP still needed a kick in teh ass, i remebered earlier in my troubleshooting i replaced the php.ini file with the backup i made before teh whole installation process, so i put the original php.ini file back, and it started up with GD support.

Finally, i needed ot install a couple of packages to connect everything back to my SQl, and presto,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 Start Error Tim_Olaguna SUSE / openSUSE 1 01-12-2006 04:22 PM
Apache2 (re)start problem X-DraGoN Debian 1 11-08-2005 03:09 PM
How to start Apache2 Rodotheos Linux - Software 4 10-01-2005 06:21 AM
apache2 won't start atheist Linux - Software 1 10-23-2004 04:14 PM
Apache2 won't start sasklinuxuser Linux - General 4 09-22-2004 02:33 PM


All times are GMT -5. The time now is 01:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration