# [SOLVED]Problem with PHP5 and Apache2

## Smatt454

Greetings.

I am currently in the process of setting up a web server off a first gentoo build.  

It's been a while since I set up a server without using lamp, but from what I've read online it should be a pretty simple process. 

The steps I took are as follows: 

1) emerging apache2

2) emerging php 

2) adding " -D PHP5" to APACHE2_OPTS

3) restarting the server. 

When I browse my server, I get a file listing (I have and index.php file, and it works with index.html).  Image HERE if that helps.  I also tried going to http://server/index.php, and it shows it as plain text.  

What am I missing? 

Relevant info:

```

smatt454@sexbox ~ $ cat /etc/conf.d/apache2 | grep APACHE2_OPTS=

APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D PHP5"

```

```

smatt454@sexbox ~ $ cat /etc/portage/make.conf | grep USE=

USE="-ssl -truetype -exif -apache2 -mysql -php -pam -ssl -xml -xml2 -berkdb -inofb -jpeg -png -pcre -session -unicode -irc -simplexml -xml -fpm -cgi"

```

```

smatt454@sexbox ~ $ cat /var/www/localhost/htdocs/index.php

<?php

 echo "hey";

?>

```

Last edited by Smatt454 on Tue Jul 09, 2013 4:04 pm; edited 4 times in total

----------

## DONAHUE

USE="-ssl -truetype -exif -apache2 -mysql -php -pam -ssl -xml -xml2 -berkdb -inofb -jpeg -png -pcre -session -unicode -irc -simplexml -xml -fpm -cgi" means: don't compile support for ssl, truetype, exif, apache2, mysql, php, pam, ssl, xml, xml2, berkdb, inofb, jpeg, png, pcre, session, unicode, irc, simplexml, xml, fpm, or cgi in any package where such support is an option.

----------

## Smatt454

 *DONAHUE wrote:*   

> USE="-ssl -truetype -exif -apache2 -mysql -php -pam -ssl -xml -xml2 -berkdb -inofb -jpeg -png -pcre -session -unicode -irc -simplexml -xml -fpm -cgi" means: don't compile support for ssl, truetype, exif, apache2, mysql, php, pam, ssl, xml, xml2, berkdb, inofb, jpeg, png, pcre, session, unicode, irc, simplexml, xml, fpm, or cgi in any package where such support is an option.

 

D'oh, well don't I feel foolish?   :Embarassed:   I fixed my USE flags and re-emerged php.  That solved the issue.  Thanks for clearing that up.

----------

