PHP On MacOS 10

Discussion in 'Web Design and Development' started by Msh100, Mar 9, 2007.

  1. Msh100 macrumors newbie

    Joined:
    Mar 9, 2007
    #1
    Well , like the title says ,

    How do i install PHP ,i tried , and tried ,and tried lol
     
  2. rhoydotp macrumors 6502

    rhoydotp

    Joined:
    Sep 28, 2006
    #2
    looks like it is already there:

    $ which php
    /usr/bin/php
    $

    $ ls -ltr php.ini.default
    -r--r--r-- 1 root wheel 38710 Nov 1 21:11 php.ini.default
    $
     
  3. Msh100 thread starter macrumors newbie

    Joined:
    Mar 9, 2007
    #3
    how do i get it to work , rather than give me the source
     
  4. Mitthrawnuruodo Moderator emeritus

    Mitthrawnuruodo

    Joined:
    Mar 10, 2004
    Location:
    Bergen, Norway
    #4
    All you have to do is to activate the apache webserver (System preferences -> Sharing -> Services -> Personal Web Sharing).

    But before you do that you need to edit your http.conf file to include the php modules:

    - find the file /etc/httpd/httpd.conf
    - open that using your favourite text editor
    - find these lines (line number may vary slightly) and remove the '#' to uncomment/
    240: #LoadModule php4_module libexec/httpd/libphp4.so
    284: #AddModule mod_php4.c
    - exit and save the http.conf file (should require authentification and/or admin password)
    - (re)start the Personal Web Sharing and access whatever is in your ~/Sites/ folder on http://localhost/~yourname/
     

Share This Page