News for hackers. Stuff that matters.

Can anyone help me with a php problem?

posted to stackoverflow, but no luck so far. any help would be greatly appreciated!

http://stackoverflow.com/questions/6459068/php-appearing-as-text-in-browser

( 5 comments | 2 points | on HN )
Re:Can anyone help me with a php problem? by veyron on Thursday June 23, 2011 @04:40PM (#2689779)
You need to make sure everything is processed in the correct order.

For example, I just used vanilla apache/php from osx 10.6.4:

    $ cat /etc/apache2/httpd.conf
    ...
    LoadModule php5_module        libexec/apache2/libphp5.so
    ...
    Include /private/etc/apache2/other/*.conf

    $ cat /etc/apache2/other/php5.conf 
    <IfModule php5_module>
            AddType application/x-httpd-php .php
            AddType application/x-httpd-php-source .phps

            <IfModule dir_module>
                    DirectoryIndex index.html index.php
            </IfModule>
    </IfModule>
Re:Can anyone help me with a php problem? by joshrice on Thursday June 23, 2011 @04:39PM (#2689773)
You have some answers over there now - apache isn't configured correctly or php isn't installed. If you can't get it figured out, use XAMPP http://www.apachefriends.org/en/xampp.html. It'll do everything for you
Re:Can anyone help me with a php problem? by jibjab89 on Thursday June 23, 2011 @04:55PM (#2689843)
thanks for the reply. i read the answers but unfortunately none have proven helpful thus far. i installed everything through mamp and after rereading multiple tutorials nothing indicated that there was an additional step necessary to configure php when using mamp. did i miss something? thanks again.
Re:Can anyone help me with a php problem? by chuchurocka on Thursday June 23, 2011 @04:55PM (#2689842)
you might like MAMMP on the mac better... http://www.mamp.info/en/index.html
Re:Can anyone help me with a php problem? by jibjab89 on Thursday June 23, 2011 @04:56PM (#2689850)
i just replied to joshrice below, but i installed everything with mamp and never read anything in a tutorial or online that required additional configuration for php when using mamp. perhaps i overlooked something?