Wednesday, April 6, 2011

Have you ever wondered what webserver is a site is using??? Now, wonder no more!!!

Ini adalah add-on untuk Mozilla Firefox. Yes, another super-cool-useful addon for Firefox Web Browser. Server Spy indicates what brand of HTTP server (e.g. Apache, IIS, etc.) runs on the visited sites. When a tab is selected, the corresponding server name is shown on the right-hand side of the browser's status bar.

(Aku pun baru tau yang google pakai customized web server called GWS for their main page and GSE for their mail server.)

Image Gallery


Tuesday, April 5, 2011

Nginx... better alternative to apache ^o^

That's right folks!!! Nginx is said-to-be better than apache in terms of performance and memory usage!!! Apa lagi kawan2... let's tukar to Nginx!!!

Nginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Igor Sysoev started development of Nginx in 2002, with the first public release in 2004. Nginx now hosts nearly 7.65% (22.8M) of all domains worldwide.

Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.

Nginx is one of a handful of servers written to address the C10K problem. Unlike traditional servers, Nginx doesn't rely on threads to handle requests. Instead it uses a much more scalable event-driven (asynchronous) architecture. This architecture uses small, but more importantly, predictable amounts of memory under load.
Even if you don't expect to handle thousands of simultaneous requests, you can still benefit from Nginx's high-performance and small memory footprint. Nginx scales in all directions: from the smallest VPS all the way up to clusters of servers.

Nginx powers several high-visibility sites, such as WordPress, Hulu, Github, Ohloh, SourceForge and TorrentReactor.


Nginx-book-packt.png

Nginx book is available!

Clement Nedelcu has written the first English book covering Nginx including such topics as downloading and installing Nginx, configuring and using modules, and much more. It provides step-by-step tutorials for replacing your existing web server with Nginx. With commented configuration sections and in-depth module descriptions, you will be able to make the most of the performance potential offered by Nginx.


Both [Apache and Nginx] are capable of serving a huge number of requests per second, but Apache's performance start decreasing as you add more concurrent connections whereas Nginx's performance almost doesn't drop!

But here comes the best bit: because Nginx is event-based it doesn't need to spawn new processes or threads for each request, so its memory usage is very low. Throughout my benchmark it just sat at 2.5MB of memory while Apache was using a lot more.

-- WebFaction


Monday, April 4, 2011

Installing PHP with OCI8

Installation

Configuring PHP with OCI8

Review the previous Requirements section before configuring OCI8.

To enable the OCI8 extension, configure PHP with the option --with-oci8 .

Before starting the web server, OCI8 typically requires several Oracle environment variables (see below) to locate libraries, point to configuration files, and set some basic properties such as the character set used by Oracle libraries. The variables should be set before any PHP process starts.

PHP should be run with the same, or more recent, major version of Oracle libraries as it was configured with. For example, if you build OCI8 with Oracle 11.2 libraries, then PHP should also be deployed and run with Oracle 11.2 libraries.

Installing OCI8 as a Shared Extension

The configuration shared option builds OCI8 as a shared library that can be dynamically loaded into PHP. Building a shared extension allows OCI8 to be upgraded easily without impacting the rest of PHP.

Configure OCI8 using one of the following configure options.

  • If using Oracle Instant Client, then do:

    ./configure --with-oci8=shared,instantclient,/path/to/instant/client/lib

    If Instant Client is installed from ZIP files, make sure to create the library symbolic link, for example ln -s libclntsh.so.11.1 libclntsh.so.

    If using an RPM-based installation of Oracle Instant Client, the configure line will look like this:

    ./configure --with-oci8=shared,instantclient,/usr/lib/oracle//client/lib

    For example, --with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client/lib .

    Note that Oracle Instant Client support first appeared in PHP 4.3.11 and 5.0.4 and originally used the option --with-oci8-instant-client to configure PHP.

  • If using an Oracle database or full Oracle Client installation then do:

    ./configure --with-oci8=shared,$ORACLE_HOME

    Make sure the web server user (nobody, www) has access to the libraries, initialization files and tnsnames.ora (if used) under the $ORACLE_HOME directory. With Oracle 10gR2, you may need to run the $ORACLE_HOME/install/changePerm.sh utility to give directory access.

After configuration, follow the usual PHP building procedure, e.g. make install. The OCI8 shared extension oci8.so library will be created. It may need to be manually moved to the PHP extension directory, specified by the extension_dir option in your php.ini file.

To complete installation of OCI8, edit php.ini and add the line:

extension=oci8.so

Installing OCI8 as a Statically Compiled Extension

Configure OCI8 using one of the following configure options.

  • If using Oracle Instant Client, then do:

    ./configure --with-oci8=instantclient,/path/to/instant/client/lib
  • If using an Oracle database or full Oracle Client installation then do:

    ./configure --with-oci8=$ORACLE_HOME

After configuration, follow the usual PHP building procedure, e.g. make install. After successful compilation, you do not need to add oci8.so to php.ini. No additional build steps are required.

Installing OCI8 from PECL

The OCI8 extension can be added to an existing PHP installation either automatically or manually from » http://pecl.php.net/. Information for installing this PECL extension may be found in the manual chapter titled Installation of PECL extensions. Additional information such as new releases, downloads, source files, maintainer information, and a CHANGELOG, can be located here: » http://pecl.php.net/package/oci8.

For an automated install follow these steps:

  • If you are behind a firewall, set PEAR's proxy, for example:

    pear config-set http_proxy http://my-proxy.example.com:80/
  • Run

    pecl install oci8

    When prompted, enter either the value of $ORACLE_HOME, or instantclient,/path/to/instant/client/lib.

    Note: Do not enter the variable $ORACLE_HOME because it will not be expanded. Instead, enter the actual path of the Oracle home directory.

For a manual install, download the PECL OCI8 package, e.g. oci8-1.3.5.tgz.

  • Extract the package:

    tar -zxf oci8-1.3.5.tgz
    cd oci8-1.3.5
  • Prepare the package:

    phpize
  • Configure the package, either using $ORACLE_HOME or Instant Client

    ./configure -with-oci8=shared,$ORACLE_HOME

    or

    ./configure -with-oci8=shared,instantclient,/path/to/instant/client/lib
  • Install the package:

    make install

After either an automatic or manual install, edit your php.ini file and add the line:

extension=oci8.so

Make sure the php.ini directive extension_dir is set to the directory that oci8.so was installed in.

Thursday, March 31, 2011

Magic Rescue

And here is the useful command to get back your files (depends on the recipes). Please go to /usr/share/magicrescue/recipes to see more recipes.
sudo magicrescue -d ~/output2 -r /usr/share/magicrescue/recipes/msoffice /dev/sdb

Magic Rescue

Magic Rescue scans a block device for file types it knows how to recover and calls an external program to extract them. It looks at "magic bytes" in file contents, so it can be used both as an undelete utility and for recovering a corrupted drive or partition. As long as the file data is there, it will find it.

It works on any file system, but on very fragmented file systems it can only recover the first chunk of each file. Practical experience (this program was not written for fun) shows, however, that chunks of 30-50MB are not uncommon.

(A good tool for recovering lost/corrupted data files using Linux (in my case, Ubuntu)).

http://www.itu.dk/people/jobr/magicrescue/

Sunday, March 27, 2011

Nak Paparkan Gambar beserta link di dalam CakePHP 1.3

Nak Paparkan Gambar beserta link di dalam CakePHP 1.3


HTML special characters in $title will be converted to HTML entities. To disable this conversion, set the escape option to false in the $options array.


  1. echo $this->Html->link(
  2. $this->Html->image("recipes/6.jpg", array("alt" => "Brownies")),
  3. "recipes/view/6",
  4. array('escape' => false)
  5. );
  6. ?>


CakePHP 1.2: $html->link with html or image.

A good tutorial for CakePHP I took from DLMax, thanks Max!!!

In CakePHP 1.1 if you need to display an image or piece of HTML with a link to an action, you need to instruct cake NOT to escape the contents of the “Title” attribute with the last false statement like this:

e( $html->link(   $html->image("add.gif"),   array('action' => 'add'),   array(),   null,   false ));

In CakePHP 1.2 you could rewrite this to:

e( $html->link(   $html->image("add.gif"),   array('action' => 'add'),   array('escape' => false)));

Saturday, March 26, 2011

LG Optimus One Promo By Digi

I am thinking of getting the phone but just chat with a Digi Sales Person, this phone is not listed for the RM 23 / month Smart Plan Package. So still need to pay RM 63 / month. So still have to wait to get an android for myself. Haizzz.

LG Optimus One
The World’s BEST LG Android Phone
Optimised for Google™ Services
Including Google Goggles™.
Android Froyo 2.2
Get peak performance with Android 2.2 experience.
LCD Touchscreen
With 320x480 pixel resolution.



DG Smart Plan™

RRP RM 899
12 months
contract
RM 549

24 months
contract
RM 299

Friday, March 18, 2011

Lowyat.NET : Malaysia's Largest Online Community

Not all laptops come with a set of premium speakers but such feature is certainly not a new thing in the market. Quite a number of well-known audio brands such as Altec Lansing, JBL and Harman Kardon have been providing speakers for laptops for quite some time but for Klipsch, this is a new frontier for them. For the first time ever, a laptop will carry their name as the next iteration of Alienware M17X will come with Klipsch speakers built into them.

No other information is available regarding the new audio solution that they developed for Alienware but since 5.1 and 7.1 surround audio capabilities have been listed on the M17X specifications on Dell USA’s website, we expect that it going to be pretty good. Furthermore, since the new M17X will also come with HDMI-In port for users to actually hook up their consoles to the laptop, a good built-in audio speakers is a must for M17x. Not to forget, the original model have very loud speakers when we tested it a while ago.

We have no idea when the refreshed M17X will be available in Malaysia – Dell Malaysia's website is still showing the old model - but for consumers in US, they are able to get it from this month onwards for RM 4,598 (USD 1,499).

[Source: Klipsch via Engadget]

Thursday, March 17, 2011

Mapguide Release Open Source 2.3 RC3

http://download.osgeo.org/mapguide/releases/2.2.0/RC3/

You can go to the above link to download the latest open source Mapguide Server + Extension... but it is still on RC3... which means Release Candidate 3. Apa lagi kaki-kaki GIS??? Meh Lah Download!!!