User login

Complete

To be used with care. Pages are complete only when they meet the posting guidelines.

Moving mail handling to a new server

Some quick notes from the process, captained by Stefan.

Change the MX Record:

Old Information
Domain Preference Exchanger

New Information
Domain Preference Exchanger
mtgrading.com 10 mail.agaricdesign.net

Or actually, keep the old one, but set it at a higher number (and so lower preference).

mtgrading.com 90 mx.mtgrading.com

Resolution

Bulk taxonomy import term-by-term is just too slow

Struggling with taxonomy import.

After stripping everything out, the conclusion is that taxonomy_save_term, by itself, without even the hooks to add extra data, is simply too slow, with a minimum of three database calls per term. (data, hierarchy, vocabulary)

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1048576 bytes) in /RCS/agaric/agaric-sites/scf/includes/bootstrap.inc on line 836

134,217,728

Increased to 256MB. It ran forever, then returned this:

Access Drupal functions and session from a PHP script in a site subdirectory

If you want to use Drupal sessions and the logged in user object from a straight PHP script not at Drupal root but somewhere in subdirectories in a site, you will probably need to do something like I endend up doing in profiles/scf/switch.php to impersonate the Drupal site root directory.

In fact, I think the partial installation profile idea might need something like this.

(Skip down to resolution.)

Some test output code used to figure out what the domains and sessions were doing:

Database user creation and permissions

CREATE USER '6-agaric-core'@'localhost' IDENTIFIED BY '*************';

GRANT USAGE ON * . * TO '6-agaric-core'@'localhost' IDENTIFIED BY '*************' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

CREATE DATABASE IF NOT EXISTS `6-agaric-core` ;

GRANT ALL PRIVILEGES ON `6-agaric-core` . * TO '6-agaric-core'@'localhost';

Resolution

Git profile project in an SVN Drupal site

Note: This approach should be considered deprecated in favor of a pure Git system.

For installing the SCF profile for use as part of an existing site managed in SVN:

Git it:
http://sciencecollaboration.org/node/5

cd profiles/
git clone git@github.com:scf/scf.git
svn propset svn:ignore .git .
svn add scf
"Science Collaboration Framework (scf) profile added."

Adding tracking code via template.php

Adding custom tracking Javascript confused me on doing it the Drupal way.

When the goal was adding:

  <script type="text/javascript" language="javascript">llactid=14159</script>
<script type="text/javascript" language="javascript" src="http://trackalyze.example.com/trackalyze.js"></script>

Manually add a new repository to the Agaric test server

If done manually, basic code is this:

On the test server:

cd /srv/git/
mkdir projectname.git
cd projectname.git
git init --bare

Back in your project on your local computer:

git remote add origin git.example.com:/srv/git/projectname.git
git push origin master

Disable problem module through the database via command line mysql

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2266274 bytes) in /var/www/example/profiles/scf/modules/contrib/devel/devel.module on line 1377

mysql -u example -ppassword -h agaric.example.edu
mysql> SHOW DATABASES;
mysql> USE example-dev;
mysql> SHOW TABLES;
mysql> SELECT name FROM system;
mysql> UPDATE system SET status=0 WHERE name='devel_themer';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Updating a module in Git (the hard way, resolving a conflict)

(Some old notes from Stefan that I had to look up, so putting them online).

yesterday night i learnt some git. now i can tell you the meaning of fast-forward.
when you create a new branch off another one and after some time you want to merge the changes and the other branch hasn't advanced it's a fast forward merge. otherwise a merge commit will be crated.
if you want to merge changes to the original branch you forked off you should firts pull any changes from that one before merging or tou risk losing commits.

Git push failed.

One character patch to location module to get rid of senseless too many empty locations error

Working on the Trade Justice "site sprint" to launch this long-running and ambitious project...

Syndicate content