Replace php directory with lib & correct bug when created new project