Apache causing me troubles...

Discussion in 'Web Design and Development' started by skinnybeans, Mar 14, 2008.

  1. skinnybeans macrumors newbie

    Dec 6, 2007
    Hi all,

    Hoping that someone here can help me out, I've been trying to get php working with apache under leopard and not having much luck...

    It seems that all that was needed was to uncomment a couple of lines from the httpd.conf file namely

    LoadModule php5_module libexec/httpd/libphp5.so
    AddModule mod_php5.c


    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    Then i saved the file, restated apache and no dice.... when i try running index.php that contains <?php phpinfo(); ?> it just prints out the text instead of showing the php info stuff.

    Now I upgraded my 10.4 install to 10.5 and it seems like some of the config options changed, and that might be causing me trouble.

    How do i check if apache is even reading the httpd.conf file correctly? I tried putting errors in, renaming it (as well as the httpd.conf.bak) and each time apache started ok, what is the deal here? I though it would fail to run if the config file was missing or contained errors?

    I have been trying to fix this for hours and had no luck at all. I can't seem to find other posts or articles anywhere describing this problem, it just seems to work...

  2. Winterfell macrumors regular

    Apr 3, 2007
    Tulsa, Oklahoma
    Is anything being logged to your Apache log? /private/var/log/apache2/error_log

    Always the first place to look. =)
  3. skinnybeans thread starter macrumors newbie

    Dec 6, 2007
    Well about 5 min after posting on here i fixed it....it wasn't reading that httpd.conf file because i was editing the one in the wrong directory....

    i was in /etc/httpd instead of doing the one in /etc/Apache2

    seems like it's working now. pity i had to post my stupidity for all to see :D

    Thanks for the suggestion, Ill add that to my list of "important apache directories to remember"
  4. Winterfell macrumors regular

    Apr 3, 2007
    Tulsa, Oklahoma
    Not a problem. A lot of vendors like Apple, Red Hat, etc. install software in non-standard places. For example, Apple defaults Apache to /etc/apache2 and Red Hat places it in /etc/httpd, so it's common to be working on the wrong file. =P

Share This Page