# Emerge Apache with PHP & MySQL support: is it possible ?

## dark_priest

title sais about all

it this possible, and if so, how?

something like : ?

```
 emerge -k apache --with-php --with-mysql 
```

or something totally different?

----------

## GreyArea

Try this :-

```
USE="mysql" emerge mysql apache php mod_php
```

HTH

GreyArea.

----------

## GreyArea

oops double post - sorry.Last edited by GreyArea on Thu Sep 25, 2003 2:55 pm; edited 1 time in total

----------

## ptitman

give a try to this :

```
USE=" apache2 mysql php mod_php tcltk innodb"

in your /etc/make.conf

#source /etc/make.conf

#emerge mysql apache mod_php
```

this should work fine and you should have innodb working, so u can use foreign keys

by the way, dont forget to modify your /etc/conf.d/apache2 and add 

```
APACHE2_OPTS="-D PHP4"
```

----------

## Diezel

ptitman, when I try this I get a list of alot that I don't really want on my server. I use no GUI at all and it want's to emerge X11 base.

```
[ebuild   R   ] net-www/apache-2.0.47

[ebuild  N    ] x11-misc/ttmkfdir-3.0.9

[ebuild  N    ] x11-base/opengl-update-1.5

[ebuild  N    ] media-libs/fontconfig-2.2.1

[ebuild  N    ] app-arch/unzip-5.50-r2

[ebuild  N    ] app-arch/cabextract-0.6

[ebuild  N    ] x11-base/xfree-4.3.0-r2

[ebuild  N    ] media-libs/lcms-1.09

[ebuild  N    ] media-libs/libmng-1.0.4

[ebuild  N    ] x11-libs/qt-3.1.2-r4

[ebuild  N    ] app-crypt/mhash-0.8.18-r1

[ebuild  N    ] media-libs/pdflib-4.0.3-r1

[ebuild  N    ] dev-libs/libmcrypt-2.5.7

[ebuild  N    ] dev-libs/libxml2-2.5.8

[ebuild  N    ] dev-libs/libxslt-1.0.31

[ebuild  N    ] app-text/aspell-0.50.3

[ebuild  N    ] dev-perl/XML-Parser-2.31-r1

[ebuild  N    ] app-text/sablotron-0.97

[ebuild     U ] media-libs/freetype-1.3.1-r3 [2.1.4]

[ebuild  N    ] media-libs/t1lib-1.3.1

[ebuild  N    ] net-libs/libwww-5.4.0-r1

[ebuild  N    ] dev-php/mod_php-4.3.2-r4

```

Why is this?

----------

## GreyArea

try adding -X  to your USE="..." in make.conf

----------

## ptitman

well, i do use a window manager on my machine, but i guess that if u add

```
USE=" -gtk -X -qt -kde -gnome apache2 mysql php mod_php tcltk innodb"
```

 to ur use flag then u should be sorted   :Wink: 

but the thing is that i def needed to have the apache2 mysql php mod_php turn on to be able to compile apache with php support.

the innodb statement allow u to have foreign key support with mysql which can be pretty handy when it comes to updating and deleting 

  check out the flag in the doc, http://www.gentoo.org/dyn/use-index.xml

wish it work lighter that way   :Razz: 

----------

## dark_priest

bu the time i read this i did my server from scratch and managed to get apache+php working, and i compiled the php module with mysql support... or so it sais...

but still people, thanks for all the help  :Smile: 

if i screw up my server again, i'll know where to look

----------

## dark_priest

bu the time i read this i did my server from scratch and managed to get apache+php working, and i compiled the php module with mysql support... or so it sais...

but still people, thanks for all the help  :Smile: 

if i screw up my server again, i'll know where to look

----------

## tomapd

i wonder why you guys emerge both php and mod_php.

AFAIK, only mod_php is required for apache + php combination and unless i want to use php command directly, i don't need to emerge php.

am i misunderstanding?

thanks in advance.

----------

## mpsii

 *tomapd wrote:*   

> i wonder why you guys emerge both php and mod_php.
> 
> AFAIK, only mod_php is required for apache + php combination and unless i want to use php command directly, i don't need to emerge php.
> 
> am i misunderstanding?
> ...

 

I would also like to know the answer to this question.

----------

## kashani

 *tomapd wrote:*   

> i wonder why you guys emerge both php and mod_php.
> 
> AFAIK, only mod_php is required for apache + php combination and unless i want to use php command directly, i don't need to emerge php.
> 
> am i misunderstanding?
> ...

 

That's correct. The reason it's usually done is many web programmers don't know Perl or shell scripting so they write little script in PHP. Or at least that's been my expeierence. 

kashani

----------

