XDebug doesn’t show local variables in Komodo, NetBeans or Eclipse PDT

Lovely surprise that came sometime after upgrading Lucid Lynx(and thus to PHP 5.3.2) – Xdebug doesn’t show local variables. Fortunately that’s a known issue that is fixed in Xdebug 2.1.0RC, but since it’s not released, it is not yet in Ubuntu’s repository. This should be pretty easy to fix though :) let’s try this:

sudo apt-get install php5-dev php-pear

That’ll get us ready for manual xdebug building. Then we need to get the sources. Gotta tell you, Xdebug guys are pretty awesome – they put together this nice little tool that helps you find and build the right version: http://xdebug.org/find-binary.php

It requires output of phpinfo() or in ‘php -i’ command and based on that gives you set by step instructions.

For standard Lucid Lynx install it boils down to the following commands:

wget http://xdebug.org/files/xdebug-2.1.0RC1.tgz
tar -xvzf xdebug-2.1.0RC1.tgz
cd xdebug-2.1.0RC1
phpize
./configure
make
sudo cp modules/xdebug.so /usr/lib/php5/20090626
sudo /etc/init.d/apache2 restart

Before restarting the server though(last command) you may want to double check the the following line exists in either /etc/php5/apache2/php.ini or in /etc/php5/apache2/conf.d/xdebug.ini

zend_extension = /usr/lib/php5/20090626/xdebug.so

Advanced Web Ranking on Ubuntu: Fixing “SQLite Could Not Be Found” Issue

“SQLite Could Not Be Found Issue” that you see when running AWR on 64bit Linux(in my case Ubuntu 10.04 ) is caused by the fact that AWR relies on 32bit JRE(you can read about this on AWR’s forum). Problem could be fixed by installing 32bit JRE on the system.This short step by step guide cheat sheet will help:

If you’re on earlier version of Ubuntu this will generally do the trick:

sudo apt-get install ia32-sun-java6-bin

However if you’re on 10.04, then it’s a bit longer process, since you need to add partner repository first:

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get install ia32-sun-java6-bin

That’s not all though. Now you need to edit launch script(AdvancedWebRanking.sh). Line #4 needs to be updated to contain path to proper JRE. Your final file should look something like:
#!/bin/sh
cd "Advanced Web Ranking"
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
/usr/lib/jvm/ia32-java-6-sun/bin/java -Xmx512M -classpath awr.jar com.caphyon.awebrank.Splash