Posted by clemens.tolboom on August 20, 2008 at 12:37pm
I want to show my way (tm) of working as a drupal module developer and hope some improvements are made by you.
For more info see http://build2be.com/en/content/froscon-2008-drupal-room
I want to show my way (tm) of working as a drupal module developer and hope some improvements are made by you.
For more info see http://build2be.com/en/content/froscon-2008-drupal-room
Comments
Is anyone interested in this
Is anyone interested in this discussion? Please give some feedback ;-)
Looks like your approach is
Looks like your approach is really productive. So far I have not used drush and related modules, though I really like to work from the command line. Hope to find the time to try it and give some useful feedback.
--
My Drupal Articles
I found a good solution to set Drupal offline from shell
Hello Clemens,
thank you for your presentation yesterday.
I am currently working on a script based structure to manage many drupal installations on different vhosts with an additional infrastructure of symlinks and aliases.
Robert was talking about different server settings yesterday. On my system the server scripts are running with user permission. Because of such things universal working solutions could be very complex. So my current setup is influenced by special needs of me and my system where I have root permission.
I started my project with symlinks:
http://drupal.org/node/39807#comment-73433
I'm using php scripts with shell() function. Because of safemod the php scripts are called with "-n" to ignore php.ini settings.
Yesterday you explained that drush (http://drupal.org/project/drush) don't help me to set Drupal offline at time. So I continued my search today.
On this site I found a good solution:
http://drupal.org/node/122999#comment-233908
$conf = array( 'site_offline' => '0');Because the ability to override strings in the settings.php we can manipulate this file with shell scripts or use external php files. So we don't have to manipulate the settings.php directly.
require '/path_to_site_org_folder/settings_add.php';Beware of file permissions like the settings.php. The additional php file can be placed outside of the drupal folder.
It's good to add this code at the end of settings,php for the next thing.
addition: Use "include" instead of "require" to avoid fatal error if the additional file isn't there:
http://php.net/manual/en/function.include.php
If we want to call the update.php without login as user/1 we can change or override $update_free_access (see comment in default.settings.php).
If we use settings_add.php we can put this information inside to override the default setting:
$update_free_access = TRUE;After changing this two things a drupal site is prepared for update scripts. First of all we should made the recommended backup of database. I have scripts to read database-infomation from the settings.php and do backup with mysqldump. Then I make other file system backups with compression etc.
For update we can extract next drupal version and modules or doing rsync with prepared folders like I do.
Now we can do update.php in a browser. To stay at shell I tried to use lynx browser. But this doesn't work yet.
If the website works well we can change the settings_add.php again with a script and set drupal online.
One example of my script handling:
app_am -- views tokenThis is my personal alias shell command (inside the site organisation folder) to install one or more modules.
Because I have to login in Drupal to activate the modules I am thinking of using drush to make this easier too.
Carsten
--
My company: Nodegard GmbH