<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gen X Design &#124; Ian Selby &#187; Jaxer</title>
	<atom:link href="http://www.gen-x-design.com/tags/jaxer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gen-x-design.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 15 Jan 2010 21:41:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Working With the Aptana PHP Editor</title>
		<link>http://www.gen-x-design.com/archives/working-with-the-aptana-php-editor/</link>
		<comments>http://www.gen-x-design.com/archives/working-with-the-aptana-php-editor/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 18:23:41 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Aptana]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[aptana tv]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[Jaxer]]></category>

		<guid isPermaLink="false">http://www.gen-x-design.com/?p=253</guid>
		<description><![CDATA[I recently created a screencast for Aptana&#8217;s PHP Editor, and thought I would share it.



I&#8217;m also posting this since we recently relaunched our screencast site, http://tv.aptana.com.  It&#8217;s actually really cool as its running entirely on Aptana Jaxer, and built with the soon-to-be released Active JS framework.  I&#8217;ll soon be posting about the process [...]]]></description>
			<content:encoded><![CDATA[<p>I recently created a screencast for Aptana&#8217;s PHP Editor, and thought I would share it.</p>
<div style="width: 500px; margin: 10px auto 10px auto; background: #000; padding: 3px;">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="500" height="313" id="player_500" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="FlashVars" value="context=embed&#038;base=http://tv.aptana.com/&#038;movie=http%3A%2F%2Ftv.aptana.com%2Fvideos%2Fworking-with-the-php-editor-part-1" /><param name="movie" value="http://tv.aptana.com/images_flash/player_500.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="http://tv.aptana.com/images_flash/player_500.swf" FlashVars="context=embed&#038;base=http://tv.aptana.com/&#038;movie=http%3A%2F%2Ftv.aptana.com%2Fvideos%2Fworking-with-the-php-editor-part-1" quality="high" bgcolor="#000000" width="500" height="313" name="player_500" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>
</div>
<p>I&#8217;m also posting this since we recently relaunched our screencast site, <a href="http://tv.aptana.com" target="_blank">http://tv.aptana.com</a>.  It&#8217;s actually really cool as its running entirely on Aptana Jaxer, and built with the soon-to-be released Active JS framework.  I&#8217;ll soon be posting about the process of creating the site, but for now I&#8217;m happy to say that this is the first (to my knowledge) site written entirely in JavaScript that leverages Jaxer as a back-end for server side JavaScript.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gen-x-design.com/archives/working-with-the-aptana-php-editor/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing Aptana Jaxer on Ubuntu</title>
		<link>http://www.gen-x-design.com/archives/installing-aptana-jaxer-on-ubuntu/</link>
		<comments>http://www.gen-x-design.com/archives/installing-aptana-jaxer-on-ubuntu/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 22:44:25 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Aptana]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Jaxer]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.gen-x-design.com/?p=150</guid>
		<description><![CDATA[
It&#8217;s been a while since I&#8217;ve written about Jaxer, and it&#8217;s a shame, because there&#8217;s been a lot of major changes over the past several months.  Anyway, I&#8217;ve been getting back into server-side javascript hacking, and found myself needing to get Jaxer up and running on a local dev server (and subsequently this one). [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: center"><img style="margin-top: 10px; margin-bottom: 10px; padding: 2px; border: 1px solid #ccc;"src="http://www.gen-x-design.com/wp-content/uploads/2009/01/jaxer-and-ubuntu.png" alt="Install Aptana Jaxer on Ubuntu" title="Install Aptana Jaxer on Ubuntu" width="580" height="120" /></div>
<p>It&#8217;s been a while since I&#8217;ve written about Jaxer, and it&#8217;s a shame, because there&#8217;s been a lot of major changes over the past several months.  Anyway, I&#8217;ve been getting back into server-side javascript hacking, and found myself needing to get Jaxer up and running on a local dev server (and subsequently this one).  You could also always work with Jaxer in Aptana&#8217;s <a href="http://www.aptana.com/cloud" target="_blank">cloud</a>, where you&#8217;d get all the benefits of Jaxer integration with Aptana Studio and deployment workflows (SVN, staging, production, and just plain awesomeness) if you don&#8217;t want to (or need to) install Jaxer yourself.  However, my needs (and presumably yours) required me to go down this route.</p>
<p>So, before we get started, let&#8217;s go over the list of prerequisites and assumptions:</p>
<ul>
<li>You&#8217;re on Ubuntu 8.04 (newer versions should work the same as well)</li>
<li>You&#8217;ve got Apache installed (via aptitude, or you will have to adjust paths accordingly)</li>
<li>You&#8217;ve got root access to your server</li>
</ul>
<p>That&#8217;s about it.  MySQL is also good to have, but not required.  Last thing before we start: many of the steps outlined here came from <a href="http://doc.integrasoftware.it/tec/sis/pub/jaxer" target="_blank">this site</a>, which was contributed by a Jaxer user at Aptana&#8217;s forums.  Right, let&#8217;s get busy&#8230;<br />
<span id="more-150"></span></p>
<h3>Step 1: Get Jaxer</h3>
<p>As you would expect, the first thing we&#8217;ll do is grab the latest version of Jaxer.  However, before we do so, let&#8217;s make sure we know whether we&#8217;re on a 64 or 32-bit version of Ubuntu.  Easy enough, from the command line:</p>
<pre>uname -a</pre>
<p>which outputs something like:</p>
<pre>Linux genxdesign 2.6.24-19-xen #1 SMP Sat Jul 12 00:15:59 UTC 2008 x86_64 GNU/Linux</pre>
<p>You can see, in my case I&#8217;m on 64 bit, as indicated by the &#8220;x86_64&#8243;.  Now that we&#8217;ve got that, we can head over to <a href="http://aptana.com/jaxer/download" target="_blank">http://aptana.com/jaxer/download</a>, and grab the appropriate linux distribution.  Easiest way to do so is to right-click on the link, select &#8220;Copy link location&#8221;, and then use it in the following command on your sever:</p>
<pre>wget [pasted url]</pre>
<p>Of course, you could also download it locally, then unzip and upload it to your server.  I am assuming that you&#8217;re doing all this in your home directory on the server.  Note also that the way the downloads work with Jaxer currently may give you a goofy file with wget.  For example, at the time of writing, my wget url was &#8220;http://ec2-67-202-37-218.compute-1.amazonaws.com/downloads/jaxer/ubu64/Jaxer_package_withApache.zip?version=1.0.1.4310&#038;cb=1000&#8243; which gave me a file called: &#8220;Jaxer_package_withApache.zip?version=1.0.1.4310&#8243; on the file system.  Not an issue, I can fix this by doing:</p>
<pre>mv Jaxer_package_withApache.zip\?version\=1.0.1.4310 jaxer.zip</pre>
<p>Finally, on the server, simply type:</p>
<pre>unzip jaxer.zip</pre>
<p>to unzip the file.</p>
<p>Once the file&#8217;s unzipped or uploaded to your server, we&#8217;ll need to move the contents to their final home in /opt.  So, back in your home directory:</p>
<pre>sudo mv AptanaJaxer/ /opt</pre>
<p>and we&#8217;re golden!</p>
<h3>Step 2: Get the Mozilla Stuff</h3>
<p>This is a bit easier than grabbing Jaxer itself, just one command:</p>
<pre>sudo apt-get install firefox-3.0-dev firefox-dev</pre>
<p>which we&#8217;ll follow with on more to make sure our libraries line up properly:</p>
<pre>sudo ln -s /usr/lib/libexpat.so.1 /usr/lib/libexpat.so.0</pre>
<p>That&#8217;s all we&#8217;ve got to do for Mozilla.  Onward&#8230;</p>
<h3>Step 3: Configure and Start</h3>
<p>Believe it or not, we&#8217;re nearly done.  At this point, we need to slurp out the Apache module configs from the Jaxer directory, and put them in the appropriate place for our Apache on Ubuntu.  Two simple commands will take care of this:</p>
<pre>sudo sh -c "grep '^LoadModule' /opt/AptanaJaxer/jaxer/confs/jaxer-linux.httpd.conf > /etc/apache2/mods-available/jaxer-linux.httpd.load"
sudo sh -c "grep -v '^LoadModule' /opt/AptanaJaxer/jaxer/confs/jaxer-linux.httpd.conf > /etc/apache2/mods-available/jaxer-linux.httpd.conf"</pre>
<p>Now that we&#8217;ve got the module configs in the right place, we can enable the module for Apache by doing the following:</p>
<pre>sudo a2enmod jaxer-linux.httpd</pre>
<p>It will tell you that you need to reload apache.  Don&#8217;t do that just yet.  First, we need to let Jaxer create some directories, so let&#8217;s start Jaxer:</p>
<pre>sudo JAXERBASE=/opt/AptanaJaxer /opt/AptanaJaxer/scripts/startJaxer.sh</pre>
<p>Don&#8217;t worry about any warnings you see, those are just about Jaxer setting things up for the first time (similar to the first run of MySQL in a fresh install).  We can go ahead and stop jaxer now, and then restart Apache:</p>
<pre>sudo JAXERBASE=/opt/AptanaJaxer /opt/AptanaJaxer/scripts/stopJaxer.sh
sudo /etc/init.d/apache2 restart</pre>
<p>if you don&#8217;t get any warnings or errors from Apache, go ahead and start Jaxer again:</p>
<pre>sudo JAXERBASE=/opt/AptanaJaxer /opt/AptanaJaxer/scripts/startJaxer.sh</pre>
<p>and you should be all set!  If there aren&#8217;t any errors being spit out by anything, you can now browse to the Jaxer url on your server: http://yourdomain.com/aptana, and then run the server diagnostics.  If everything&#8217;s working right, you&#8217;ll see some spinners, and then a screen that looks similar to this one:</p>
<div style="text-align: center; margin: 10px; font-size: 10px;"><a href="http://www.gen-x-design.com/wp-content/uploads/2009/01/picture-3.png"><img src="http://www.gen-x-design.com/wp-content/uploads/2009/01/picture-3-300x201.png" alt="Jaxer Server Diagnostics" title="Jaxer Server Diagnostics" width="300" height="201" style="border: 1px solid #ccc; padding: 2px;" /></a><br />click image for larger view</div>
<p>Just a few more things to do now&#8230;</p>
<h3>Step 4: Configure Apache</h3>
<p>Well, what we&#8217;ve currently got is Jaxer set up and running properly, but it isn&#8217;t set up for any of our sites.  To do this, you&#8217;ll have to add a few lines to your vhost configuration(s) wherever you&#8217;d like Jaxer to actually run on your web site.  For this example, I&#8217;ll assume you&#8217;re using the &#8220;default&#8221; site that comes with the standard Apache install on Ubuntu, but you can simply put these lines wherever you need them in your vhost files.</p>
<p>So, what we&#8217;re basically going to do here is tell Apache to use Jaxer as a filter for certain files in our web site.  We do this by adding some directives in the appropriate &#8220;<Directory>&#8221; area of our config.  Let&#8217;s take a look at what a typical config might look like.  If you type the following:</p>
<pre>sudo vi /etc/apache2/sites-available/default</pre>
<p>we&#8217;re looking for a section of the file that looks like:</p>
<pre>&lt;Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All 

        Order allow,deny
        allow from all
&lt;/Directory></pre>
<p>Yours will probably be a bit different, but we&#8217;re basically looking for the directory directive that refers to the document root for this vhost (&#8217;/var/www&#8217; in this case).  Once you&#8217;ve located that, you need to add the following lines anywhere in there:</p>
<pre>JaxerFilter html xhtml htm php
JaxerFilterContentType text/html application/xhtml+xml</pre>
<p>What we&#8217;ve done is told Apache to run any html, xhtml, or php page through Jaxer as a filter (which is what we typically want).  Once you&#8217;ve added these lines, you can stop Jaxer, restart Apache, and start Jaxer again:</p>
<pre>sudo JAXERBASE=/opt/AptanaJaxer /opt/AptanaJaxer/scripts/stopJaxer.sh
sudo /etc/init.d/apache2 restart
sudo JAXERBASE=/opt/AptanaJaxer /opt/AptanaJaxer/scripts/startJaxer.sh</pre>
<p>And that&#8217;s all there is to it!</p>
<h3>A Few More Things&#8230;</h3>
<p>Now that we&#8217;ve got everything running properly, I wanted to share a script to make starting / stopping Jaxer a bit easier, and a gotcha with URL re-writes you need to watch out for.</p>
<p>First, the control script.  I am by no means a bash guru, and this script could use some major improvement.  If you would like to improve upon it, let me know, I&#8217;d greatly appreciate it.  Anyway, it does get the job done just fine.  So, let&#8217;s go ahead and install it:</p>
<pre>wget http://www.gen-x-design.com/downloads/jaxer_control.txt
sudo cp jaxer_control.txt /etc/init.d/jaxer
sudo chmod +x /etc/init.d/jaxer</pre>
<p>Now, you can simply type &#8220;sudo /etc/init.d/jaxer [start|stop]&#8221; to start or stop Jaxer!  Much easier than remembering that crazy sh file location.</p>
<p>Second, URL re-write gotchas.  When I installed Jaxer on this server, I discovered the wordpress rewrite rules were breaking some special Jaxer urls needed for everything to function properly.  Here&#8217;s what a typical offending set of rewrite rules could look like (in a .htaccess file, for example):</p>
<pre>&lt;IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
&lt;/IfModule></pre>
<p>Well, this breaks Jaxer, because the URL rewrites take precedence over the LocationMatch directives in the jaxer module configuration.  As I said, we can luckily fix this problem by adding one line, thus making our rewrite rules look like:</p>
<pre>&lt;IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/jaxer-.*\b
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
&lt;/IfModule></pre>
<p>So that the special Jaxer URLs aren&#8217;t redirected (in this case) to index.php.</p>
<h3>Wrapping Up</h3>
<p>And that&#8217;s it!  Hopefully you find this quick and easy, and then you can get started with Jaxer, thus discovering how damn cool server-side javascript is.  If you&#8217;d like to learn more about Jaxer, or need help, here are some useful URLs:</p>
<ul>
<li><strong>Jaxer Docs</strong> &#8211; <a href="http://www.aptana.com/jaxer/guide/" target="_blank">http://www.aptana.com/jaxer/guide/</a></li>
<li><strong>Jaxer Forums</strong> &#8211; <a href="http://forums.aptana.com/viewforum.php?f=51" target="_blank">http://forums.aptana.com/viewforum.php?f=51</a></li>
<li><strong>Jaxer Home Page</strong> &#8211; <a href="http://www.aptana.com/jaxer" target="_blank">http://www.aptana.com/jaxer</a></li>
<li><strong>Aptana Cloud</strong> &#8211; The much better, easier way to work with Jaxer.  Get a free trial! <a href="http://www.aptana.com/cloud" target="_blank">http://www.aptana.com/cloud</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.gen-x-design.com/archives/installing-aptana-jaxer-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
