Loading...
 
Use the Mac's native PHP and Apache to create an IDE

Mac IDE Without XAMPP

Create a Mac IDE Without XAMPP

Mac's operating system OS X (Leopard and later) comes with PHP and Apache already installed, so the only additional programs needed to set up a Mac as a local server for development purposes are MySQL and a database interface program. This page explains how to configure and install these components, based on the Snow Leopard operating system.

 Later Versions

Please note that some procedures differ than documented here when using or upgrading to the Mountain Lion (10.8) or Mavericks (10.9) Mac operating system version. Please see the following articles for more information when using or upgrading to these versions: Mountain Lion (10.8), Mavericks (10.9), and Yosemite (10.10).

 An alternative

Another approach to manage and install the software needed to create an IDE on a Mac is to use a package manager like macports or Homebrew, which are similar to APT on other platforms. Full details to come on a separate Mac Development System With MacPorts and Mac Development System With Homebrew pages.

Make sure hidden files are visible

Do this either through the proper setting on your editor, or by this Terminal command (restarting Finder afterwards):

defaults write com.apple.finder AppleShowAllFiles TRUE

1.1.2. Enable PHP

  1. Browse to Apache's http.conf file located at /etc/apache2/httpd.conf and find this line:
    #LoadModule php5_module libexec/apache2/libphp5.so

  2. Remove the # symbol at the beginning of the line so that it reads
    LoadModule php5_module libexec/apache2/libphp5.so

  3. Save the httpd.conf file

  4. Activate the default php.ini file by renaming /etc/php.ini.default to /etc/php.ini by typing the following command in the Terminal window:
    sudo cp /etc/php.ini.default /etc/php.ini

1.1.3. Enable Apache

  1. Open the Mac's System Preferences and click on Sharing in the Internet & Wireless section

  2. In the pop-up, click on Web Sharing to enable Apache. Here's a screenshot:

    Mac web sharing popup

  3. Note the addresses for your computer and personal websites. The IP number in the address can be replaced with localhost as follows:

    1. http://localhost equates to /Library/WebServer/Documents in Finder (this is not the Library folder found in your home directory)

    2. http://localhost/~yourusername equates to /Users/yourusername/Sites in Finder

     Tip

    If you use the personal website (with ~yourusername in the path) and you have problems logging in, use the computer website path (number 1 above).

  4. If you're using your personal website (number 2 above), you may need to modify the Apache configuration file:

    1. Go to /etc/apache2/users/ and edit the conf file with your user name. It will be named yourusername.conf

    2. Add the following and then save it (you'll need to stop and restart Apache after saving the file):
      <directory "/Users/yourusername/Sites/*/">
          Options Indexes MultiViews FollowSymLinks
          AllowOverride All
          Order allow,deny
          Allow from all
      </directory>

1.1.4. Test PHP

  1. Create a PHP file with the following code:
    <?php 
    phpinfo();

  2. Save in /Library/WebServer/Documents or /Users/yourusername/Sites, depending on whether you are using the computer or personal website (you may need to use the first one to avoid login problems).

  3. Navigate you browser to this file. You've succeeded when you a screen like the following:

    phpinfo

1.1.5. Install and Configure MySQL

  1. Go to http://dev.mysql.com/downloads/mysql/, download the appropriate version and install it

  2. Also install the MySQL Preference Pane available in the same download. It will allow you to stop and start MySQL from Mac's System Preferences window

  3. PHP and MySQL communicate through the mysql.sock file, which is installed at -+/tmp/mysql.sock=- by default. Be sure both programs are configured to look for the file here (or wherever you want to move the file to) by doing the following:

    1. For PHP, ensure the following is set in the /private/etc/php.ini file:
      mysql.default_socket = /tmp/mysql.sock 
      pdo_mysql.default_socket= /tmp/mysql.sock
      mysqli.default_socket = /tmp/mysql.sock

    2. For MySQL, create a file at /etc/my.cnf with the following:
      [client]
      socket = /tmp/mysql.sock
      
      [mysqld]
      socket = /tmp/mysql.sock

1.1.6. Install and Configure a MySQL Interface

If you'd like to be able to inspect the database, you'll need to install a separate interface program. Below are a couple of free ones with tips on how to set up. The main thing in both cases is to tell the program where the mysql.sock file is.

  1. Navicat for MySQL Lite

    1. Download from http://www.navicat.com/ and install

    2. When configuring a new connection, indicate the mysql.sock path in the Advanced tab. Here's a screenshot:

      Navicat Connection Properties

  2. MySQL Workbench

    1. Download from http://dev.mysql.com/downloads/mysql/ and install

    2. Set the Connection Method to Local Socket/Pipe and add the correct Socket/Pipe Path as shown in this screenshort:

      MSQL Connection Screen

    3. Once you've created a connection, double click on it and click Add Schema under Actions in the left panel to create a database

1.1.7. Aptana Studio Settings

The instructions at XAMPP-Aptana can be used to configure Aptana with appropriate changes to file locations since XAMPP is not being used here. Here are a couple of tips:

  1. Set the PHP Executable to be /usr/bin/php

  2. Place the Xdebug file (download from http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging) at the location indicated in the following entry that should be made to /private/etc/php.ini:
    zend_extension= /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so

  3. Under File > Switch Workspace, set the workspace to be /Library/WebServer/Documents or /Users/yourusername/Sites, depending on the location chosen in step 3.3.


Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Group
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend, alert + Social Bookmarking
Terms and Conditions
Theme
TikiTests
Timesheet
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools