User login

How to

Information on how to do something... anything.

Agaric move site from test to production (for first time) steps

Superseded by Deploying the Agaric way

See also: <a href="http://data.agaric.com/make-new-drupal-site-project-agaric-system

For http://adcshoes.com/ with the project name adcshoes

An extra step for moving from test to live, from the test server:

sudo svn status -u /sites/adcshoes

(This shoes -- er, shows -- you anything that isn't committed to the repository... like settings.php)

Fieldsets in Drupal forms: FAPI 5 syntax

Drupal fieldsets can also have a description.

Apache access control the Agaric way

[Note, this is outdated, now using Kerberos.]

Clients don't like their test site competing with their live, production site for Google results. Therefore, we have put our entire set of test sites behind a pop-up requiring basic Apache authentication.

For ongoing maintenance — adding new people to access the test environment behind the authorization wall — the operative command is:

In a shell script, create a database if it does not exist

Use the MySQL: SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database_name'

<?php
if (mysql_num_rows(mysql_query("SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '". $dbname ."'"))) {
  echo "Database $dbname already exists.";
}
else {
  // go on and create the user, database, etc.
  // create the user

  if (!mysql_query("CREATE USER '". $dbuser ."'@'%' IDENTIFIED BY '". $dbpass ."'"))  die(mysql_error());
  echo "User $dbuser created.\n";

Update or commit: See what's changed in a version-controlled file with svn diff

When you run
sudo svn status -u
and see

M 6549 www/.htaccess

you can see exactly what's up with those changes with
svn diff www/.htaccess
Showing something like:
Index: www/.htaccess

RSA host key changed, requires validation: what to do

RSA host key for example.com has changed and you have requested strict checking.
Host key verification failed.

In the line above it will actually tell you where the bad key is, with known_hosts being the file and 2 being the position of the problem key:

Offending key in /home/you/.ssh/known_hosts:2

Ask Agaric: Drupal for Artists

This question came from a fellow couchsurfer.

We are dedicating our selfs almost all summer to learn drupal and make a website for artists.

Piston not found after installation, setting bash paths

http://neoarch.wordpress.com/2007/07/13/bash-cap-command-not-found/

vi ~/.bashrc

Set path for Piston

export PATH=$PATH:/var/lib/gems/1.8/bin

source ~/.bashrc

server:~$ sudo vi /root/.bashrc
server:~$ source /root/.bashrc

/var/lib/gems/1.8/bin

restart bash

ben@server:~$ sudo /bin/bash --login

How to change your mysql root password using command line

So you wanna change your root password for mysql, huh?

Follow these instructions and know in your heart that you did it, the Agaric Way....

Resolution

MySQL stores username and passwords in user table inside MySQL database.

You can directly update password using the following method to update or change password for user root:

1) Login to mysql server, type following command at shell prompt:

$ mysql -u root -p

2) Use mysql database (type command at mysql> prompt):

Set a module weight using its .install file

in placement.install

<?php
function placement_install() {
  db_query("UPDATE {system} SET weight = 10 WHERE name = 'placement'");
}
?>

The query is the same in both MySQL and PostgreSQL so for these databases (which are what Drupal core supports) this does not need to be placed in a switch statement.

Resolution

Syndicate content