# apache2 start error

## amdxpraider

when I try to start up apache I get this error.          

root@linuxserver bjw # /etc/init.d/apache2 start

 * Apache2 has detected a syntax error in your configuration files:

Syntax error on line 5 of /usr/lib/apache2/conf/modules.d/70_mod_php.conf:

Cannot load /usr/lib/apache2/extramodules/libphp4.so into server: /usr/lib/apache2/extramodules/libphp4.so: cannot open shared object file: No such file or directory

anyone have any debugging ideas?

  ~Brandon

----------

## powdahound

Did you install apache2 via portage or manually? I just installed from portage earlier today and mine works fine... Also, did you edit line 5 of that file? If so, go fix it.  :Smile: 

----------

## amdxpraider

line 5 is this

        LoadModule php4_module    extramodules/libphp4.so

what should i change?

 ~Brandon

----------

## amdxpraider

i installed by saying ' emerge apache mod_php

  ~Brandon

----------

## Lajasha

Try adding "apache2" to your "USE" flags in /etc/make.conf and then remerge mod_php

----------

## amdxpraider

now I'm getting this error instead

root@linuxserver bjw # /etc/init.d/apache2 start

 * Starting apache2...

[Wed Jul 14 22:25:03 2004] [error] Can't load '/usr/lib/perl5/vendor_perl/5.8.2/i686-linux/Apache2/auto/APR/Table/Table.so' for module APR::Table: /usr/lib/perl5/vendor_perl/5.8.2/i686-linux/Apache2/auto/APR/Table/Table.so: invalid ELF header at /usr/lib/perl5/5.8.2/i686-linux/XSLoader.pm line 68.\n at /usr/lib/perl5/vendor_perl/5.8.2/i686-linux/Apache2/APR/XSLoader.pm line 16\nCompilation failed in require at /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl line 19.\nBEGIN failed--compilation aborted at /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl line 19.\nCompilation failed in require at (eval 1) line 1.\n

[Wed Jul 14 22:25:03 2004] [error] Can't load Perl file: /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl for server linuxserver.homenetwork:0, exiting...\n

any ideas.

 ~Brandon

----------

## amdxpraider

I can not figure this out. Can someone please list some possible things I can try to do to fix this? The server was working last week, and I have not touched anything related to it since, except                                                                                                                                                                                                              trying what the people in this post have mentioned. All your help is appreciated.

  ~Brandon

----------

## mil0t

Do all of this

```

emerge sync

emerge perl

emerge httpd

emerge unmerge apache2

```

when httpd is finnished try to configure it and then try tu start again by this syntax:

```

#/etc/init.d/httpd start

```

mil0t.

----------

## amdxpraider

I did all those things, and it didn't seem to totally fix everything. I obveously needed to reinstall apache, so I did an emerge apache mod_php mod_perl. That went smooth, but it won't let me /etc/init.d/apache2 start. 

  Where it would say ok on the right, it just says [!!]. so i decided to just say /etc/init.d/apache start, and that works ok, and I can see my site again. Will running apache instead of apache2 change anything? And why can't I start apache2. Do the [!!] give me any indication as to what is screwing up?

  ~Brandon

----------

## Lajasha

If you look into your log files do you see anything in there? When ever you get a [!!] it is generaly logged somewhere. Try looking in /var/log/messages and in the apache log to see if it yeilds anything.

----------

