0

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>

3 Answers 3

1

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

0

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

0

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>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .