fixed access database on host
remove temp files
remove temp file
fixed php5.3 bug