DISQUS

ClickOnTyler.com: How to Enable PHP5 In Mac OS X Leopard - Click On Tyler Blog

  • zada · 1 year ago
    I did a search (since you don't give the full path/location) for httpd.conf and returned nothing - does this mean it isn't installed ( i have leopard)...
  • Tyler · 1 year ago
    I *do* give the full path to httpd.conf. It's "/private/etc/apache2/httpd.conf".
  • zada · 1 year ago
    Hmm. Well, I can't seem to find a directory on my HD labeled "private" - where is this at starting from Macintosh HD? I even tried typing the above path into terminal and says " not such directory". What am I doing wrong?
  • Tyler · 1 year ago
    System directories like /private don't appear in the Finder (normally). You should be able to access them via Terminal without problems. Any path that begins with a single forward-slash "/" means it's starts from your top-most root directory.
  • mise · 1 year ago
    Those who aren't familiar with the Terminal, can use the Finders "Go To Folder..." command which you can find in the "Go" menu or by using the key combination Shift-Command-G. There, type "/private/etc/apache2" (wihtout the ").
  • zada · 1 year ago
    OK - I found it, thanx. Crazy.
  • X-Phreedom · 1 year ago
    Thank you ;)
  • jabberwocky · 1 year ago
    well I don't have a /private/etc/apache2 directory on my mac. I do have a /etc/httpd/httpd.conf but adding the LoadModule php5_module libexec/apache2/libphp5.so to it doesn't help either, never had this much trouble getting php up and running.
  • Tyler · 1 year ago
    Jabberwocky: The instructions I posted were for Leopard. If you're running Tiger, it's best to use Marc Liyanage's PHP installer here: http://www.entropy.ch/software/macosx/php/
  • jabberwocky · 1 year ago
    Thank for the link.
  • Sumeet · 1 year ago
    Hey! I did as told above but still i cannot run php. When i try to open a a php file it just displays the code present in the file.
  • Mike · 1 year ago
    I had exactly the same thing. And I've tried it on 2 MacBooks and an iMac G5. All with the latest version of Leopard 10.5.5

    Can anybody please explain why it isn't working? Is it maybe because I'm not running the Server version of Leopard?
  • Steve · 1 year ago
    This isnt so in Leopard, there is no php5 module mentioned in httpd.conf
  • Tyler · 1 year ago
    I just verified that on a fresh install of OS X 10.5.4, /private/etc/apache2/httpd.conf has

    #LoadModule php5_module libexec/apache2/libphp5.so

    on line 114.
  • Joe · 1 year ago
    I don't really get any of this.

    where is /private/etc/apachet2/httpd.conf? Is it under developer, library, somewhere else? Are you sure this file exists on Leopard?
  • Tyler · 1 year ago
    yes :)

    OS X hides some system directories in the Finder. You can access them through the Terminal, or you can choose "Go to Folder..." from Finder's "Go" menu and enter the folder "/private/etc/apache2/" to open a window directly.