How To Enable PHP In Mac OS X [Web Sharing]

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,845
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 14, 2010

Mac OS X comes pre-installed with Apache Web Server, which is what allows you to use the "Web Sharing" feature.

If you've tried using PHP in your web sites, PHP won't work, because PHP is disabled by default in Mac OS X.

This brief video tutorial will show you how to enable PHP!

1. Open Terminal
2. Type in the command: sudo pico /etc/apache2/httpd.conf
3. Enter your password (you won't see any characters as you type)
4. Turn Web Sharing off, then back on (to restart Apache Web Server).

Please do not hesitate to ask me any questions! I'll get back to you as soon as possible!

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (WilfulAtrophy)

  • how do you put your web pages in your /library/webserver/documents/ directory?

  • @aricjiang420 You can usually just browse from your hard drive to the folder and drag and drop files in, or just save them from your text editor.

  • help me please i wan't start web sharing but idk how i start server but how change content of page ?? where i need upload my site

  • @OXOTHUK101

    You can put your web pages in two locations:

    /Users/[YourName]/Sites/

    OR

    /Library/WebServer/Documents/

    I put mine in "/Library/WebServer/Documents"­, because then you can access your web pages by going to "localhost/example.php" or "10.0.1.1/example.php" (your network IP address would be different than 10.0.1.1).

    If you use "/Users/[YourName]/Sites/", you would have to go to "localhost/~YourName/" in order to view your web pages.

    Make sense?

  • @WilfulAtrophy

    THANKYOU!!! I've been trying to google "location" & "It works!" in different combinations but I was getting no results. I stumbled on your video and it contains the answer for like.. 7 different questions I had.

  • @rottenapple02 Glad I could help!

see all

All Comments (11)

Sign In or Sign Up now to post a comment!
  • self indulgent crap

  • how do i turn it off?

  • Thank you for telling me to restart web sharing, I didn't know what was wrong.

  • @WilfulAtrophy cool! thanks a lot, your help is much appreciated!

  • @WilfulAtrophy yep thx

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more