Okay the bit about errors was not correct. It turns out that in php.ini display_errors was off. Now the same script if run gives the following errors:
Warning: crack_opendict(): Unable to open a crack dictionary in F:\Projects\cracklib\crack_test.php on line 8
Warning: crack_check(): 288690440 is not a valid cracklib dictionary resource in F:\Projects\cracklib\crack_test.php on line 9
Warning: crack_getlastmessage(): No obscure checks in this session in F:\Projects\cracklib\crack_test.php on line 10
I have tried other wordlists available on the net also.