# Apache does not read php files...



## xSunLighTx3 (Feb 11, 2020)

Heyo!

I just configured a new apache server on my freebsd system.
Now I need to use php72 which I have installed and configured.

The simple problem is that the apache server wont read a php
file as php. It just read it as an html file.

I know that you have to modify the httpd.conf.


```
<IfModule dir_module>
    DirectoryIndex index.php index.html
    <FilesMatch "\.php$">
        SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
        SetHandler application/x-httpd-php-source
    </FilesMatch>
</IfModule>
```

Anyway this wont work.. Can someone tell me what I can do now?
All examples in the internet are with php5 and other help wont work.


----------



## balanga (Feb 11, 2020)

```
pkg install mod_php7*
```

7* where * depends on the version of php you have installed


----------

