Archive for the ‘Ubuntu Server’ Category

Repairing apachetop in Intrepid Ibex (8.10)

Tuesday, December 16th, 2008

It’s a shame that one of my favorite tools is broken in Ubuntu 8.10. It crashes right after you rune it with segmentation fault.  There is a patch in launchpad Bug #294599 but it did not work for me. I was getting some crypted error message. Finally after 10 minutes of googleing and trying i got the solution.

Here are the steps to build your own package:

  1. sudo apt-get install build-essential fakeroot devscripts
  2. mkdir apachetop && cdapachetop
  3. wget http://launchpadlibrarian.net/19754557/apachetop.debdiff
  4. apt-get source apachetop
  5. cd apachetop-0.12.6 && patch -p1 < ../apachetop.debdiff

Now before you do anything we have to make one small change to the code by hand:

$ vim src/apachetop.cc

go to line 967 (in vim write 967G) and replace line

char realfile[MAXPATHLEN];

with:

char realfile[PATH_MAX];

now go to the apachetop-0.12.6 directory and do:

$ debuild -uc -us

after compiling is successfully you can install your new package with:

$ sudo dpkg -i ../apachetop_0.12.6-8ubuntu1_i386.deb

Hope it will help someone.

PS: Installation steps based on https://wiki.ubuntu.com/UbuntuPackagingGuide/BuildFromDebdiff?highlight=(debdiff)

XDebug and Target Management for Eclipse

Saturday, June 21st, 2008

Welcome to another exciting episode. This time you will learn:

  • how to send your files to remote development server from within Eclipse using Target Management and secure FTP (sftp).
  • make files sent via sftp belong to certain user group and have write permissions for this group (umask).
  • configure and use XDebug with Eclipse PDT.

You can find the link to the tutorials about XDdebug I have mentioned on the show in show notes for Episode #7.

Timeline:

00:58 Install Target Management Plugin
02:48 Connecting to development server using Target Management Plugin
03:45 Adjust development server folder permission
07:30 Changing umask for files created using sftp
12:25 Exporting files to development server
15:25 Re-send files to server after changes
16:30 Using XDebug with Eclipse PDT debugging perspective
16:50 Eclipse PDT debugging perspective
17:07 Configuring Eclipse PDT for XDebug
19:10 Start debugging
20:50 Setting conditional breakpoints
21:50 Watch expressions
24:20 Using XDebug functions in your code

Best viewed in full screen with scaling off !!!


Episode #8. Using XDebug and Target Management with Eclipse by ralphz from ralphz on Vimeo.

Installing XDebug from source

Tuesday, May 27th, 2008

XDebug is one of the best debugging and profiling tools for PHP. This video tutorial will show you how to compile and install XDebug on Ubuntu Hardy Haron 8.04 Server Edition.

In the tutorial I have mentioned a Zend Developer series of articles about using XDebug. The link to the articles.

Timeline:

00:25 Checking the XDebug version in repositories
02:40 Downloading XDebug
04:35 Installing packages required for compilation
05:30 Compilation
06:23 Manual install of XDebug
08:20 Configuration of php.ini
14:00 Checking if everything installed correctly
14:29 Look at XDebug available options

Best viewed in full screen with scaling off !!!


Episode #7. Installing XDebug from source by ralphz from ralphz on Vimeo.