Loading...
 

Developing TikiWiki with Eclipse on a Mac

Initially this page documents my experiences setting up Eclipse on an Intel Mac (June/July 2008)

  • Using Eclipse and the right plugins you can set up an excellent development environment for working on TikiWiki or other PHP web application for free!
  • As Eclipse is Java based this will work on any platform that support Java, but there are hints here for getting it to work properly on a Mac (it's not entirely straightforward)
  • You will need some experience with the command line (the Terminal app) but hopefully I'll spell things out clearly enough for most people.

The basic setup

What is described below is based on Mac OS 10.4 (Tiger) running on an Intel Mac. 10.5 (Leopard) has a different Apache/PHP setup so some modifications will be required (I have added a few notes about getting this to work on Leopard). I also have PHP 5 installed (in /usr/local) which needs some special handling later on (I still had to install PHP5 using the entropy.ch package as described here as the built in PHP doesn't let you add extensions).

To do the whole thing will probably take you an hour or two - the main struggle is getting the PHP debugger working which you might not need (in which case I would recommend using Aptana with the Subclipse plugin).

Get Eclipse

It seems a new version has just come out (3.4) but i'm using 3.3.2, so I'll base these instructions on that. You might get it to work (especially on Linux or Windows) with latest versions of everything.
So go here and download and install version 3.3.2. Run the Update Manager (Help->Software Updates->Find and Install...) and get it to check for updates, which should find the 3.3.3 core update (not sure if that's important, but again, it worked for me)

Oops! Just spotted this page - most of this should be there... i guess

Get Subclipse

Subclipse is an Eclipse plugin that deals with SVN (the source control system used now for releases 1.10 onwards). This is where you get the latest version of all the files that make up TikiWiki.
Follow the instructions here to install it.

Get Tiki!

  • Select File->New->Other... then pick SVN->Checkout projects from SVN, then Next>
  • Select "Create new repository location", Next> and add "https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki" as the Url.
  • After a short time you will be asked to select the folder to be checked out. Choose branches/1.10 then Next>
  • Select "Check out as a project in the workspace" (for an easy life) and call the project something useful (like tikiwiki-1.10)
  • Next> lets you choose where to save the project if you like
  • Then click Finish.
  • Go and make some tea (or sit there watching it if you don't want to come back to an error or a thing asking "Are you sure?" ;)


You should now have a local copy of the latest version of the source code (etc) and when people make changes you can easily download them by right (or ctrl) clicking on the project folder icon in the "Explorer" panel and selecting Team->Update. Lots more info on this, and on how to submit your changes on http://dev.tiki.org.

Get PDT (PHP features for Eclipse)

Use the same method as for Subclipse to add a new remote update site for the URL http://download.eclipse.org/tools/pdt/updates/ - but, when you check the "sites to visit while looking for new features" also check the "Europa Discovery Site" as there are some other things from there PDT needs.
You need to un-check "Show the latest version of a feature only" as we (on a Mac anyway) need to pick version 1.0.2 (1.0.3 is the current release as of writing).
You might need to mess about with "Select Required" to get it to find the extra features needed, I find selecting and opening the Europa Discovery Site and doing this seems to get it right eventually. (hmmm - it doesn't seem to be showing 1.0.2 for me at the moment but I think that's because I already have 1.0.2 installed)

Get smartypdt (Smarty Support for PDT)

This one has to be downloaded from http://code.google.com/p/smartypdt/. Instructions to install from a "New Local Site" can be found there too.
Smarty is the template system used on TikiWiki and this plugin colourises (and i think error checks) Smarty tepmplate files (ending .tpl)

Note, it seems you need version 0.5.5 for this set-up - that's available here at the moment.

Get xdebug (Debugger and profiler for tool PHP)

This is one of the two debuggers PDT supports. I couldn't get the Zend one working as I think you need to buy the whole "Zend Platform" - so i moved on to the other one http://www.xdebug.org/
Now the fun begins!

Xdebug is an extension for Apache and you install it by adding the line:

zend_extension=/full/path/to/your/xdebug.so (or .dll for Windows)
to your php.ini file (see here for more info)


I found a slightly different way to do this here (using a 80-extension-xdebug.ini file) but i don't think that's completely necessary - but here is my full ini block (it should be the same in the php.ini file)

[xdebug]
zend_extension=/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.idekey=ECLIPSE_XDEBUG
xdebug.collect_vars=1
xdebug.collect_params=4; 0=default min, 4 max info

But first you have to have a compiled version of xdebug, and there are several available (here for instance) prebuilt for all platforms, including Intel Mac, but i couldn't get any of them to work.

Mac peculiarities

For the non-Mac platforms this should now all work as expected but the Mac version of xdebug seems to have compatibility problems with later versions of PDT (e.g. we need PDT 1.0.2), and you need to build a slightly old version of xdebug specifically match your system apparently. So... deep breath, and:


Now according to the instructions to compile xdebug you need to run phpize (on the source directory). This needs something called autoconf, which in turn needs something called m4 (I said it was grim). These seem to be included in Leopard so the next two steps are for Tiger only.

  • So download the m4 source and build it (basically ./configure; make; sudo make install but the instructions are in the INSTALL file) (Tiger only)

  • Then download autoconf from here and again do ./configure; make; sudo make install (Tiger only)

  • Now you should be able to build xdebug, first you have to cd to the xdebug source dir and run "phpize". It has to be the right version of phpise so on my system I have to do
    /usr/local/php5/bin/phpize
    because we are using Entropy PHP 5%%%For Leopard I had to do
    sudo /usr/local/php5/bin/phpize

  • Then again because of my setup I have to do
    ./configure --enable-xdebug --with-php-config=/usr/local/php5/bin/php-config
    make
    For Leopard you seem to need an extra directive like this:
    CFLAGS='-arch x86_64' ./configure --enable-xdebug --with-php-config=/usr/local/php5/bin/php-config
    make
    Thanks for this tip - it came from here where you will find complete instructions.

  • This builds the file xdebug-2.0.2/modules/xdebug.so which you need to copy to somewhere Apache can find it (/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug for me)


This works as of June 2008, but i'm sure soon there will be an easier way to get there but I really have to get on with some actual debugging now!

Ok, so did it work?


Open phpinfo() in your browser - there's one on the TikiWiki admin menu - for instance http://localhost/tiki/tiki-phpinfo.php and you should see a block about xdebug showing the version and properties. If not something went wrong, probably with the phpize bit.

Then open Eclipse and set up a "PHP Web Page" debug session - there are several pages to show you how here.
Don't forget you're setting up a PHP web page debugger using PDT and XDebug (don't get lost in the Java debugging stuff)


Sorry this is short of screen-shots and possibly a little more conusing than it need be - I will try to tidy it up soon... promise.
Hope it helps!


Page last modified on Friday 20 September, 2019 16:20:07 GMT-0000

doc.tiki.org

Get Started

Admin Guide User Guide Bootstrap in Tiki

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Trackers
Transitions
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki