Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a bunch of files that are causing me problems. I am working locally on my Mac and I have files called something.ini.php and they are being shown as text, while my something.php files are coming up fine.

How can I get my something.ini.php to be processed as PHP?

My PHP part

<IfModule php5_module>
    AddHandler php5-script .php
    AddType application/x-httpd-php-source .phps

    <IfModule dir_module>
        DirectoryIndex index.html index.php
    </IfModule>
</IfModule>
share|improve this question
add comment

3 Answers

remove the IfModule wrappers and restart apache. you will quickly see if apache knows about your necessary directives.

share|improve this answer
add comment

I see you are telling it to use the type, but have you loaded the module? Something like: LoadModule php5_module libexec/apache2/libphp5.so

share|improve this answer
add comment

Looks like you should add the line AddHandler php5-script .php and restart Apache:

<IfModule php5_module>
    AddHandler php5-script .php
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    <IfModule dir_module>
        DirectoryIndex index.html index.php
    </IfModule>
</IfModule>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.