Drupal test sites.

Posted by gordon on Sun, 05/11/2006 - 5:40pm

When developing a new site, for anyone you will generally have test and/or development version of a site. These sites are usually exact copies the live site, and from time to time you will copy the live database to these sites.

Usually when doing this you will go through the site and change some of the configuration values, like the gmap api number, and others like the path to payment gateways and credit card gateway indentification numbers to point to test versions of the payment gateways.

Generally doing this by hand you will miss some parameters, and have it really cause problems later. But there is an answer that will allow you to set these values automatically so that depending on the site, will be rewritten correctly everytime.

In the sites directory you will have a directory for each site, and a settings.php file in each of these directories. Just add to your test file the following

<?php
$conf = array(
  'site_mail' => 'test@example.com.au',
  'ccard_clientid' => 'example_no',
  'ccard_url' => 'https://test.example.com/store/payment/ccard',
  'googlemap_api_key' => 'ABQIAAAAhfBLLoKUHq7LqQ2QBcWQ2hRCSo_fHprJOtfmhc0LOWj7Ebi-6BSINRQq0Kie8sAsQKjO1tEi-ZFxSw',
);
?>

This will override these values above and will mean that you will never need to change them again. 

Also to speed up the download and update of your local database quickly and if you have a ssh connection to your webserver, try the following.

ssh webuser@example.com mysqldump -udbuser -pdbpasswd drupaldb | mysql -ulocaldbuser -pdbpasswd localdrupaldb

If you put this into a small shell script it is just a simple command away.


Your site has very much

Your site has very much liked me. I really appreciate it!

Your site is great

Your site is great and I really appreciate it! I have always enjoyed reading your site.


Guide will help you find reliable Virtual online internet casino gambling sites

Hello! Excellent site.

Hello! Excellent site. Thanks for job!

Your site is great and I

Your site is great and I really appreciate it! I have always enjoyed reading your site.


Hi! Nice post, man. I have

Hi! Nice post, man. I have always enjoyed reading your site. Thanks you!

Your site has very much

Your site has very much liked me. I really appreciate it!
CialisViagraLevitra

Hello! Excellent site.

Hello! Excellent site. Thanks for job!

Your site has very much

Your site has very much liked me. I really appreciate it!

Your site has very much

Your site has very much liked me. I shall necessarily tell about him to the friends.

Your site is great and I

Your site is great and I really appreciate it!
I have always enjoyed reading your site.

Thanks for this article!

Thanks for this article!

Thank you for this article.

Thank you for this article. Drunk girls

I can do that, buy whats

I can do that, buy whats wrong when we tall about music. Many mans in the world not eat every day. Mp3 songs Download

Can This Be Used...

in the following manner:

 

Instead of duping a live to test/devel multisite for one client, i'm setting up a multisite where each multisite is a sandbox for what will become a completely standalone drupal site.  Often, a new site i want to create is very similar to a multisite that already exists but will be a completely standalone and different site once it goes live.  So i base the new site off of an existing multisite i already have.  I usually just copy the source multisite and rename it to the new site, change my vhosts/alias, create a NEW mysql db, etc...

That saves me time right there. BUT...

Then i have to login to the first screen and then redo all my initial settings for the NEW DB for this site - things like sitename, email, footer message, show slogan, etc...

 
Since these are all stored in a drupal table that are eventually loaded into drupal vars at runtime.. my thought is if i know what those vars are, i MIGHT be able to set them all from within one place in that settings.php file so i don't have to go in and drill down a bunch of menus to set all of this stuff.  That would be simpler and it would probably be more fullproof as a setting is NOT likely to be missed.

 

I guess my question is whether or not settings.php would give me access to this functionality via $conf or any other var i might be able to set there..

 

Also, since that settings.php file is accessed (i think?) every time you "hit" the url of the site, are these $conf vars being hit / reset every time because the FIRST time settings.php is accessed, i imagine these $conf values are written to a db table[s].. yes?

 

thanks for any help you might provide 

 


his report compiles the

his report compiles the findings from the 2007 online survey of 253 transgender people in Australia and New Zealand.
From the Executive Summary:
"This research has its beginnings in an act of transgender activism, arising as it did out of dissatisfaction with the capacity of the 2005 Private Lives project to capture the complexity of transgender lives. A central pivot in the concerns of the transgender communities about health services is that of recognition. Practices of medicine are implicated in many of the attempts by transgender people to achieve positive health and self- an

Generic Viagra Cialis Online

test