LAMP

Linux, Apache, MySQL and PHP

Wireshark network analysis tool

Ninja tools … or debugging network problems

Having just come through a harrowing ‘network issue’ ordeal, I thought I’d best document the steps back to sanity from out of my naivety. A rough description of the scenario follows.

We have a client using Sage Line 50 who wanted to perform queries on their web members database in conjunction with their in-house accounting information. This set me down the path of setting up an on demand connection and synch, database to database. The solution was a VPN connection between the client’s LAN and their web server.

Having never played seriously with VPNs before, we secured the help of a good More >

nvidia

NVIDIA and suspend issues

I’ve got the nvidia proprietary video drivers running on my Fedora laptop using the rpmfusion-nonfree yum repo.

I also installed the akmod-nvidia package as it recompiles the kernel module for the graphics each time a new kernel is installed. Super!

However I’ve been battling with power suspend failing when slamming the lid on my laptop.. it hangs and won’t power off/restart without a nasty 10 sec power button press and hold. I think I’ve finally figured the problem. It seems the kmod-nvidia- tries to install as well.

A bit of the following and all seems well in sleep world!

yum remove kmod-nvidia-

In /etc/yum.repos.d/rpmfusion-nonfree-updates.repo add More >

Fetching mail with fetchmail

During a domain transfer, while DNS was still propogating I needed to retrieve mail from the old server to the new.

I did so thusly… # yum install fetchmail

$ touch .fetchmailrc $ chmod 600 .fetchmailc

I then added the following lines to .fetchmailrc

poll with proto POP3 user there with password "" is "" here

Then once ensuring you can POP3 out of the server (port 110) through the firewall, you can just run ‘fetchmail’ from the command line to grab the mail.

Topping it off with a cronjob for the duration of DNS propogation would probably be a sensible finish.

References:

http://theos.in/news/howto-configure-fetchmail-linux-or-unix-client-program-to-fetch-emails/

http://www.catb.org/~esr/fetchmail/fetchmail-FAQ.html

More >
Cross platform password safe

KeePassX on CentOS

Cross platform password safe

I’ve been playing with CentOS 5 lately, and really needed KeePassX on it. I ran into a few problems…

No rpms for Centos means you have to try and build from source. You also need qt-devel on the machine but it has to be version 4.3 or greater to compile.

So I had to enable atrpms-testing and use their bleeding edge qt44-devel.

This conflicts with qt-devel, so you need to ditch that first if it’s around. It also needed a few other dependencies that weren’t picked up.

# yum remove qt-devel qt4 dt4-devel # yum install gcc-c++ libXtst-devel.x86_64 qt44 qt44-devel

For some More >

Speedy wamp

To get a bit more speed out of your sluggish windows development machine (I use wampserver), add the following code to your php.ini.

; APC accellerator extension=php_apc.dll [APC] apc.enabled = 1 apc.cache_by_default = 1 apc.enable_cli = 0 apc.shm_segments = 1 apc.shm_size = 64 apc.max_file_size = 1M apc.stat=1

Also download the APC dll from here…

http://pecl4win.php.net/ext.php/php_apc.dll

and place it in your php ‘ext’ dir. Mine is here… D:\wamp\bin\php\php5.2.6\ext

Restart Apache and you should be a bit zippier.

memcached on CentOS

When installing memcached on my CentOS 5.2 box using the rpmforge repo, I found apache/php complaining of API version problems.

To get round it I first used PECL to install memcached, then used yum to set memcached to work nicely with the Redhat style environment. # pecl install memcache # yum --enablerepo=rmpforge install memcached # yum install php-pecl-memcache

Thinking back, I believe I needed libevent, libevent-devel, zlib and zlib-devel to get the PECL install to work too. # yum install libevent libevent-devel zlib zlib-devel I saw the errors initially when version checking PHP.. after restarting apache the following command seems happy… # php More >

Plesk Hard disk quotas

I had to enable quota support to my hard disk mounts on one of my new Plesk boxes today. This lets Plesk manage how much space is given to whomever… very necessary for a virtual hosting box.

I found these instructions on the Plesk forum, but not all in one place, hence…

Add ‘usrquota’ to the options in fstab. Mine looked like this before and after… before /dev/md0 / ext3 defaults 1 1 after /dev/md0 / ext3 defaults,usrquota 1 1

Then run these to get quotas working… # mount -o remount / # quotaoff -av # quotacheck -avum # quotaon -av

..and that should More >