# Apache, mod_php, mysql one more time

## bacouch

I have merged Apache, mod_php and mysql but I don't remeber in which order. But when I looked into phpinfo() I saw '--without-mysql' so I've searched some forum and I saw that I must add mysql into USE in /etc/make.conf. I remerged mod_php but I still see '--without-mysql' in phpinfo(). 

HELP!!!!!!!!!!!

P.S. Sorry for my english but I'm from Poland and I don't know it very well.

----------

## Messiah

You could/should set mysql in your use variable

If you don't, then you should first emerge mysql and than mod_php, as mod_php will detect mysql emerged

----------

## rac

Isn't USE="mysql" on by default? 

```
# mv /etc/make.conf /etc/make.conf.jail

# touch /etc/make.conf

# emerge -pe mod_php | grep mysql

[ebuild  N   ] dev-db/mysql-3.23.52-r1

# mv /etc/make.conf.jail /etc/make.conf
```

----------

## Messiah

I do not know if USE is default, but I do know if I do not explicitly name it in my own USE variable, that when you emerge mod_php before MySQL, than MySQL will not be used.

That is if I remember correctly, but I did install Gentoo on 4 servers, so I hope I do remember correctly.

----------

## rac

That doesn't make sense to me (not saying it's wrong, but I just don't get it).  mysql is in use.defaults in every profile I can see, and I thought that my test would have been conclusive that simply emerging mod_php with no changes to make.conf would pull mysql in automatically.  bacouch, what version of mod_php do you have installed?  Are you sure that you fully restarted Apache (stop and start again)?

----------

## bacouch

My make.default

```
# Copyright 2002 Gentoo Technologies, Inc.

# System-wide defaults for the gcc 3.2 Portage system

USE="x86 oss 3dnow apm arts avi berkdb crypt cups encode gdbm gif gpm gtk imlib

java jpeg kde gnome libg++ libwww mikmod mmx motif mpeg ncurses nls oggvorbis

opengl pam pdflib png python qt qtmt quicktime readline sdl slang spell ssl

svga tcpd truetype X xml2 xmms xv zlib"

ARCH="x86"

COMPILER="gcc3"

ACCEPT_KEYWORDS="x86"

```

I'va added "mysql MYSQL" to make.conf,recompiled mod_php (2 times) and I've restarted apache (/etc/init.d/apache restart) but it was still '--without-mysql', but when I've restarted computer it was '--with-mysql'.  :Smile: 

It was probably my fall becouse I've made somthing rong so sorry for your time  :Smile: .

----------

## Messiah

 *Quote:*   

> I'va added "mysql MYSQL" to make.conf,recompiled mod_php (2 times) and I've restarted apache (/etc/init.d/apache restart) but it was still '--without-mysql', but when I've restarted computer it was '--with-mysql'. 
> 
> 

 

Now this really makes no sense. We are not using some OS from Redmond. Anyway, it works now, so you are happy, we are happy

----------

## rac

 *Messiah wrote:*   

> Now this really makes no sense.

 

I think it makes sense (although I could be wrong).  /etc/init.d/apache restart only reloads the configuration files.  When you add or remove DSO modules, you need the more drastic 

```
# /etc/init.d/apache stop

# /etc/init.d/apache start
```

----------

## Messiah

Now that one is true for newer rc scripts of apache. I know on one Gentoo box of mine it says he want to restart gracefully, and on an older one it says stopping and restarting apache. now it makes sense  :Wink: 

----------

## pilla

Did you execute env-update after changing make.conf? I am not sure it would make any difference.

 *bacouch wrote:*   

> 
> 
> I'va added "mysql MYSQL" to make.conf,recompiled mod_php (2 times) and I've restarted apache (/etc/init.d/apache restart) but it was still '--without-mysql', but when I've restarted computer it was '--with-mysql'. 
> 
> It was probably my fall becouse I've made somthing rong so sorry for your time .

 

----------

