Well i checked all your answers and i thank you for that, helped me find the right path for me(at least one that satisfies my "project manager".).I ended up with this solution below:(Those values are for example)
   $f=fopen("config.php","w");
   $database_inf="<?php
     define('DATABASE_HOST', '".$database_host."');
     define('DATABASE_NAME', '".$database_name."');
     define('DATABASE_USERNAME', '".$database_username."');
     define('DATABASE_PASSWORD', '".$database_password."');
     define('ADMIN_NAME', '".$admin_name."');
     define('ADMIN_PASSWORD', '".$admin_password."');
     ?>";
  if (fwrite($f,$database_inf)>0){
   fclose($f);
  }
That is just and example to show how i figured it out. First i created and install php and set default url routing for that page when there is no config file setup. Then i asked the user input realted values and keep them in variables. Finally i created an config file and wirte them in. I hope this can help some oother people who deals similar situation.