I'm trying to build a site where you can install Drupal through a web gui.
<?php
`drush site-install --yes --db-url=mysql://USER:PASSWORD@localhost:3306/DATABASE --account-name=DRUPAL_USER --account-pass=DRUPAL_PASSWORD --account-mail=contact@email.com --site-name=SiteName`;
?>
The above is a snippet from the script. If I run the script from the browser it doesn't do anything, but if I try to run it as www-data with:
php install_script.php
Everything works perfectly! I get Drush's output in the terminal just fine.
Can anyone tell me how to trigger Drush to do the Drupal installation/setup from a PHP script? I'm completely lost and I can't see what I'm doing wrong.
I'll appreciate any help on this! Thanks.