LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache2.2 won't start (https://www.linuxquestions.org/questions/linux-newbie-8/apache2-2-wont-start-405409/)

dana340 01-19-2006 10:59 AM

Apache2.2 won't start
 
I had a working web server with PHP, which a friend of mine help set up. He’s 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 I’m going to see if I can answer other questions in the forums now that I feel confident enough to.

ugenn 01-19-2006 11:03 AM

Check the web server logs. Typically found in (or some sub-dir of) /var/log

dana340 01-19-2006 11:16 AM

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

ugenn 01-19-2006 11:22 AM

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?

dana340 01-19-2006 11:43 AM

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?

ugenn 01-19-2006 11:49 AM

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?

dana340 01-19-2006 11:57 AM

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.

ugenn 01-19-2006 12:32 PM

sounds like your source is borked somehow. redownload the tarball.

dana340 01-19-2006 01:23 PM

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?

dana340 01-19-2006 02:16 PM

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.

ugenn 01-19-2006 07:48 PM

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.

dana340 01-20-2006 01:39 AM

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.

reddazz 01-20-2006 05:29 AM

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

dana340 01-20-2006 01:10 PM

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.

dana340 01-20-2006 07:56 PM

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,


All times are GMT -5. The time now is 10:18 PM.