# GD with PHP and Apache

## F0RMaTC

I am trying to set up a webserver with php, gd and apache. 

Php and Apache won't be a problem but did anyone get GD working with Gentoo?

Any suggestions?

----------

## rojaro

works without any problems ... following line worked perfectly for me ... 

```
USE="-* freetype jpeg png gd mysql flash libwww xml xml2 crypt" emerge dev-php/mod_php
```

you'll probably won't need the libwww, xml and xml2 flags, except you want to mess around with it. ...

----------

## F0RMaTC

Thnx man it worked   :Cool: 

----------

## klieber

moving to networking & security.

--kurt

----------

## mglauche

btw .. GD .. is there any way of using the "alternative" gd-library that supports gif files ?  :Wink: 

----------

## klieber

 *mglauche wrote:*   

> btw .. GD .. is there any way of using the "alternative" gd-library that supports gif files ? 

 

Good question -- I don't think that library has an ebuild, so you'd have to install it manually. (hopefully using the same directory structure that the ebuild version of gd does)  However, once you had it installed, you should be able to use:

```
emerge --inject libgd
```

to tell portage that the ebuild version of libgd is installed.  Not sure how similar the two gd libraries are, so you might have to make some symlinks to make sure everything is in the right location, but I can't see any reason why it wouldn't work.

Mind you, this is all supposition -- I haven't tried it myself.  If you do give it a go and get it working, it would make a great addition to the Tips and Tricks or the Documentation forum.  :Smile: 

--kurt

----------

