Main php and bash scripts