# mod_ssl error on starting apache

## aschrijver

Hi, I think I really did it this time. After I installed PHP5 on my homesystem, I found that some USE flags are needed for that, ´dba´ or ´-berkdb´ in fact.

That worked okay, so when I installed my server, I used those flags right from the start. But now when I try to start Apache (1.3.31), I get this error

```
 * Starting apache...

Syntax error on line 59 of /etc/apache/conf/apache.conf:

Cannot load /etc/apache/extramodules/libssl.so into server: /etc/apache/extramodules/libssl.so: undefined symbol: dbm_  [ !! ]
```

I tried several dozens of times reinstalling db, gdbm, apache, mod_ssl and mod_php, but nothing worked. Starting apache without mod_ssl works perfectly.

Can somebody please help me on this? I am really out of options here.

----------

## pizzaman

I don't know if you've alrady found a solution, but

in my case I had to emerge openssl, mod_ssl again.

----------

## aschrijver

 *Quote:*   

>  * Starting apache...
> 
> Syntax error on line 59 of /etc/apache/conf/apache.conf:
> 
> Cannot load /etc/apache/extramodules/libssl.so into server: /etc/apache/extramodules/libssl.so: undefined symbol: dbm_firstkey 
> ...

 

I still get this error when I want to start apache.

Also I tried a complete fresh installation of Gentoo, with my USE flags, and I still get this error.

Some more info:

Apache 1.3.31

PHP 5.0.2

mod_ssl 2.8.19

OpenSSL 0.9.7d-r1

USE="aalib acpi -apache2 autofs cdr dba dvd dvdr ffmpeg ftp gd gpm gtk gtk2 imap -java -maildir mbox oggvorbis opengl oss pcre pda pnp slc spell ssl truetype unicode usb -xfree xft xml xml2 cups samba mysql sharedmem session -X -qt -kde"

The error talks about dbm, so I tried all combinations of berkdb, dba, dbm and gdbm, but not one works. Simply not using them is not possible, as PHP needs both berkdb and dba.

Re-emerging OpenSSL and any of the other packages has no effect. This problem even occurs when I do a complete new Gentoo install, so it should have something to do with the USE flags (I think).

----------

## pizzaman

You'll also need to run this, after re-emerge mod_ssl

# ebuild /var/db/pkg/net-www/mod_ssl-2.8.19/mod_ssl-2.8.19.ebuild config

Then make sure to edit apache config files to get rid of

duplicated inclusion of mod_ssl related statements.

----------

## helmholtz

Modify the apache ebuild. Around line 67 you'll see:

```
    #-DBUFFERED_LOGS

    OPTIM="${mycflags} -DHARD_SERVER_LIMIT=${HARD_SERVER_LIMIT:=512} \

        -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \

    LIBS="-lgdbm -lpthread" \

    EAPI_MM=SYSTEM \

```

Change the LIBS line to:

```
    LIBS="-lgdbm -lpthread -lgdbm_compat" \

```

And then reemerge apache.

----------

## aschrijver

It works!!!!!!!!

Thank you very much!!

Finally after months I have https back!

I just had to re-emerge gdbm, and after that Apache with your modifications.

----------

## HAL_9000

for me too  :Smile: 

I'm grateful!  :Smile: 

----------

## al_bullit

Sadly none of the above fixes apear to work for me. Is there any word on when the apache ebuild maintainers might release a 'fixed' version for this bug of many weeks in what you would think is a major piece of software?

In the mean time installing apache and mod_ssl by hand appears to work just fine.

----------

## whit

 *pizzaman wrote:*   

> You'll also need to run this, after re-emerge mod_ssl
> 
> # ebuild /var/db/pkg/net-www/mod_ssl-2.8.19/mod_ssl-2.8.19.ebuild config
> 
> Then make sure to edit apache config files to get rid of
> ...

 

That doesn't do the trick - or change anything really, just duplicates the old entries. This is adjusted for 2.8.21. Damn.

----------

## whit

 *helmholtz wrote:*   

> Change the LIBS line to:
> 
> ```
>     LIBS="-lgdbm -lpthread -lgdbm_compat" \
> 
> ...

 

That DOES do the trick! Thank you! 

Note: also re-emerge gdbm first, but that alone didn't make a difference. Next step was to change the ebuild for 1.3.33 and re-emerge Apache. Which did it. So can't say whether it was the extra LIB or the rebuilding Apache after rebuilding gdbm which was essential - or both.

(Now, has this been reported as a bug?)

----------

## DennisBagley

Thanks helmholtz,

The ebuild hack alone [+ re-emerging apache] worked for me,

 :Cool:   :Cool:   :Cool: 

Thanks,

Den

----------

## Tocano

I appreciate the responses.  The recommendations seem to work for me.  However, for future knowledge, can anyone explain what this error actually is?  Why is it coming up?  Is there an error with the apache ebuild or is this bug reflective of something I've done with my system?

Thanks for the insight

----------

## lami

Seems like ebuild error for me.

You can also use masked ebuild (apache-1.3.33-r1), but you have to unmask it first.

Add these lines into /etc/portage/package.unmask

```
=net-www/apache-1.3.33-r1

=net-www/mod_ssl-2.8.22
```

and these into /etc/portage/package.keywords

```
=net-www/apache-1.3.33-r1       ~x86

=net-www/mod_ssl-2.8.22         ~x86
```

and then emerge =apache-1.3.33-r1

Create these files if they do not exists

----------

## ixion

 *whit wrote:*   

> (Now, has this been reported as a bug?)

 

https://bugs.gentoo.org/show_bug.cgi?id=71273

(edit: found a much more updated bug)

----------

## Hollow

As of https://bugs.gentoo.org/show_bug.cgi?id=71273#c8 the problem seems to still exist on some machines though.

Could you please try adding -lndbm instead of -lgdbm_compat.

thank you

----------

## blackcell

Yes, the -lndbm instead of -lgdbm_compat and reemerge Apache worked for me!

----------

## Hollow

please see https://bugs.gentoo.org/show_bug.cgi?id=86052 the backport to the stable ebuild has been done

----------

