Aug 04
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5 out of 5)
Loading ... Loading ...

Eclipse 3.4 GanymedeI’ve been checking out the recently released Eclipse 3.4 (Ganymede), and so far so good. I’ve managed to get PDT (for PHP Development) and SQL Explorer installed and running successfully, so I’ll be doing some testing to see how it compares to Europa, which I have been using for some time. Thankfully, installing plugins is much easier with Ganymede - this is how I got it set up an configured.

IMPORTANT NOTE: This installation configuration currently relies on Integration builds of both PDT and DLTK, since the current Stable builds of each are not currently supported under Eclipse 3.4. I will update this tutorial as support becomes available, but if you are not comfortable installing Integration builds, please see my previous tutorial on setting up a PHP IDE in Eclipse Europa: “64 Bit Eclipse: Linux Installation, including PDT, WTP (WST), ATF, and MySQL (SQL Explorer Plugin)“.

Install Eclipse

Installing Eclipse is a pretty easy task - just head over to http://www.eclipse.org/downloads and download the latest version of “Eclipse Classic” (direct link to 64 bit version). I downloaded the file to my desktop, and once finished, opened up a Terminal window, extracted the archive, and installed Eclipse into the /opt directory:

cd ~/Desktop
tar -zxvf eclipse-SDK-3.4-linux-gtk-x86_64.tar.gz
sudo mv eclipse /opt/ganymede

I installed into /opt/ganymede since I already have Europa installed in /opt/eclipse.

That’s all there is to installing Eclipse. It can be run (for now) via the Terminal:

cd /opt/ganymede
./eclipse

Installing PDT

As mentioned above, the latest Stable build of PDT is not yet supported in Eclipse 3.4, and since only PDT 1.0.x is available via the Update Site, it’s necessary to download the 2.0.x Integration Build from the PDT Website (see this thread at pdt-dev for more information). The same goes for DLTK (Dynamic Languages Toolkit) upon which PDT depends - only the Integration Build may be installed with Ganymede.

Firstly I downloaded DLTK, from http://download.eclipse.org/technology/dltk/downloads - click on the Integration Build download link, and grab the Core Frameworks archive (direct link to current version - Integration Builds are likely to change frequently, so best to visit the main doanload page). Next, grab the PDT archive from http://download.eclipse.org/tools/pdt/downloads/ (click on the 2.0.0 Integration Build link, then grab the PDT Runtime archive - direct link). Don’t worry about the requirements and handy extras.

Once downloaded, again to my Desktop, I created a couple of temporary directories, and unziped both archives into their respective new homes:

mkdir pdt dltk
mv org.eclipse.php_feature-I20080722.zip pdt
cd pdt
unzip org.eclipse.php_feature-I20080722.zip pdt
cd ~/Desktop
mv dltk-core-I-I200807291021-200807291021-incubation.zip dltk
cd dltk
unzip dltk-core-I-I200807291021-200807291021-incubation.zip

Now the Eclipse Update manager can be pointed to these “local sites”. I fired up Eclipse once again, and navigated to the Update Manager: Help -> Software Updates. Once open, I clicked on the Available Software tab, and added the new sites - click on Add Site, click Local, and navigate to ~/Desktop/pdt/eclipse. Click OK, and repeat for ~/Desktop/dltk/eclipse. Now there should be two more sites (”/home/username/Desktop/pdt/eclipse” and “/home/username/Desktop/dltk/eclipse”) in addition to “Eclipse Project Update Site” and “Ganymede” (or “http://download.eclipse.org/releases/ganymede”). Expand each of the two new sites, and select the lowest leaf in each tree - “PDT Feature” and “Dynamic Languages Toolkit”.

Eclipse Ganymede Update Manager

PDT is also dependent upon the Graphical Editing Framework (GEF), so expand the Ganymede tree, then “Graphical Editors and Frameworks” and select the “Graphical Editing Framework GEF” option.

Don’t click “Install” quite yet - there are a few other additional things to select for a full Web Application Development IDE.

Web Application stuff

Expand the main Ganymede tree, and “Web and Java EE Dvelopment”. I personally selected:

  • Eclipse XML Editors and Tools
  • Javascript Developer Tools
  • Web Developer Tools
  • Web Page Editor

You may want more, or less. Almost there…

Database Integration

Expand Database Development, and select Data Tools Platform Enablement and Data Tools Platform SQL Development. These are required for setting up a connection to MySQL later.

OK, click Install! Go and make a brew, or coffee - this may take some time.

Once everything has been downloaded and installed, restart Eclipse.

SQL Explorer Plugin

I find SQL Explorer is a great little plugin to use as a DB GUI. To install it, I downloaded the latest version to my Desktop, and extracted the files.

cd ~/Desktop
mkdir sqlexplorer
mv sqlexplorer_plugin-3.5.0.RC5.zip sqlexplorer
cd sqlexplorer
unzip sqlexplorer_plugin-3.5.0.RC5.zip

As with the PDT and DLTK plugins, to install is just a simple case of adding a new Local site to the Eclipse Update Manager, and selecting the plugin to install. So, open up the Update Manager - Help -> Software Updates, and select the Available Software tab. Add new site, click Local, navigate to ~/Desktop/sqlexplorer, click OK, etc. Once the site is added, expand the new SQL Explorer, select the lowest level leaf, and click install.

Once installed, restart Eclipse. Some configuration is still required to get SQL Explorer linked up to a MySQL Database, which I have covered in a previous tutorial: Eclipse PDT and MySQL - SQL Explorer Plugin. It’s pretty simple, and just involves downloading the Java Connector for MySQL, and pointing Eclipse to it.

ATF (AJAX Toolkit)

Unfortunately, ATF is not yet supported in Ganymede - I’m keeping track of it, however, and will update this tutorial as soon as support is available. In the mean time, check out the current status at atf-dev.

Debugging PHP with Xdebug

The information in my previous tutorial, Debugging PHP Applications with Xdebug and Eclipse PDT, can still be applied to Ganymede.

Hope that helps.

References

  1. http://wiki.eclipse.org/PDT/Installation#Eclipse_3.4_.2F_Ganymede_.2F_PDT_1
  2. http://www.mail-archive.com/pdt-dev@eclipse.org
  3. http://www.mail-archive.com/atf-dev@eclipse.org

written by Hodge \\ tags: , , , ,

Jun 16
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

I’ve been wanting to set up a virtual host, with mod_rewrite on my system for a while, so I could have a local copy of my blog with Permalinks, for playing around, and despite a few hiccups, have finally got round to setting it up and implementing it successfully.

Apache Software Foundation Logo

Creating a Virtual Host

Note: The Apache installation in Ubuntu is actually controlled by the file /etc/apache2/apache2.conf with /etc/apache2/httpd.conf being a secondary config file loaded after apache2.conf. It’s advisable to leave apache2.conf alone, and make any server-wide changes to httpd.conf. The Ubuntu Apache installation also goes a step further by allowing site-specific configuration files, which are located in the directory /etc/apache2/sites-available. One already exists, and is called “default”, which controls the web root, /var/www. To activate any new sites created in this directory, we just create new file in this directory, then create a symbolic link to it in the /etc/apache2/sites-enabled directory. When Apache starts, it scans the apache2.conf, httpd.conf files, and also the /etc/apache2/sites-enabled directory for any links to config files in /etc/apache2/sites-available. If the link isn’t there, the configuration isn’t loaded.

For this tutorial, we’ll be creating a new config file in /etc/apache2/sites-available and activating it by creating to it in /etc/apache2/sites-enabled - apache2.conf and httpd.conf will not be touched.

Ok, I wanted to create a Virtual Host called 64bitjungledev.com, and also be able to view the site on my local installation when I point my browser to 64bitjungledev.com. The first thing I did was create a directory for the new Virtual Host to reside in. I was feeling particularly lazy, so just created it in the /var/www directory, and changed the owner of the new directory to my user name and group (so I could add/edit files etc.) I know, I know, I should create it in my home directory - but everything with “/var/www/ can be substituted for “/home/USERNAME/html/”. Anyway, in a Terminal, I executed:

sudo mkdir /var/www/64bitjungledev
sudo chown myuser:mygroup /var/www/64bitjungledev

Then, I created a new config file in the /etc/apache2/sites-available to contain the configuration information for my new Virtual Host. In a Terminal, I executed the following:

cd /etc/apache2/sites-available
gksu gedit 64bitjungledev.com

This creates a new file called 64bitjungledev.com in the directory and opens it in a text editor. In this new file, I dumped:

<VirtualHost *>
ServerName 64bitjungledev.com
ServerAlias www.64bitjungledev.com
DocumentRoot /var/www/64bitjungledev
DirectoryIndex index.php
<Directory /var/www/64bitjungledev>
AllowOverride all
Options Indexes FollowSymLinks MultiViews
Order allow,deny
Allow from 127.0.0.1
</Directory>
CustomLog /var/log/apache2/64bitjungledev.com-access.log combined
</VirtualHost>

This is basically telling Apache that we want it to host a new site, called 64bitjungledev.com, and all it’s files will be located in /var/www/64bitjungledev. “Allow from 127.0.0.1″ tells Apache that only my computer can access it, and “AllowOverride all” tells Apache that the site can use .htaccess files that contain Apache declarations that can override these settings. The CustomLog declaration is telling Apache to create an access log file for this site in /var/log/apache2/64bitjungledev.com-access.log and the “combined” tells it to include two extra fields of information in the log file - The “Referer” (sic) HTTP request header, and The User-Agent HTTP request header. Probably superfluous considering all trafic will be refered from my local machine, and the only agent accessing the site is Firefox! You can change “combined” to “common”, which doesn;t include these two fields.

Anyway, I digress… There are two methods to enabling the new site - create a symbolic link in /etc/apache2/sites-enabled to this new file, or, have Ubuntu do it for us:

cd /etc/apache2/sites-available
sudo a2ensite 64bitjungledev.com

Will do exactly the same as:

sudo ln -s /etc/apache2/sites-available/64bitjungledev.com /etc/apache2/sites-enabled/64bitjungledev.com

To disable the site, we can run:

sudo rm /etc/apache2/sites-enabled/64bitjungledev.com

Or:

sudo a2dissite 64bitjungledev.com

The result is the same. In order for the URL 64bitjungledev.com to work in my browser, I just had to change the hosts file, so my computer looks for 64bitjungledev.com on my machine as opposed to looking it up via DNS:

gksu gedit /etc/hosts

I changed the line

127.0.0.1 localhost

to:

127.0.0.1 localhost 64bitjungledev.com www.64bitjungledev.com

Saved, and closed the file. Now, I had to restart Apache for the new changes to take affect:

sudo /etc/init.d/apache2 reload

I created a test file in the document root:

gedit /var/www/64bitjungledev/index.php

Containing the old faithful:

<?php
phpinfo();
?>

and pointed my browser to www.64bitjungledev.com. Success! Now for mod_rewrite…

Enabling mod_rewrite

First, to enable the Apache module, mod_rewrite (which is disabled on a default Hardy install), I had to create a symbolic link to the module file, so in a Terminal, I ran:

sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load

The Apache installation in Ubuntu has many different configuration files, and uses this modular approach to activae/deactivate them. The rewrite.load file simply contains the load module declaration which would normally be placed in the httpd.conf file:

$more /etc/apache2/mods-available/rewrite.load
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

When Apache starts in Ubuntu, it checks the /etc/apache2/mods-enabled directory for links to available modules, and loads the modules it finds. Creating the link above can also be achieved by running:

sudo a2enmod rewrite

which is basically a short-cut approach to creating the link in /etc/apache2/mods-enabled, similar to the a2ensite used above - and, similarly:

sudo a2dismod rewrite

will have the same effect as:

sudo rm /etc/apache2/mods-enabled/rewrite.load

That’s pretty much it. The only additional thing I had to do, was make a slight change to the /etc/apache2/sites-available/default file, which, as mentioned above, is the default Apache configuration file for /var/www. So, I opened it up:

gksu gedit /etc/apache2/sites-available/default

And changed the “AllowOverride” declaration to “all” for both the / and /var/www directories. I just needed to restart Apache once again:

sudo /etc/init.d/apache2 reload

Testing mod_rewrite

Before going ahead and installing a local copy of 64bitjungle, I wanted to test if the system was working. I needed two files for this - a .htaccess file, and a PHP file. The .htaccess file contains the test RewriteRule for Apache to process the URL redirection of “clean” URLs to the PHP script, so that www.64bitjungledev.com/xyz/somedata will actually point to www.64bitjungle.com/thescript.php?thevariable=somedata. So, in a Terminal, I created the .htaccess file first:

gedit /var/www/64bitjungledev/.htaccess

And wrote a simple Apache RewriteRule, in addition to telling Apache to switch on the rewrite engine:

<IfModule mod_rewrite.c>
RewriteEngine On
#test rule
RewriteRule ^xyz/([^/\.]+)/?$ thescript.php?thevariable=$1 [L]
</IfModule>

This is basically telling Apache to switch on the RewriteEngine if mod_rewrite is loaded. The rather scrappy-but-suffices-for-testing RewriteRule basically tells Apache to “grab every character in the clean URL after xyz/ and store it in a temporaty variable, then forward it to thescript.php with thevariable set to the stuff just stored”.

A very simple PHP script can be written and used to test if the data is being passed properly:

gedit /var/www/64bitjungledev/thescript.php

which can contain simply:

<?php
echo $_GET['thevariable'];
?>

After restarting Apache, pointing my browser to www.64bitjungledev.com/xyz/DoesItWork now outputs “DoesItWork”, www.64bitjungledev.com/xyz/anything1234 ouputs “anything1234″ etc. The fun just doesn’t stop…!

With mod_rewrite successfully installed, and working for this new domain, I can now install a local version of 64bitjungle.com to play with. I haven’t actually done that yet though…

References:


written by Hodge \\ tags: , , ,

Apr 13
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Xdebug LogoOK, so I have x64 Eclipse successfully installed and running with all the plugins I use for Web Application Development. But what about debugging? Sure, var_dump(), echo, print and so on are all valuable to me when debugging a script, but it’s always good to have more information.

Xdebug is a fantastic PHP extension, which is written by one of the PHP Core Developers, Derick Rethans. The current version is 2.0.3, and I set about installing it on my system, and integrating it into Eclipse PDT today.

Xdebug can be installed in a few different ways - by downloading the binaries from the site, compiling the source, or via PECL:

sudo pecl install xdebug

Some days, I just prefer to download compile the source, as it gives me more of an understanding of what is being installed and where, and this is one of those days:

cd ~/
mkdir xdebug
cd xdebug
wget http://www.xdebug.org/link.php?url=xdebug203
tar -zxvf xdebug-2.0.3.tgz
cd xdebug-2.0.3

The packages phpize and php-config are required to install Xdebug, and can be obtained by installing the relevant PHP development packages:

sudo apt-get install php4-dev

or

sudo apt-get install php5-dev

depending on the PHP version installed. After unzipping the Xdebug source, I ran

phpize

which output:

PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519

I then checked this against the table at http://www.xdebug.org/docs/install#phpize to see if my PHP version (5.2.3) was compatible with Xdebug - it matched up to the table’s 5.2.x PHP version row, so I went ahead and installed:

./configure --enable-xdebug --with-php-config=/usr/bin/php-config
make

which created a file xdebug.so in the modules subdirectory. This file needs to be copied (or moved) to the PHP Extension directory, which on my system is in /usr/lib/php5/20060613/. An easy way to find the PHP extension directory is to run:

locate mysql.so

ok, so I copied the xdebug.so to the extension directory:

sudo cp modules/xdebug.so /usr/lib/php5/20060613/

So far so good. Now PHP needs to be told about the extension, and to load it. This can be done by adding

zend_extension="/usr/lib/php5/20060613/xdebug.so"

to the php.ini file. However, on my Ubuntu system, the PHP extensions are activated by adding an .ini file to the /etc/php5/apache2/conf.d directory, for each extension installed. The .ini file is the extension_name.ini, so I created a file called xdebug.ini:

cd /etc/php5/apache2/conf.d
gksu gedit xdebug.ini

which for now, contains a single line:

zend_extension="/usr/lib/php5/20060613/xdebug.so"

After restarting the Apache server

sudo /etc/init.d/apache2 restart

I created a file called test.php in my Web Root directory, containing a call to the phpinfo() function:

<?php
phpinfo();
?>

and pointed my browser to http://localhost/test.php. Just before the “PHP Credits” section, is a small box containing information on Zend - and now, with a successful Xdebug installation, additional information on Xdebug:

Xdebug information output by phpinfo()

The same information can be found by opening a Terminal and running

php -m

to output the loaded modules, and towards the end of the output, you should see

[Zend Modules]
Xdebug

alternatively, run

php -i | grep Xdebug

and if Xdebug has been installed successfully, you should see

with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans

Now, Xdebug needs to be enabled before any scripts can be debugged! So, in the php.ini file (or in my case, the newly created /etc/php5/apache2/conf.d/xdebug.ini file) I added the lines:

xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"

and restarted Apache again:

sudo /etc/init.d/apache2 restart

running

php -i | grep xdebug

in the Terminal, or using the test.php file containing phpinfo() shows that the new settings are being used, and Xdebug is active and running.

Configuring Eclipse PDT:

Setting up Eclipse PDT to use the Xdebug extension is pretty simple. In Eclipse PDT, I opened Window -> Preferences, then clicked on PHP, expanded the tree, and selected Debug. I Chose Xdebug from the pull down menu for the PHP Debugger, the “Default PHP Server” (should already be set to localhost), and then created a new PHP Executable option by clicking on the PHP Executables link next to the PHP Executable pull down menu.

XDebug and Eclipse PDT

In the PHP Executables dialog, I Clicked Add, filled in the name (PHP with XDebug), and entered the path to the PHP executable - on my system this is /usr/bin/php but if you don’t know, then in a terminal, run

which php

to find out where the php command is run from. I also entered the location of php.ini - again, on my system, this is /etc/php5/apache2/php.ini - and selected XDebug as the PHP debugger:

Xdebug - set up PHP Executable in Eclipse PDT

Clicked OK, then went back to the PHP -> Debug preferences screen, and selected the PHP Executable just created in the PHP Executable pull down. Finally, in the Debug -> Workbench Options option in the left, I selected “Never” for the “allow multiple debug sessions” option, since Xdebug does not support them.

Finally, I needed to set the Default Web Browser in Eclipse, to that when I debug a script, the output is sent to Firefox. Again in Preferences, I navigated to General -> Web Browser, and clicked “New”. It’s pretty straight forward stuff - entering a name and location - Firefox, and /usr/bin/firefox. Again, if you don’t know the location of the firefox binary, in a terminal run:

which firefox

With this done, and the preferences saved, I can now debug my scripts using Xdebug!

Using Xdebug in PDT

References:

http://www.xdebug.org/docs/install
http://www.eclipse.org/pdt/documents/XDebugGuide.pdf
http://devzone.zend.com/article/2803-Introducing-xdebug


written by Hodge \\ tags: , ,

Mar 27
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Eclipse SQL Explorer LogoI’ve been using Eclipse PDT for some time now, and since PHP programming invariably involves connecting to a database at some point or another, I wanted to be able to access my MySQL databases from within the Eclipse IDE - even if only to quickly debug SQL statements. I generally use a combination of a locally installed phpMyAdmin, MySQL Administrator, MySQL Query Browser, and now the Eclipse SQL Explorer Plugin, which give me all the functionality I need for Web Application development.

phpMyAdmin, MySQL Administrator and MySQL Query Browser can be installed as follows, by the way:

sudo apt-get install phpmyadmin mysql-admin mysql-query-browser

Installing Eclipse SQL Explorer was pretty straight forward - I simply downloaded the archive package from Sourceforge, saved it to a directory in on my desktop (there is also a standalone client available, so be sure to download “Eclipse SQL Explorer [RCP/Plugin]” if you’re setting it up as an Eclipse plugin - here’s a direct link to the latest plugin file), and extracted the files:

cd ~/Desktop/sqlexplorer
unzip sqlexplorer_plugin-3.5.0.RC5.zip

This created two directories (features and plugins) along with two text files. To install the plugin, I just copied the two directories to my Eclipse root installation directory (see my previous post “Eclipse PDT IDE for PHP MySQL 32 Bit install on 64 Bit Ubuntu“), which is /opt/eclipse32

cp -R features plugins /opt/eclipse32/

Notice there was no need to use the sudo command before copying, since my user owns the eclipse32 folder.

Configuring SQL Explorer

Once installed, I also had to do some additional setup before I could configure SQL Explorer to connect to my local MySQL databases via Eclipse - namely, download and install the Java Connector for MySQL (MySQL JDBC Driver), to enable JDBC connections. The latest driver (5.1 at the time of writing) tar.gz file can be downloaded from the MySQL site here.

Once downloaded, I just extracted the files, and entered the new directory:

cd ~/Desktop/mysqljdbc
tar -zxvf mysql-connector-java-5.1.6.tar.gz
cd mysql-connector-java-5.1.6

The important file here (along with the documentation, of course) is the mysql-connector-java-5.1.6-bin.jar file, which is the driver itself. I guess this could be placed anywhere, since we just need to point the SQL Explorer plugin to it when setting it up in Eclipse, but for convenience and tidiness, I moved it to the /usr/share/mysql directory:

sudo cp mysql-connector-java-5.1.6-bin.jar /usr/share/mysql

With the JDBC driver installed, I could set up the Eclipse SQL Explorer plugin. In Eclipse, I went to Window->Preferences and expanded the new SQL Explorer section, highlighting “JDBC Drivers”, then double clicking on “MySQL Driver” to open the MySQL setup dialog:

Eclipse SQL Explorer Setup

In the MySQL Driver setup, I had to point the plugin to the MySQL JDBC Driver, by clicking on the “Extra Class Path” tab, and then clicking “Add” to point it to /usr/share/mysql/mysql-connector-java-5.1.6-bin.jar. Once added, clicking on “List Drivers” will bring up the list of available drivers in the “Driver Class Name” pull down menu. Only one is listed, and it just so happens to be the one we need - com.mysql.jdbc.Driver:

Eclipse SQL Explorer Setup

Click OK, and the driver is set up! I also clicked the “Set Default” button, since MySQL is currently the only database I connect to. With the Driver set up, I could then set up a connection to my database system. If the “Connections” view is not already available, it has to be selected via the Window->Show View->Other menu, and clicking on the “Connections” view within the “SQL Explorer” folder in this dialog.

With the Connections View available, I could set up the new connection profile, by right clicking in the view and selecting “New Connection Profile”, which opens up a new dialog, in which the new connection data is input:

Eclipse SQL Explorer Setup

It was a pretty simple process to create the connection - I just needed to replace the relevant parameters in the JDBC connections string with my connection details, so

jdbc:mysql://<hostname>[<:3306:>]/<dbname>

became

jdbc:mysql://localhost:3306/mydatabase

Entered the DB username and password, gave the connection a name, selected the newly created MySQL Driver, and clicked OK to save the connection. Double clicking the connection name in the Connections View connects to the DB and brings up an SQL window form which Queries may be run. By default, the results are displayed in a small view at the bottom of the main Eclipse IDE window - although, this can be dragged and placed anywhere. There are also several other views available via the Window->Show View->Other menu within the SQL Explorer section to peruse.

The Eclipse SQL Explorer homepage has extensive documentation available, including a cool section on extending the plugin. Maybe I should learn Java too?

That’s all Folks.


written by Hodge \\ tags: , , , ,

Mar 05
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

IEs4Linux LogoI do a lot of Web Development, and try to build W3C Standards Compliant web sites - that’s why I always develop a website for Firefox first, and it’s also why I despise - with absolute passion - Micro$hite Internet Explorer (including version 7, which although is closer to following W3C’s standards than any previous version, is still crap), because I invariably have to spend twice as long as it took to design and develop the site, hacking CSS and JavaScript code to get it looking anywhere near as good as it looks in FF, in IE. That was a rather long sentence, that, had I been using M$ Word to write this, it would have probably suggested I revise and fragment it. positioniseverything.net has some great articles on IE specific CSS Bugs…

Also, as a Lnux user, and despite the fact that I have a dual boot system, I really resent having to reboot my laptop into a substandard operating system, to test my websites with a substandard web browser. Also add to this the fact that it’s a real pain in the arse to get more than one version of IE installed in XPoo. That’s where IEs4Linux comes in to play…

Admittedly, it borders on Heretic to install such dismally poor software in a Linux environment (I’m talking about IE here, not IEs4Linux!) , but for web development, it’s an unfortunately necessary evil. IEs4Linux works with Wine, and is a small set of scripts which automatically downloads and installs the IE 5.0, IE 5.5, IE 6, and with the latest beta version of IEs4Linux, IE 7 binaries. It also requires cabextract - a small application used to extract M$ Cabinet files.

I already have Wine, and cabextract installed on my Ubuntu, but if they’re not present, they are easy to install:

sudo apt-get install wine cabextract

So, I downloaded the IEs4Linux package to my ~/Documents folder - it can also be downloaded using wget:

cd ~/Documents
wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-2.99.0.tar.gz

Once downloaded, I unpacked, and entered the new directory:

tar -zxvf ies4linux-2.99.0.tar.gz
cd ies4linux-2.99.0

Within the new directory is an executable, ies4linux, which if run:

./ies4linx

IEs4Linux GUIopens a GUI for installing the Internet Explorer binaries. Via the GUI, it is possible to select the IE versions to install (for IE 7, the option is in the Advanced section), along with the Adobe Flash plugin, and also the option to install Desktop and Menu icons/shortcuts. Unfortunately, I ran into a couple of problems running the GUI, and IE didn’t install correctly. Thankfully, however, it is also possible to run the ies4linux executable with command line options, and bypass the GUI all together, with the –no-gui flag. Now, since I didn’t have the GUI to select the extra options, I had to set a bunch of other flags to install everything I wanted, including IE 5.0, 5.5, 7, core fonts, and no desktop shortcuts:

./ies4linux --no-gui --install-ie55 --install-ie5 --beta-install-ie7 --no-desktop-icon --install-corefonts

IE 6 and Adobe Flash are installed by default, but can be switched off with the –no-ie6 and –no-flash respectively. Running ./ies4linux –full-help displays a list of all the options available.

I actually had to run the script a couple of times, since the downloads from the M$ servers timed out, but the script detects what’s already been downloaded, and continues as necessary. Other than that, it was a simple, painless process! I now have IE 5.0, 5.5, 6 and 7 polluting my system, which can be accessed via the menu Applications -> Internet -> IE. The only thing I’ve noticed so far, is that IE 7 is a little clunky and slow, and the Adobe Flash plugin doesn’t always work with IE 7, but other than that, it works well. For IE…

Now, I only wish there was an easier way to get a Standards Compliant website code to work in IE…


written by Hodge \\ tags: , , , , , , ,

Webloogle Blog Directory