support PHP 5.3 for ConfigTest
change fopen logic