This page gives some tips on using XAMPP and Aptana Studio together to create a development environment on your machine to run, fix and commit changes to Tiki. See the Commit Code page for step-by-step instructions on how to commit code changes to the Tiki project.
The good thing about these programs is that they are multi-platform (they work on LINUX, Mac, Solaris and Windows machines) and, being packages, they minimize the number of programs that need to be installed. And one more thing: they're both open source and free!
Install XAMPP
XAMPP combines all the programs you need to make your machine a server that can run a Tiki site locally just like an internet site: PHP, MySQL, Apache, phpMyAdmin, etc. Installation is simple - below are the steps by platform (so far, just Windows).
Through Terminal (Applications > Accessories > Terminal), navigate to the directory where the download was placed (usually the Downloads folder).
Give yourself "root" privileges (XAMPP must be installed by root) by typing in the following in the Terminal:
Copy to clipboard
sudo -s
Type in the command to extract the compressed file to the opt folder (substitute the actual name of the dowloaded file for FILENAME):
Copy to clipboard
tar xvfz [FILENAME] -C /opt
Start XAMPP by using this command:
Copy to clipboard
/opt/lampp/lampp start
If you have permission problems after installing, try the following commands to grant all permissions (777) to all folders under the htdocs folder, and more restricted permissions (644) to all files under htdocs:
Copy to clipboard
find /opt/lampp/htdocs/ -type d -exec chmod 777 {} \;
find /opt/lampp/htdocs/ -type f -exec chmod 644 {} \;
Linking to another folder and placing files here can also help avoid permission problems:
The XAMPP for Linux site above also has good instructions. There's a YouTube tutorial on this here.
For Macs
The installation process is very simple and the instructions at XAMPP for Mac explain it well.
Install Aptana Studio
Aptana is quite powerful so there's more of a learning curve to getting used to it than a simple code editor, but it definitely pays off in the end. Here are some of its features:
Code editing:
Editors for different languages
Syntax error highlighting as you type
Syntax help and link to documentation
Syntax validation throughout entire project
Highlight a function call and press F3 to go to the function code
SVN
Full features including browsing the repository, comparing versions, viewing history, etc.
SSH/Shell access (uses PuTTy)
FTP
Debugger
Database utility
File manager
Installing the main program
For Windows and Mac, the installation process is straightforward, just download from www.aptana.com and follow installer instrucions.
For Linux, the main thing to note is you'll need to make sure that Java Runtime is installed first by going to System > Administraton > Synaptic Package Manager and installing the following (where X stands for the version): sun-javaX-jre and sun-javaX-plugin (other related apps will automatically be installed as well). There's a good YouTube tutorial on installing Aptana on Linux here.
Set Workspace
To work together with XAMPP, you should set your Workspace to be where your Xampp document root is (instead of using the default location) by doing the following:
Go to File > Switch Workspace > Other... and enter the path to the htdocs folder or browse to it. Below are the typical paths:
Windows: C:\xampp\htdocs
Linux: /opt/lampp/htdocs
Mac: /Applications/XAMPP/xamppfiles/htdocs
For Linux and Mac, you'll probably need to adjust the permissions for the htdocs folder and the items in that folder in order for Aptana to be able to work with it. Grant full read and write permissions to all users and everyone.
Install plugins
The first thing you'll need to do after installing the main program is install several plugins. You should see an internal page called "My Studio" when you first bring up the program (if you don't, bring it up by going to Window > My Studio). Then click on "Plugins" and go from there, or click on "View Plugin Manager" to add plugins from there.
Here's a screenshot of how the Plugin Manager looks (usually shows up in the bottom panel):
(Note: In Aptana 2, plugins can be added by selecting Help, Install New Software)
Screenshot of Plugin Manager
Here are the plugins you should install at a minimum:
PHP Development Tools
Subversive or Subclipse (for SVN)
Here are additional plugins you may want install (optional):
Although instructions refer to Eclipse, the exact same steps apply to Aptana Studio
Associate *.tpl files with the Smarty editor by doing the following:
Go to Window > Preferences > General > Editors > File Associations
Add *.tpl as a file association type if necessary
Make the Smarty editor the default editor
Quantum Database Utility
In addition to installing this plugin, you'll need to download and install another file as explained here.
Allows you to connect to the MySQL database separately and run queries, etc.
Get used to Perspectives
Instead of showing all features and panels on one screen, Aptana uses "perspectives" that vary the screen and toolbars according to what you're focused on at the moment (for example, debugging, SVN, etc.). You'll need to get used to these so try them out by going to the top right and opening various ones. Here's a screenshot showing where to click to open a new perspective:
Plugin Image
File not found.
If you've changed the layout of a perspective and you like it, it's a good idea to save it by going to Window > Save Perspective As... and then clicking OK on the popup that comes up (no need to rename unless you want to set up a separate perspective).
Settings
Most settings can be made under Preferences or by right-clicking and selecting properties. On Windows and Linux, Preferences appears under the Window menu; on the Mac it appears under the Aptana Studio menu.
The search box under Preferences is very handy given the number of settings.
Unix Line Delimiters
Warning
One important setting is to use Unix line delimiters:
Go to Window > Preferences (Mac: Aptana Studio > Preferences)
In the pop-up, select General > Workspace
Under "New text file line delimiter" on that screen, select the "Other" radio button and select "Unix" from the dropdown menu
Click "Apply" and "OK"
This is important - using something other than Unix line delimiters causes fatal errors in Tiki.
External Web Servers
Usually it's best to have a stand-alone browser program launch separately when debugging. Following are the settings needed to effect that:
Go to Window > Preferences (Mac: Aptana Studio > Preferences)
In the pop-up, select General > Web Browser
Check Use external browser
Click Default system Web Browser to use your default browser
Click New... or Edit... to add or edit another browser. In the screen that pops up, add the location and parameter information as described further below for each type of operating system.
Windows
You just need to enter the path the the browser executable file as the location. For example, C:\Program Files\Internet Explorer\iexplore.exe
Mac
For Macs, you can't just use the path to the browser's executable file. Input the following instead:
Browser
Location
Parameters
Safari
/usr/bin/open
-a safari %URL%
Firefox
/usr/bin/open
-a /Applications/Firefox.app %URL%
The jQuery Sortable Tables feature must be activated for the sort feature to work.
Here's a screenshot:
Plugin Image
File not found.
There's more information on debugging-related settings in the debugging section below under Aptana settings.
Add Tiki as a Project
Something like Tiki is best handled as a project in Aptana as described below.
New Tiki Project from SVN
First add the Tiki repository to Aptana by switching to the SVN Repository Exploring perspective (
) and then going to File > New > Repository Location (
)
In the Enter Repository Location Information window that pops up, enter "https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki" as the URL for the repository, a custom label (optional) and your SourceForge username and password and then click Finish. Here's a screenshot:
This repository that includes all Tiki resources (trunk, branches, etc.) will now be available to choose from for any future Tiki project you want to add to Aptana.
Go to File > New > Project... > SVN > Project from SVN to get the wizard started for selecting a specific Tiki resource for a project:
After clicking next, make sure the Tiki repository and the Use existing repository location button are selected on the next window (shown below) and click Next:
Plugin Image
File not found.
On the next window, click on Browse and select a base resource (such as trunk) on the window that pops up (shown below):
Click OK on the above Select base resource window, which will take you back to the Select Resource window. Make sure Head Revision is selected and then click Finish. Note: If the Finish button is grayed out on the Select Resource window, just click back and forth on the radio buttons under Revision and it should become active.
After selecting the resource, click Finish on the Check Out As popup that comes up in order to "Check out as a project using the New Project Wizard." Here's a screenshot:
Plugin Image
File not found.
This should take you back to selecting a project type, this time choose PHP > PHP Project to get this wizard started.
The project name you choose on the next screen will also be the name of the folder under xampp
Existing Project
If you already have an XAMPP Tiki installation that you want to use Aptana with, please view this video on how to do that. You'll need to show the "Project Explorer" view to be able to follow the tutorial.
Project Build Path
To provide all the cool code assist features, Aptana does project builds, where background validation and other routines are run. The default is for these to run automatically. You can speed this process up for the initial build by excluding files that won't need debugging (like image files) by doing the following:
This seems to have been fixed now, but at one time the build could get hung up trying to run the "Aptana Unified Builder". If that's happening to you, turn off automatic building by going to Project > Build Automatically to uncheck it. Then deselect this builder by:
Right-clicking the main project folder in the tree
Selecting Properties
Selecting Builders in the pop-up
De-selecting Aptana Unified Builder in the list of builders
If you experience this problem, you may need to start over setting up the project, being sure to turn off Build Automatically first.
PHP Debugger
One of the main reasons to use a program like Aptana is to be able to debug the code using a debugging program. Below are steps on how to set a debugger up.
Xdebug
Locate the Xdebug file that comes with XAMPP
The Xdebug file will be in the extension directory, which can be found on the phpinfo page in the "PHP Core" section under extension_dir. (To get to the phpinfo() page, go to localhost/xampp and then click on phpinfo() in the left menu bar). Here's a screenshot showing where the extension directory is:
This path will be added to the php.ini file in the steps below.
Open the php.ini file to edit it.
The location of the file is shown on phpinfo() in the first section as "Loaded configuration file." here's a screenshot:
Add or uncomment (by removing the semi-colon (😉 at the beginning of the line) the following lines in the Xdebug section of the php.ini file. For the first line, use the Xdebug file path identified in step 1.
Copy to clipboard
[XDebug]
;Use your actual path and file name for the Xdebug file in the first line.
;The path shown below is a typical Windows path
;- Unix and Mac Xdebug files will be named something like xdebug.so.
;If not using thread safe, then use zend_extension (without the _ts at the end)
zend_extension_ts=C:\xampp\php\ext\php_xdebug.dll
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.idekey=ECLIPSE_DBGP
Warning
Make sure there are no stray lines anywhere else in the php.ini file, such as extension=php_xdebug.dll (with Windows), which could override the lines above. If there are, comment them out by placing a semi-colon at the beginning of the line.
Restart the server software (Apache, for example). The server software should be restarted anytime changes are made to php.ini.
Final check
You'll know that Xdebug has been properly installed when you see the following credit at the end of the first info block on the phpinfo page:
For the Windows binaries, it's important to download the one that matches your PHP build: PHP version, compiler (VCx) version and whether it has thread safety enabled. The binary should also match the bit version (32 or 64) of the Windows version you are running. The PHP information can be found on the phpinfo screen (at http://localhost/xampp/phpinfo.php) as follows:
Plugin Image
File not found.
For Mac
Xdebug doesn't provide binaries for the Mac. Just search the internet for a web site that has it (for example, here under "PHP Remote Debugging").
Download the file to the extension directory to replace the Xdebug file is that comes with XAMPP.
Aptana settings
There are several important settings that need to be made for the debugging functons in Aptana to work:
Check debugger settings
Under the Window menu (Aptana Studio menu with the Mac), go to Preferences > PHP > Debug > Installed Debuggers
Select the debugger you want to configure (Zend or Xdebug) and click on the "Configure" button
For Xdebug, configure the following:
Make sure the port is set to 9000 (and that it matches the setting in php.ini)
Check "Use Multisession"
Here's a screenshot:
Plugin Image
File not found.
Optionally, associate your PHP executable with a debugger (this may not be necessary)
This is a bit of a guessing game, but you'll need to locate the file that executes php within xampp.
In Windows, it will be a .dll file. With xampp 1.7.1 it was C:\xampp\apache\bin\php5apache2.dll. Starting with 1.7.2 it moved to C:\xampp\php\phpts.dll.
With a Mac, in version 1.7.3 the file path was /Applications/XAMPP/xamppfiles/bin/php-5.3.1
Once you've found it:
Under the Window menu (Aptana Studio menu with the Mac), go to Preferences > PHP > PHP Executables
Click on the "Add..." button and enter the path to the executable and select your debugger (zend or xdebug). Here's a screenshot:
Other settings
There are a ton of settings under Preferences, but here's a couple of key ones:
Preferences > PHP > PHP Interpreter: make sure this is set to the PHP version you're using
Preferences > PHP > PHP Servers: be sure the Workspace default is set to http://127.0.0.1 or http://localhost
Preferences > PHP > Debug > Workbench Options: uncheck Open PHP Debug Views (Debug Output, Browser Output) to keep these views from opening during debugging
Debug Configuration
Now you're ready to set up a debug configuration:
In the "PHP Debug Perspective", click on the debug icon at the top left of the toolbar (it's a little green bug)
Select Debug Configurations...
Click on PHP Web Page in the left tree menu
Click on the "new" button at the top left
Enter a name for the project and a file to be opened. It's usually best to leave this as tiki-index.php and you can navigate from this page to others with the debugger running.
Then click "Apply" and "Debug"
In the future this configuration will be available in the debug dropdown
Here's a screenshot of the debug configuration window:
Tutorial
If you're not familiar with using a debugger to step through code, there's decent beginner tutorial in Aptana help called "Working with the Debugger." Just go to Aptana help and type that phrase in and it gives you the code for a file to debug and walks you through some debugging steps.
Troubleshooting
If the debugger doesn't work in Aptana even though it shows as being installed properly in phpinfo(), you might try the following:
Look in the Apatana error log at htdocs/.megadta/.log
If you're seeing an error that the debugger can't use a port number (say 10000), and that port number is the same as used for the Zend debugger, then change the Zend debugger's port number to a different number
SVN
Just remember Team. All of the familiar SVN functions (commit, update, switch, etc.) can be accessed by right-clicking on any folder or file and then selecting Team in the context menu.
If you like to watch the files scroll by during an update, you can see that in the console view, which is usually in the bottom panel. If not, you can activate it by going to Window > Show View > Console. If you're still not seeing it, you may need to select SVN in the console selector. Here's a sceenshot:
Plugin Image
File not found.
The "Show History" option in the Team menu is very useful. Individual revisions for a file can be right-clicked and changes shown versus a previous revision.
There is also an SVN perspective, which allows you to navigate through the repository, among other features.
This page gives some tips on using [http://www.apachefriends.org/en/xampp.html|XAMPP] and [http://www.aptana.org/|Aptana Studio] together to create a development environment on your machine to run, fix and commit changes to Tiki. See the ((Commit Code)) page for step-by-step instructions on how to commit code changes to the Tiki project.
The good thing about these programs is that they are multi-platform (they work on LINUX, Mac, Solaris and Windows machines) and, being packages, they minimize the number of programs that need to be installed. And one more thing: they're both open source and free!
! Install XAMPP {img fileId=2229 height="32"}
XAMPP combines all the programs you need to make your machine a server that can run a Tiki site locally just like an internet site: PHP, MySQL, Apache, phpMyAdmin, etc. Installation is simple - below are the steps by platform (so far, just Windows).
!! For Windows Machines
# Go to [http://www.apachefriends.org/en/xampp-windows.html|XAMPP for Windows] and download the self-extracting version
+ %%%
# Double click to install.
## Leave destination folder as ''C:\''
## Do not create an xampp folder, it will be created for you.
+ Here's a screenshot:
+
+ {img fileId=2259 thumb="mouseover"}
+ %%%
# Answer questions in setup pop-up that appears
+ %%%
# Start the control panel, which is at ''C:\xampp\xampp-control.exe''
## Make sure previous Windows services are deleted
## Turn on Apache and MySQL
## Set up as Windows services if you want the xampp server to be running when you boot up
++
++ This screenshot illustrates the above steps:
++
++ {img attId="116" thumb="mouseover"}
There's a YouTube tutorial on this [http://www.youtube.com/watch?v=vQNWjzY8nGo|here]
!! For Linux Machines
# Go to [http://www.apachefriends.org/en/xampp-linux.html|XAMPP for Linux] and download the latest version.
+ %%%
# Through Terminal (''Applications > Accessories > Terminal''), navigate to the directory where the download was placed (usually the ''Downloads'' folder).
+ %%%
# Give yourself "root" privileges (XAMPP must be installed by root) by typing in the following in the Terminal:
+ {CODE(colors=bash)}sudo -s{CODE}
+
# Type in the command to extract the compressed file to the ''opt'' folder (substitute the actual name of the dowloaded file for FILENAME):
+ {CODE(colors=bash)}tar xvfz [FILENAME] -C /opt{CODE}
+
# Start XAMPP by using this command:
+ {CODE(colors=bash)}/opt/lampp/lampp start{CODE}
+
# If you have permission problems after installing, try the following commands to grant all permissions (777) to all folders under the ''htdocs'' folder, and more restricted permissions (644) to all files under ''htdocs'':
+ {CODE(colors="bash")}find /opt/lampp/htdocs/ -type d -exec chmod 777 {} \;
find /opt/lampp/htdocs/ -type f -exec chmod 644 {} \;{CODE}
+ Linking to another folder and placing files here can also help avoid permission problems:
+ {CODE(colors=bash)}sudo ln -s /home/[yourusername]/folder /opt/lampp/htdocs/$USER {CODE}
The [http://www.apachefriends.org/en/xampp-linux.html|XAMPP for Linux] site above also has good instructions. There's a YouTube tutorial on this [http://www.youtube.com/watch?v=-CsDoEPJg4U|here].
!! For Macs
The installation process is very simple and the instructions at [http://www.apachefriends.org/en/xampp-macosx.html|XAMPP for Mac] explain it well.
! Install Aptana Studio {img attId=148}
Aptana is quite powerful so there's more of a learning curve to getting used to it than a simple code editor, but it definitely pays off in the end. Here are some of its features:
* Code editing:
** Editors for different languages
** Syntax error highlighting as you type
** Syntax help and link to documentation
** Syntax validation throughout entire project
** Highlight a function call and press F3 to go to the function code
* SVN
** Full features including browsing the repository, comparing versions, viewing history, etc.
* SSH/Shell access (uses PuTTy)
* FTP
* Debugger
* Database utility
* File manager
!! Installing the main program
For Windows and Mac, the installation process is straightforward, just download from [http://www.aptana.com|www.aptana.com] and follow installer instrucions.
For Linux, the main thing to note is you'll need to make sure that Java Runtime is installed first by going to ''System > Administraton > Synaptic Package Manager'' and installing the following (where X stands for the version): sun-javaX-jre and sun-javaX-plugin (other related apps will automatically be installed as well). There's a good YouTube tutorial on installing Aptana on Linux [http://www.youtube.com/watch?v=7ncbtao2HD0|here].
!! Set Workspace
To work together with XAMPP, you should set your Workspace to be where your Xampp document root is (instead of using the default location) by doing the following:
* Go to ''File > Switch Workspace > Other...'' and enter the path to the __htdocs__ folder or browse to it. Below are the typical paths:
** Windows: __C:\xampp\htdocs__
** Linux: __/opt/lampp/htdocs__
** Mac: __/Applications/XAMPP/xamppfiles/htdocs__
For Linux and Mac, you'll probably need to adjust the permissions for the htdocs folder and the items in that folder in order for Aptana to be able to work with it. Grant full read and write permissions to all users and everyone.
!! Install plugins
The first thing you'll need to do after installing the main program is install several plugins. You should see an internal page called "My Studio" when you first bring up the program (if you don't, bring it up by going to ''Window > My Studio''). Then click on "Plugins" and go from there, or click on "View Plugin Manager" to add plugins from there.
Here's a screenshot of how the Plugin Manager looks (usually shows up in the bottom panel):
(Note: In Aptana 2, plugins can be added by selecting Help, Install New Software)
{img fileId=2257 width="600" desc="desc"}
Here are the plugins you should install at a minimum:
* PHP Development Tools
* Subversive or Subclipse (for SVN)
Here are additional plugins you may want install (optional):
* Ajax Libraries (all)
* Smarty Editor
** Must be downloaded separately from [http://code.google.com/p/smartypdt/]
** Before attempting to install, you may need to add the Eclipse file repository so you can gather required components
** For Aptana Studio 3:
*** Help > Install New Software
*** click the "Available Software Sites" link
*** enable Eclipse Helios Update Site
** After downloading, follow instructions at [http://code.google.com/p/smartypdt/wiki/InstallSmartyPDT]
*** Although instructions refer to Eclipse, the exact same steps apply to Aptana Studio
** Associate ''*.tpl'' files with the Smarty editor by doing the following:
*** Go to ''Window > Preferences > General > Editors > File Associations''
*** Add ''*.tpl'' as a file association type if necessary
*** Make the Smarty editor the default editor
* Quantum Database Utility
** In addition to installing this plugin, you'll need to download and install another file as explained [https://aptanastudio.tenderapp.com/faqs/tools-and-utilities/quantum-db|here].
** Allows you to connect to the MySQL database separately and run queries, etc.
!! Get used to Perspectives
Instead of showing all features and panels on one screen, Aptana uses "perspectives" that vary the screen and toolbars according to what you're focused on at the moment (for example, debugging, SVN, etc.). You'll need to get used to these so try them out by going to the top right and opening various ones. Here's a screenshot showing where to click to open a new perspective:
{img attId="118" desc="desc"}
If you've changed the layout of a perspective and you like it, it's a good idea to save it by going to ''Window > Save Perspective As...'' and then clicking OK on the popup that comes up (no need to rename unless you want to set up a separate perspective).
!! Settings
Most settings can be made under ''Preferences'' or by right-clicking and selecting properties. On Windows and Linux, ''Preferences'' appears under the ''Window'' menu; on the Mac it appears under the ''Aptana Studio'' menu.
The search box under ''Preferences'' is very handy given the number of settings.
!!! Unix Line Delimiters
{REMARKSBOX(type=warning, title=Warning)}One important setting is to use Unix line delimiters:
# Go to ''Window > Preferences'' (Mac: ''Aptana Studio > Preferences'')
# In the pop-up, select ''General > Workspace''
# Under "New text file line delimiter" on that screen, select the "Other" radio button and select "Unix" from the dropdown menu
# Click "Apply" and "OK"
This is important - using something other than Unix line delimiters causes fatal errors in Tiki.
{REMARKSBOX}
!!! External Web Servers
Usually it's best to have a stand-alone browser program launch separately when debugging. Following are the settings needed to effect that:
# Go to ''Window > Preferences'' (Mac: ''Aptana Studio > Preferences'')
# In the pop-up, select ''General > Web Browser''
# Check __Use external browser__
# Click __Default system Web Browser__ to use your default browser
# Click ''New...'' or ''Edit...'' to add or edit another browser. In the screen that pops up, add the location and parameter information as described further below for each type of operating system.
!!!! Windows
You just need to enter the path the the browser executable file as the location. For example, {DIV(type=span class=inline_syntax)}C:\Program Files\Internet Explorer\iexplore.exe{DIV}
!!!! Mac
For Macs, you can't just use the path to the browser's executable file. Input the following instead:
{FANCYTABLE(head="__Browser__|__Location__|__Parameters__")}
Safari| ~np~/~/np~usr/bin/open|-a safari %URL%
Firefox| ~np~/~/np~usr/bin/open|-a /Applications/Firefox.app %URL%
{FANCYTABLE}
Here's a screenshot:
{img attId=150 thumb=mouseover}
There's more information on debugging-related settings in the debugging section below under [#Aptana_settings|Aptana settings].
! Add Tiki as a Project
Something like Tiki is best handled as a project in Aptana as described below.
!! New Tiki Project from SVN
# First add the Tiki repository to Aptana by switching to the ''SVN Repository Exploring'' perspective ({img fileId=2235}) and then going to ''File > New > Repository Location'' ({img attId=144})
** In the __Enter Repository Location Information__ window that pops up, enter "https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki" as the URL for the repository, a custom label (optional) and your SourceForge username and password and then click ''Finish''. Here's a screenshot:
++
++ {img fileId=2233 thumb="mouseover"}
++
+ This repository that includes all Tiki resources (trunk, branches, etc.) will now be available to choose from for any future Tiki project you want to add to Aptana.
+ %%%
# Go to ''File > New > Project... > SVN > Project from SVN'' to get the wizard started for selecting a specific Tiki resource for a project:
+
+ {img fileId=2255 thumb="mouseover"}
+ %%%
# After clicking next, make sure the Tiki repository and the ''Use existing repository location'' button are selected on the next window (shown below) and click ''Next'':
+
+ {img attId="146" thumb="mouseover"}
+ %%%
# On the next window, click on ''Browse'' and select a base resource (such as trunk) on the window that pops up (shown below):
+
+ {img fileId=2231 thumb="mouseover"}
+ %%%
# Click ''OK'' on the above __Select base resource__ window, which will take you back to the __Select Resource__ window. Make sure ''Head Revision'' is selected and then click ''Finish''. ''__Note:__ If the Finish button is grayed out on the __Select Resource__ window, just click back and forth on the radio buttons under Revision and it should become active.''
+ %%%
# After selecting the resource, click Finish on the __Check Out As__ popup that comes up in order to "Check out as a project using the New Project Wizard." Here's a screenshot:
+
+ {img attId="120" thumb="mouseover"}
+ %%%
# This should take you back to selecting a project type, this time choose ''PHP > PHP Project'' to get this wizard started.
** The project name you choose on the next screen will also be the name of the folder under xampp
!! Existing Project
If you already have an XAMPP Tiki installation that you want to use Aptana with, please view this [http://www.vimeo.com/6887760|video] on how to do that. You'll need to show the "Project Explorer" view to be able to follow the tutorial.
!! Project Build Path
To provide all the cool code assist features, Aptana does ''project builds'', where background validation and other routines are run. The default is for these to run automatically. You can speed this process up for the initial build by excluding files that won't need debugging (like image files) by doing the following:
# Right-click the project folder
# Select ''Build Path > Configure Inclusion / Exclusion Filters...''
# Click on "Add Multiple" under the Exclusion patterns
# Select the folders to exclude. For instance:
** images, img, pics, temp, templates_c, templates
!!!- Hanging during build
This seems to have been fixed now, but at one time the build could get hung up trying to run the "Aptana Unified Builder". If that's happening to you, turn off automatic building by going to ''Project > Build Automatically'' to uncheck it. Then deselect this builder by:
* Right-clicking the main project folder in the tree
* Selecting Properties
* Selecting Builders in the pop-up
* De-selecting Aptana Unified Builder in the list of builders
If you experience this problem, you may need to start over setting up the project, being sure to turn off ''Build Automatically'' first.
! PHP Debugger
One of the main reasons to use a program like Aptana is to be able to debug the code using a debugging program. Below are steps on how to set a debugger up.
!! Xdebug
# Locate the Xdebug file that comes with XAMPP
+ The Xdebug file will be in the extension directory, which can be found on the phpinfo page in the "PHP Core" section under __extension_dir__. (To get to the phpinfo() page, go to ''localhost/xampp'' and then click on __phpinfo()__ in the left menu bar). Here's a screenshot showing where the extension directory is:
+
+ {img fileId=2253 width="600"}
+
+ This path will be added to the ''php.ini'' file in the steps below.
+ %%%
# Open the php.ini file to edit it.
+ The location of the file is shown on phpinfo() in the first section as "Loaded configuration file." here's a screenshot:
+
+ {img attId="122"}
+ %%%
# Add or uncomment (by removing the semi-colon (;) at the beginning of the line) the following lines in the Xdebug section of the php.ini file. For the first line, use the Xdebug file path identified in step 1.
+ {CODE(wrap=1 colors=ini)}
[XDebug]
;Use your actual path and file name for the Xdebug file in the first line.
;The path shown below is a typical Windows path
;- Unix and Mac Xdebug files will be named something like xdebug.so.
;If not using thread safe, then use zend_extension (without the _ts at the end)
zend_extension_ts=C:\xampp\php\ext\php_xdebug.dll
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.idekey=ECLIPSE_DBGP{CODE}
+ {REMARKSBOX(type=warning title=Warning)}Make sure there are no stray lines anywhere else in the php.ini file, such as ''extension=php_xdebug.dll'' (with Windows), which could override the lines above. If there are, comment them out by placing a semi-colon at the beginning of the line.{REMARKSBOX}
# Restart the server software (Apache, for example). The server software should be restarted anytime changes are made to php.ini.
+ %%%
# Final check
+ You'll know that Xdebug has been properly installed when you see the following credit at the end of the first info block on the phpinfo page:
+
+ {img fileId=2251 width="600"}
!!!- (optional) Download another version of Xdebug
XAMPP comes with a version if Xdebug, but if you want to use a later or different version, do the following:
# Download Xdebug binaries
** For Windows
*** Download from [http://xdebug.org/download.php]
*** For the Windows binaries, it's important to download the one that matches your PHP build: PHP version, compiler (VCx) version and whether it has thread safety enabled. The binary should also match the bit version (32 or 64) of the Windows version you are running. The PHP information can be found on the phpinfo screen (at ''http://localhost/xampp/phpinfo.php'') as follows:
+++
+++ {img attId="124" thumb="mouseover"}
+++ %%%
** For Mac
++ Xdebug doesn't provide binaries for the Mac. Just search the internet for a web site that has it (for example, [http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging|here] under "PHP Remote Debugging").
+
# Download the file to the extension directory to replace the Xdebug file is that comes with XAMPP.
!! Aptana settings
There are several important settings that need to be made for the debugging functons in Aptana to work:
# Check debugger settings
## Under the ''Window'' menu (''Aptana Studio'' menu with the Mac), go to ''Preferences > PHP > Debug > Installed Debuggers''
## Select the debugger you want to configure (Zend or Xdebug) and click on the "Configure" button
## For Xdebug, configure the following:
*** Make sure the port is set to 9000 (and that it matches the setting in php.ini)
*** Check "Use Multisession"
+++ Here's a screenshot:
+++
+++ {img attId="126" thumb="mouseover"}
+++ %%%
# Optionally, associate your PHP executable with a debugger (this may not be necessary)
+ This is a bit of a guessing game, but you'll need to locate the file that executes php within xampp.
** In Windows, it will be a ''.dll'' file. With xampp 1.7.1 it was ''C:\xampp\apache\bin\php5apache2.dll''. Starting with 1.7.2 it moved to ''C:\xampp\php\phpts.dll''.
** With a Mac, in version 1.7.3 the file path was ''/Applications/XAMPP/xamppfiles/bin/php-5.3.1''
+ Once you've found it:
## Under the ''Window'' menu (''Aptana Studio'' menu with the Mac), go to ''Preferences > PHP > PHP Executables''
## Click on the "Add..." button and enter the path to the executable and select your debugger (zend or xdebug). Here's a screenshot:
++
++ {img fileId=2249 thumb="mouseover"}
++ %%%
# Other settings
+ There are a ton of settings under ''Preferences'', but here's a couple of key ones:
** ''Preferences > PHP > PHP Interpreter'': make sure this is set to the PHP version you're using
** ''Preferences > PHP > PHP Servers'': be sure the Workspace default is set to ''http://127.0.0.1'' or ''http://localhost''
** ''Preferences > PHP > Debug > Workbench Options'': uncheck __Open PHP Debug Views (Debug Output, Browser Output)__ to keep these views from opening during debugging
!! Debug Configuration
Now you're ready to set up a debug configuration:
# In the "PHP Debug Perspective", click on the debug icon at the top left of the toolbar (it's a little green bug)
# Select ''Debug Configurations...''
# Click on ''PHP Web Page'' in the left tree menu
# Click on the "new" button at the top left
# Enter a name for the project and a file to be opened. It's usually best to leave this as ''tiki-index.php'' and you can navigate from this page to others with the debugger running.
# Then click "Apply" and "Debug"
# In the future this configuration will be available in the debug dropdown
+
+ Here's a screenshot of the debug configuration window:
+
+ {img fileId=2247 thumb="mouseover"}
!! Tutorial
If you're not familiar with using a debugger to step through code, there's decent beginner tutorial in Aptana help called "Working with the Debugger." Just go to Aptana help and type that phrase in and it gives you the code for a file to debug and walks you through some debugging steps.
!! Troubleshooting
If the debugger doesn't work in Aptana even though it shows as being installed properly in ''phpinfo()'', you might try the following:
* Look in the Apatana error log at ''htdocs/.megadta/.log''
* If you're seeing an error that the debugger can't use a port number (say 10000), and that port number is the same as used for the Zend debugger, then change the Zend debugger's port number to a different number
! SVN
Just remember ''Team.'' All of the familiar SVN functions (commit, update, switch, etc.) can be accessed by right-clicking on any folder or file and then selecting ''Team'' in the context menu.
If you like to watch the files scroll by during an update, you can see that in the console view, which is usually in the bottom panel. If not, you can activate it by going to ''Window > Show View > Console''. If you're still not seeing it, you may need to select SVN in the console selector. Here's a sceenshot:
{img attId="128" thumb="mouseover"}
The "Show History" option in the Team menu is very useful. Individual revisions for a file can be right-clicked and changes shown versus a previous revision.
There is also an SVN perspective, which allows you to navigate through the repository, among other features.
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.