LAMP How To – Open Source At Work

Only Passion Matters

Entries for February, 2010

Installing phpunit

this is very simple, firstly install pear
http://www.azhowto.com/2009/08/14/php-manual-install-of-pear/
then from the pear manual, ie http://www.phpunit.de/manual/3.4/en/installation.html

pear channel-discover pear.phpunit.de
pear channel-discover pear.symfony-project.com
pear install –alldeps phpunit/PHPUnit

getting the latest phpunit will need php 5.2 and above. To get php 5.2,
see http://www.azhowto.com/2009/08/07/getting-new-packages-from-centos-dev-repo/

Highly available load Balancer + web server in centos

This tutorial is about creating a highly available HTTP load balancer using HAProxy. The setup can be slightly complicated but you will appreciate the result – you will get a load-balanced + highly available web service in your network. Basic linux skill is assumed.
Scenario:
Imagine we have 2 physical machines. In each machine, I have 2 [...]

submitting a form using hyperlinks

If using hyperlink to submit form, remember to return false in “onclick” so that it is backward compatible with IE6, ie
<a class=”button_next” href=”javascript:;” onclick=”$(‘#form_wizard’).submit();return false;”>
<span>Update</span>
</a>

resolving jquery conflict with other javascript libraries

It is good to know that jquery can work with other js libraries…
Just need to know how to resolve the conflict
http://api.jquery.com/jQuery.noConflict