[development] Install profiles tutorial for Drupal 4.7, Friday 8AM PST

Adrian Rossouw adrian at bryght.com
Sat Jun 10 11:55:10 UTC 2006

On 10 Jun 2006, at 12:14 AM, Dries Buytaert wrote:

> Ideally, Ber's command line tools would be able to re-use parts of  
> the installer (shared API).  If that's not possible with the  
> proposed install system, we should massage it until it is  
> possible.  (We can do this after the current system hit core.   
> Incremental improvements are fine.)
Ummm .. you guys do realise there's nothing stopping you from running  
drupal as a command line script ? right.

At the top of the install.php file, just add this :

if ($argv[1]) {
   $_SERVER['HTTP_HOST'] = $argv[1];
   $_SERVER['REQUEST_URI'] = '/install.php';
   $_SERVER['SCRIPT_NAME'] = '/install.php';
   $_SERVER['PHP_SELF'] = '/install.php';
   $_SERVER['SCRIPT_FILENAME'] = $_SERVER['PWD'] . '/install.php';

And then you can run install.php via the php command line as './ 
install.php www.mysite.com'

In fact, I think it's entirely practical to turn install.php and  
update.php into scripts that can be run on the command line.

Adrian Rossouw
Drupal developer and Bryght Guy
http://drupal.org | http://bryght.com

More information about the development mailing list