Archiwum

Archiwum dla Luty, 2012

Collabtive – web-based project management software

Luty 26th, 2012 4 comments

Couple days ago installed Collabtive to manage my small projects in one place.

It is a PHP based solution with nice user interface that ideally fits my needs as it offers:

  • Multiple projects
  • Milestones
  • Task lists
  • File management
  • Time tracker

How to quickly download or upload directory tree over FTP

Luty 26th, 2012 Brak komentarzy

The fastest way to download or upload directory tree over FTP using just plain console is to execute lftp command.

lftp is a sophisticated file transfer program which supports protocols like ftp/s, http/s, hftp, fish, sftp and torrent. It is a good idea to install this tool as it can be very handy at times.

To upload local directory local_dir to remote remote_dir on hostname execute:

$ lftp -u username,password -e "mirror -R local_dir /remote_dir;quit" ftp://hostname
Total: 1 directory, 3 files, 0 symlinks
New: 3 files, 0 symlinks
20071573 bytes transferred in 162 seconds (121.8K/s)

To see contents of remote directory remote_dir on hostname execute:

$ lftp -u username,password -e "ls /remote_dir;quit" ftp://hostname
total 19612
-rw-r--r--  1 nobody  nogroup  15568717 Feb 25 23:29 eGroupware.zip
-rw-r--r--  1 nobody  nogroup    113942 Feb 25 23:29 eGroupware-egw-pear.zip
-rw-r--r--  1 nobody  nogroup   4388914 Feb 25 23:30 wordpress.zip

To download remote directory remote_dir on hostname to local local_dir execute:

$ lftp -u username,password -e "mirror /remote_dir local_dir;quit" ftp://hostname
Total: 1 directory, 3 files, 0 symlinks
New: 3 files, 0 symlinks
20071573 bytes transferred in 20 seconds (981.0K/s)

Don’t forget to read manual as there are couple of useful options (like downloading/uploading files in parallel).

Tagi:,

Write your own book online using Booktype

Luty 25th, 2012 Brak komentarzy

I recently read an article about Booktype, got interested and tried software myself.

Booktype is developed by Sourcefabric, a non profit organization that provides couple of other interesting solutions like Airtime (radio automation), Newscoop (content management system) and Superdesk which combines Airtime with Newscoop as a suite for independent media.

Booktype uses Django web framework. Software is easy to install but you can’t forget about Objavi 2 (FLOSS Manuals book exporter) to save your work in any of the available format.

Interface is simple and readable built with collaboration in mind. Each book has its own history, custom versions and permissions. Books are written in HTML using TinyMCE editor and can be exported to PDF, ODT, EPUB and MOBI format.

How to integrate Roundcube Webmail with ISPConfig 3

Luty 24th, 2012 Brak komentarzy

To integrate Roundcube with ISPConfig 3 read requirements and follow installation instructions.

Procedure is quick and simple as it contains following steps:

  • Create remote user
  • Install plugins
  • Configure account plugin
  • Activate desired plugins in Roundcube

For full details visit bugs.web-wack.at

Ubuntu and recent problems related to PHP

Luty 24th, 2012 Brak komentarzy

Recently I run into small problems related to PHP.

Problem A – sqlite.so

First one was PHP warning:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/sqlite.so' - /usr/lib/php5/20090626/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP tried to load sqlite.so from /etc/php5/conf.d/sqlite.ini (php5-sqlite package).

$ dpkg -L php5-sqlite
/.
/etc
/etc/php5
/etc/php5/conf.d
/etc/php5/conf.d/sqlite3.ini
/etc/php5/conf.d/pdo_sqlite.ini
/etc/php5/conf.d/sqlite.ini
/usr
/usr/share
/usr/share/doc
/usr/lib
/usr/lib/php5
/usr/lib/php5/20090626
/usr/lib/php5/20090626/pdo_sqlite.so
/usr/lib/php5/20090626/sqlite3.so
/usr/share/doc/php5-sqlite

As suspected there was sqlite3.so file.

$ ls /usr/lib/php5/20090626/
curl.so  gd.so  mysqli.so  mysql.so  pdo_mysql.so  pdo.so  pdo_sqlite.so  sqlite3.so

To solve this problem just delete /etc/php5/conf.d/sqlite.ini file.

$ sudo rm /etc/php5/conf.d/sqlite.ini

Problem B – fuser process

Second problem was more serious. Thousands of fuser zombie processes and funny CPU usage.

Hopefully there is a bug report #876387 so for solution look at fourth comment. Don’t forget to identify and kill already running find processes.

In short this problem can be quickly recognized by thousands of fuser zombie processes:

$ ps ax | awk '{if ($3=="Z" && $5~/fuser/) s++}; END {print s}'
21613

It was created by php cron job /etc/cron.d/php5 (php5-common package):

$ dpkg -S /etc/cron.d/php5 
php5-common: /etc/cron.d/php5

Source of this problem in /etc/cron.d/php5 file:

09,39 * * * * root [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete

To solve it replace this line with one given below:

09,39 * * * * root [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete

Don’t forget to kill running find processes:

# ps ax | grep "find /var/lib/php" | grep fuser | awk '{print $1}' | xargs kill
Tagi:,

Your own search engine software

Luty 23rd, 2012 Brak komentarzy

If you are looking for search engine software then try Yioop!.
It is PHP based and Open Source so it is very easy to deploy it on Intranet or remote dedicated server. You can try it directly at yioop.com

How to convert Mbox mailboxes to Maildir format

Luty 10th, 2012 Brak komentarzy

Download mb2md.pl script and run as described in manual.

For example to convert /old/mbox to /new/maildir you can execute:

# perl ./mb2md.pl -s /old/mbox -d /new/maildir
Converting /old/mbox to maildir: /new/maildir
Source Mbox is /old/mbox
Target Maildir is /new/maildir
Dummy mail system first message detected and not saved.
40 messages.
Tagi:,