Some distro's don't do extra folders but to keep stuff easy to maintain and not to make one bulky httpd.conf, things like vhost php5 dav and ssl configs can be kept in an extra folder then included in the main httpd.conf
You can create that extra folder in /etc/httpd/conf/extra and there you create the php5_module.conf
Code:
# Required modules: dir_module, php5_module
<IfModule dir_module>
<IfModule php5_module>
DirectoryIndex index.php index.html
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
</IfModule>
</IfModule>
Now you include this extra/php5_module.conf with this code at the near bottom of your httpd.conf
Code:
<IfModule php5_module>
Include conf/extra/php5_module.conf
</IfModule>
The php module must be loaden
after the dir_module in the section that starts with "LoadModule ..."
Code:
...
....
LoadModule dir_module modules/mod_dir.so
LoadModule php5_module modules/libphp5.so
....
...
Don't forget the : AddHandler application/x-httpd-php .php in the mime module section and add index.php before index.hmtl in this section
Code:
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
you can test the config with
this should return "Syntax OK"
and
Code:
apachectl -t -D DUMP_MODULES |grep php
Syntax OK
php5_module (shared)
this shows that the php module loads at startup