Daniel Howard - 2011-11-20

How to develop and debug ajaximrpg

1. Install Java http://java.oracle.com/

I'm using jdk-7u21-windows-i586.exe for now.

2. Unzip Eclipse http://eclipse.org/pdt/downloads/

I'm using eclipse-php-3.0.2.v20120611144-Win32.zip.

Follow the "Download All-In-One package including Eclipse 3.7.2 and PDT 3.0.2 from Zend" link to get eclipse-php-3.0.2.v20120611144-Win32.zip.

I unzip to C:\ and then create a shortcut to C:\eclipse-php\eclipse-php.exe on my Desktop.

Don't run Eclipse yet.

3. Install ZendServer-CE http://eclipse.org/pdt/downloads/

I'm using ZendServer-6.0.1-php-5.4.11-Windows_x86.exe.

Follow the "Zend Server CE" link to get ZendServer-6.0.1-php-5.4.11-Windows_x86.exe.

Use default (sensible) selections until the "Setup Type" page.

Select "Custom" radio button in "Setup Type" page (instead of "Typical") and press the "Next" button.

Uncheck "Oracle OCI Driver" from the "Custom Setup" page.

Check "MySQL Server (separate download)" from the "Custom Setup" page.

Use default selections until the installer finishes.

Then, configure the Apache server using your browser.

Select the "Development" radio button from the "Zend Server Launch Options" page.

Type in passwords for both the admin and the developer on the "Set the passwords for accessing Zend Server" page.

Use default selections until the configuration finishes.

(The MySQL "root" password is "", the empty string, by default.)

4. Run Eclipse

Type "C:\Program Files\Zend\Apache2\htdocs" into the "Workspace" edit box.

Check the "Use this as the default and do not ask again" checkbox and press the "OK" button.

5. Install Subclipse http://subclipse.tigris.org/update_1.8.x

Select the "Help|Install New Software..." menu item.

Type "http://subclipse.tigris.org/update_1.8.x" in the "Work with" edit box.

Check everything except uncheck "Subclipse Integration for Mylyn 3.x (Optional)" check box.

Finish the Subclipse installation.

6. Import ajaximrpg https://ajaximrpg.svn.sourceforge.net/svnroot/ajaximrpg

Select "File|Import..." menu item.

Select "SVN|Checkout Projects from SVN" tree item and press the "Next" button.

Choose "Create a new repository location" radio button and press the "Next" button.

Type "https://ajaximrpg.svn.sourceforge.net/svnroot/ajaximrpg" into the "Url" edit box.

Checkout the entire repository.

Press the "Finish" button; the default selections for remaining pages are fine.

Sometimes, Eclipse shows a few errors temporarily until it completely processes the project.

7. Debug ajaximrpg

Select "index.php" tree item in the "PHP Explorer" tab on the left side.

Select "Run|Debug As|PHP Web Application" menu item.

Press "OK" to debug http://localhost/ajaximrpg/index.php .

Press "Resume (F8)" toolbar button to resume. You need to do this twice: once for index.php and once for ajax_act.php. You will need to do this more in the future; by default, it breaks into the debugger every time that it loads a page.

Click the "http://localhost/ajaximrpg/index.php" tab to see the actual ajaximrpg web page.

If you don't want to debug, just point any browser at http://localhost/ajaximrpg/index.php .

(The MySQL "root" password is "", the empty string, by default.)

8. Install browsers

I currently install Firefox Setup 20.0.1.exe, ChromeSetup.exe and SafariSetup.exe.

I also test against IE 6, IE 7, IE 8, IE 9 and IE 10. I run Windows XP SP 3.

Good luck!

If you wish, you can get the Ajax IM project.

9. Install EGit http://download.eclipse.org/egit/updates-1.2

Select the "Help|Install New Software..." menu item.

Type "http://download.eclipse.org/egit/updates-1.2" in the "Work with" edit box.

The "http://download.eclipse.org/egit/updates-1.3" URL exists but doesn't seem to work.

The "http://download.eclipse.org/egit/updates-2.0" URL exists but is incompatible.

Check all the checkboxes.

Finish the EGit installation.

10. Import Ajax IM https://github.com/ajaximrpg/AjaxIM.git

Select "File|Import..." menu item.

Select "Git|Projects from Git" tree item and press the "Next" button.

Ignore the environment variable warning, if any.

Press the "Clone..." button.

Type "https://github.com/ajaximrpg/AjaxIM.git" into the "URI" edit box.

If you have a GitHub account, type user name and password and check the "Store in Secure Store" checkbox and press the "Next" button.

Checkout all branches.

Type "C:\Program Files\Zend\Apache2\htdocs\AjaxIM" into the "Directory" edit box and press the "Next" button.

Finish importing the repository.

Have fun!

Dan


Play: http://www.svexpertise.com/ajaximrpg/server
Code: http://ajaximrpg.sourceforge.net
Tweet: http://www.twitter.com/ajaximrpg
Discuss: http://groups.google.com/group/ajaximrpg
Totally free. Totally easy. Totally open. Play RPGs instantly.

O'Reilly Book: Node.js for PHP Developers: Porting PHP to Node.js by Daniel Howard
http://www.amazon.com/Node-js-PHP-Developers-Porting/dp/1449333605/

 

Last edit: Daniel Howard 2013-04-26