# All I friggin want is mod_php and the NECESSARY additions.

## OpelBlitz

```
# emerge -up mod_php

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] app-crypt/mhash-0.9.1  

[ebuild  N    ] media-libs/jpeg-6b-r3  

[ebuild  N    ] media-libs/tiff-3.5.7-r1  

[ebuild  N    ] dev-libs/libxml2-2.6.11  

[ebuild  N    ] dev-libs/libxslt-1.1.8  

[ebuild  N    ] dev-perl/XML-Parser-2.34  

[ebuild  N    ] app-text/sablotron-1.0  

[ebuild  N    ] dev-java/java-config-1.2.6  

[ebuild     U ] sys-apps/file-4.09 [4.08] 

[ebuild  N    ] dev-libs/libmcrypt-2.5.7  

[ebuild  N    ] media-libs/libpng-1.2.5-r8  

[ebuild     U ] sys-devel/autoconf-2.59-r4 [2.59-r3] 

[ebuild  N    ] dev-db/mysql-4.0.20  

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

[ebuild  N    ] dev-perl/Net-Daemon-0.37  

[ebuild  N    ] dev-perl/Storable-2.07-r1  

[ebuild  N    ] dev-perl/PlRPC-0.2016-r1  

[ebuild  N    ] dev-perl/DBI-1.38  

[ebuild  N    ] dev-perl/DBD-mysql-2.1027  

[ebuild  N    ] dev-java/blackdown-jdk-1.4.1  

[ebuild  N    ] dev-python/egenix-mx-base-2.0.5  

[ebuild  N    ] dev-java/ant-1.5.4-r1  

[ebuild  N    ] app-admin/sudo-1.6.7_p5  

[ebuild  N    ] dev-db/postgresql-7.4.3  

[ebuild  N    ] media-libs/pdflib-5.0.2  

[ebuild  N    ] app-text/aspell-0.50.5-r2  

[ebuild  N    ] dev-php/mod_php-4.3.8  

[ebuild  N    ] dev-php/php-4.3.8  
```

I have so many - tags in make.conf... I mean, some things I need to install anyway like postgresql and mysql, but aspell and java?  Help me out here.  :Sad: 

----------

## Cossins

Use emerge -upv mod_php to see which USE flags are supported by the package. Most of those packages you want anyway, though...

- Simon

----------

## OpelBlitz

Yeah I suppose.  Is installing jpeg and tiff and what-not is kinda useless on a server with no X, or do they provide functionality to apache2 to allow jpegs to be properly served?

----------

## zerojay

 *OpelBlitz wrote:*   

> Yeah I suppose.  Is installing jpeg and tiff and what-not is kinda useless on a server with no X, or do they provide functionality to apache2 to allow jpegs to be properly served?

 

Properly generated, if need be.

----------

## Cossins

The reason JPEG and TIFF libraries are required is that PHP can do server-side image manipulation. Since they are tiny, there is practically no reason to not compile it in...

- Simon

----------

## beandog

What are your USE flags anyway?

----------

## OpelBlitz

My USE as of /etc/make.conf:

```
USE="-gtk -pdf -png -truetype -aspell -freetype -gpm -jpg -jpeg -tiff -gnome -kde -alsa -qt -opengl mysql apache2 -oss -avi -arts -cups -xmms -oggvorbis java -openmotif php -aim -X -freetype dedicated -gif ftp mime perl pcre postgres python simplexml ssl tokenizer vhosts xml2"
```

Yeah I know it's a mess. lol

While we're on that note.... I've now taken care of mod_php and am moving on to mod_perl.  I did:

```
emerge -pv mod_perl

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] dev-perl/digest-base-1.05   5 kB 

[ebuild  N    ] dev-perl/Digest-MD5-2.33   43 kB 

[ebuild  N    ] dev-perl/MIME-Base64-3.00   13 kB 

[ebuild  N    ] dev-perl/URI-1.30   91 kB 

[ebuild  N    ] dev-perl/libnet-1.16   68 kB 

[ebuild  N    ] dev-perl/HTML-Tagset-3.03-r2   7 kB 

[ebuild  N    ] dev-perl/HTML-Parser-3.34-r1   73 kB 

[ebuild  N    ] dev-perl/Crypt-SSLeay-0.49   114 kB 

[ebuild  N    ] dev-perl/libwww-perl-5.79  +ssl  219 kB 

[ebuild  N    ] dev-libs/mm-1.2.1   211 kB 

[ebuild  N    ] net-www/apache-1.3.31-r2  +pam  3,146 kB 

[ebuild  N    ] dev-perl/mod_perl-1.27-r4  -ipv6  363 kB 

Total size of downloads: 4,358 kB
```

and noticed apache 1.3.31-r2 wants to be installed because of pam.  But I have the most recent version of apache2 already.  What's up with that?

EDIT: noticed mod_perl's marked as unstable with apache2

----------

## phreenet

For emerging anything where you want a small setup.. Try doing this first.

```
emerge -vp <package>
```

It shows a list of all the USE flags that are assosicated with that package.  Then you can do.

```
USE="-* +<flags>" emerge -vp <package>
```

Now you should see only the FLAGs as +red.  

When I compiled mod_php I used the following.

```
USE="-* +curl +ssl +mysql +berkdb" emerge -vp mod_php
```

----------

## beandog

If you want to emerge mod_perl, it will only install with apache1, not 2.  You can have both apache1 and 2 installed at the same time.  Just start the one you want to use.  To get mod_perl + php, just emerge mod_perl and emerge mod_php (again).  If you want SSL support for apache1, emerge mod_ssl after that.

----------

## intgr

 *phreenet wrote:*   

> When I compiled mod_php I used the following.
> 
> ```
> USE="-* +curl +ssl +mysql +berkdb" emerge -vp mod_php
> ```
> ...

 

It's ok to use the USE environment variable for testing (with -vp), but you should never really emerge a package like this. (Yes, there are reasons not to)

You can use /etc/make.conf for global USE flags. If you need some use flags just for one specific package, you can edit /etc/portage/package.use. Try 'man portage' for more information.

----------

## OpelBlitz

I took care of it.  I realized I needed most of the installed things, so I didn't mind.

----------

## tedj

```
USE="-* curl ssl mysql berkdb dba" emerge mod_php
```

----------

## paket

What does USE="-*" do anyway?

----------

## Trejkaz

 *paket wrote:*   

> What does USE="-*" do anyway?

 

It trashes all use flags (e.g. the ones in make.conf, and the ones in the profile) before adding others.

----------

## intgr

 *tedj wrote:*   

> 
> 
> ```
> USE="-* curl ssl mysql berkdb dba" emerge mod_php
> ```
> ...

 

As I already stated, supplying USE flags from the command line is bad

----------

## tedj

It may be bad, but its better for me than the two choices you gave:

 1) edit make.conf, emerge mod_php, then put my old flags back in make.conf (waste of time)

 2) use package.use for this one package.  Since I'm only doing this one package anyway, there's no real benefit.

What exactly are the reasons to not do this?

----------

## splooge

I'll hazard a guess ... 

Because those flags won't be honored next time you do an 'emerge -u world'?

----------

## wll

Best option is to have your settings /etc/portage/package.use.

From the Gentoo USE flags docs http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1:

 *Quote:*   

> You can of course also explicitly disable USE flags for a certain application. For instance, if you don't want java support in PHP: 
> 
> Code Listing 5: /etc/portage/package.use 2nd example
> 
> ```
> ...

 

----------

## beandog

 *Quote:*   

> 2) use package.use for this one package.  Since I'm only doing this one package anyway, there's no real benefit.

 

That is the whole point of package.use -- to have individual use flags per package, so you don't have to ever remember to run USE="flag" emerge package.

One example of doing things this way is that you have the "unicode" flag turned on in /etc/make.conf, but if you build it with wxGTK, it will break all your apps that use that library.  So you just add "x11-libs/wxGTK -unicode" to package.use, and everything will use that flag except that package.  Of course, it works the other way around just as well.  You have a general use flag turned off (like mysql or something), and want only one package to use it (mod_php).  Just turn it on for that package as well.

----------

