Mar
10

FireFox 3 Beta 4 ultra fast!

Tools

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

If you doing web programming then, browsers are very important tools. For me, I have 4 major browsers installed, namely, FireFox, Opera, Flock and of course IE7. IE7 is used as a last recourse when final testing is done on a web page for compatibility. Other than that, I rarely even open IE7.

Anyway I’ve both the latest FireFox 2 and FireFox 3 beta installed and I feel that FireFox3 is blazingly fast!

The blog article from ZDNet confirms it:

In some tests, it’s three times faster than Firefox 2 (meaning the test completes in 1/3 the time), and a whopping five times faster than IE 7

 

The other features mentioned are:

    • Smarter location bar that tunes itself to your browsing habits. As you type in part of the URL it will offer suggestions based on where you’ve been before.
    • Better native look-n-feel on Vista, Mac OSX, and Linux. This includes continuing work on icons, menus, native controls.
    • Zoom just the text or the whole page. Zooming the text was one feature I missed from Firefox 2.
    • Reduced memory usage. This is the main reason I switched to Firefox 3 for my everyday use. The old version often became unstable after a long session with many tabs open.

My only gripe with FireFox 3 Beta is that it doesn’t support the majority of my FireFox plugins. So I still use FireFox 2 most of the time. Yes, you can install both versions in the same Windows machine but only one can run at any one time.

Feb
06

Solution for the White Screen of Death found!

Uncategorized

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Did a video for solving the White Screen of Death for Wordpress. You can find the video here.

image

Emma Frost (White Queen) - character from XMen. Nothing to do with the White Screen of death :)

Feb
05

Submitted this blog to DMOZ

Blog rankings

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

After such a long time of being inactive I thought I’ll try to breathe some life back in to this blog.

I don’t mind not having a PR but since I’m pro-PHP and pro-open source, I thought I should at least be listed in DMoz.

image

Submitted to Dmoz.org

image

Hmmm… it’s going to take 2 weeks to several months to be listed ??

That’s disappointingly long :(

Feb
03

XAMPP cannot start - Skype to blame

XAMPP

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

For a few weeks now I could not start up XAMPP. And I just could not figure out why. I thought it must have been all the crapware that I’ve installed on my notebook over the months. So, probably a clean reformat will fix the problem.

Luckily I did a quick Google search and it turns out others have faced this problem and the cause of it is Skype. Turning off Skype from my Windows status bar fixed the problem. XAMPP, Apache and MySQL all launched without problem.

If you want to run both Skype and Xampp at the same time, it’s possible.

Just disable Skype’s usage of port 80 (also needed by Apache webserver).

  1. Go to Skype’s main menu Tools->Option->Advanced -> Connection
  2. Uncheck the "Use port 80 and 443 as alternatives for incoming connections".

skype-interferes-with-xampp 

After that, starting up Xampp is no problem :)

xampp-running-fine-without-skype-interfering

Oct
15

Energised after Raya

Personal

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Visited my ex-colleague, Zairi, for the Raya celebrations and got to see his computer set up. Even though his apartment was pretty modest but his computer room set up was impressive. He had 2 main computers in his room as well as one notebook. PC was pretty fast and it was even faster than what he had in the office.

Anyway, Zairi had many personal PHP projects in the works and he showed them to me. I feel ashamed as I’ve not been doing anything near what he is doing. Even this blog has been neglected. I’m reminded of my plan to learn more about PHP frameworks which I haven’t even started yet!

Nevertheless, I feel energised by that meetup and I guess it’s good to go out of the house once in a while to see your friends.

Zairi’s blog is here.

Sep
15

Who says Ruby on Rails is better than PHP?

Ruby, PHP

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

To the new programmers who think Ruby is the new fangled programming language, think again!

Sure, Ruby is newer, fancier, and even promises faster development time compared to tired old programming languages like PHP. That’s what Derek Sivers of popular CDBaby.com website thought. He took two years to convert his ‘messy’ PHP codes to Ruby on Rails. After 2 years he found out that things were not as easy as he thought. Swallowing his pride he went back to PHP and finished the required features he needed in 2 months !! Of course he tries to save his ego by mentioning that what he learnt in Rails, he applied in the new PHP codes :)

Read his article on 7 Reasons I switched back to PHP after 2 years on Rails

Aug
16

Hacking Wordpress membership

Uncategorized

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

I am writing a chess publishing program that can take annotations and create javascript animated chess boards so that webmasters can easily show a chess game that has taken place easily on their website.

Check out ChessPublisher.com for this cool new tool.

It involves getting WordPress sessions and using WordPress authentication process to integrate with my publishing tool. I needed this because I wanted a simple membership login system to require only members to be able to use the tool.

It was quite easy and I’ll post the details later when I finish my week long coverage of the MalaysiaOpen.net. Yes, it’s a chess competition and I admit to being a complete chess geek :)

Jul
17

End for PHP4

Uncategorized

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Today it is exactly three years ago since PHP 5 has been released. In those three years it has seen many improvements over PHP 4. PHP 5 is fast, stable & production-ready and as PHP 6 is on the way, PHP 4 will be discontinued.

The PHP development team hereby announces that support for PHP 4 will continue until the end of this year only. After 2007-12-31 there will be no more releases of PHP 4.4. We will continue to make critical security fixes available on a case-by-case basis until 2008-08-08. Please use the rest of this year to make your application suitable to run on PHP 5.

~ taken from PHP.net first page

Well it’s about time. Now if only my webhosts would changeover to PHP5 :( For documentation on migration for PHP 4 to PHP 5, we would like to point you to our migration guide. There is additional information available in the PHP 5.0 to PHP 5.1 and PHP 5.1 to PHP 5.2 migration guides as well.

Jul
15

Useful PHP libraries

PHP

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

I’m playing with the idea of writing my own custom CMS for a future project.
Actually I’ve also chosen similiar libraries for one of my major CMS project 5 years ago!! Since the tools are still used today, they have stood the test of time.

To build a nice supporting libraries, I’ve chosen the following:

Smarty templating engine(last update:March 7th, 2007)
One of the best templating system in PHP in my opinion. Basically it’s a good idea to separate PHP code from html. For newbies, you may need to invest a little time to get used to the idea but it’s worth it.
Also, the caching system is pretty nice as it caches common PHP generated files into static HTML making retrieval and display on browsers many times faster and less taxing on the webserver. All good things to have!

ADODB (last update:May 20, 2007)
Data Abstraction library. Basically it replaces all the common database query commands with it’s own. This means if an app has already been written to support MySQL, changing it to another DB sysytem such as MSSQL only requires a one or two line change in the configuration file.

Scriptaculous(last update: May 25th, 2007)
Ajax library. To have those nice AJAX dynamic pages. Update portion of pages without entire page refreshes. Just so essential if you want your app to have the Web 2.0 feel :)

I really want to use CakePHP too as a framework to really cut development time down but I found it hard to learn. I’m still persevering and trying to pick it up by next month but in the meantime, I’ll continue with the above libraries.

Powered by ScribeFire.

Jul
13

Date validate

PHP

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

My friend Shaun asked me if PHP can do a date validation and I was sure it could with all the built-in date function. So no reason to write a custom date validation function from scratch.

A quick google search and check on php.net shows that you can use PHP’s checkdate function to do the validation.

Here’s an example:-


Here’s the full source code:


<form method=post action=<? $_SERVER[’PHP_SELF’] ?>>
    Enter date<input type=text value=” name=dt>
    <input type=submit>
</form>
<?

  if (isset($_POST[’dt’])) {
      if ($_POST[’dt’]==”) {
           echo  “Please enter a date”;
           die();
      }
      validate();
  }

  function validate() {
        $dt=$_POST[’dt’];
        //$dt=”02/28/2007″;
        $arr=split(”/”,$dt); // splitting the array
        $mm=$arr[1]; // first element of the array is month
        $dd=$arr[0]; // second element is date
        $yy=$arr[2]; // third element is year
        If(!checkdate($mm,$dd,$yy)){
        echo “invalid date”;
        } else {
        echo “Entry date is correct”;
      }
  }
?>