User login

Documentation

Drupal, project, life documentation. This is where notes go to try to earn their way onto Drupal.org.

Install profiles don't work in nested subdirectories

At least in Drupal 5, installation profiles cannot be in subdirectories or named differently from their main directory.

Warning: require_once(./profiles/agaric_recipes_basic/agaric_recipes_basic.profile) [function.require-once]: failed to open stream: No such file or directory in /var/www/drupal-5-live/install.php on line 69

Fatal error: require_once() [function.require]: Failed opening required './profiles/agaric_recipes_basic/agaric_recipes_basic.profile' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/drupal-5-live/install.php on line 69

At least in Drupal 5, installation profiles cannot be in subdirectories or named differently from their main directory.

Warning: require_once(./profiles/agaric_recipes_basic/agaric_recipes_basic.profile) [function.require-once]: failed to open stream: No such file or directory in /var/www/drupal-5-live/install.php on line 69

Fatal error: require_once() [function.require]: Failed opening required './profiles/agaric_recipes_basic/agaric_recipes_basic.profile' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/drupal-5-live/install.php on line 69

Making a new release for your updated Drupal module

Making a new release, using CVS tags and all that stuff you have to do, for your updated Drupal module. This should work for youth theme or install profile, also.

If you've been following the Agaric method of committing a project to Drupal's CVS you'll have a folder with a checkout for each of the Drupal versions you are maintaining your module for.

Just navigate to the one where you need to make changes, such as:

Ebony:~/workspace/agaricdrupal/registration_role/contrib-5.x-1.x

Making a new release, using CVS tags and all that stuff you have to do, for your updated Drupal module. This should work for youth theme or install profile, also.

If you've been following the Agaric method of committing a project to Drupal's CVS you'll have a folder with a checkout for each of the Drupal versions you are maintaining your module for.

Just navigate to the one where you need to make changes, such as:

Ebony:~/workspace/agaricdrupal/registration_role/contrib-5.x-1.x

Strange no line breaks issue in Mac OS X terminal vi text editor

drupal my cvs module has no line breaks
screwy line breaks in vi
^M instead of line breaks
the whole module code is on one line in the command line vim text editor.

This was noticed after attempting, and failing, to apply a one-letter change patch. (Well I guess patches always change at least one line, so after applying a one-line patch that failed.) But I don't think this was the source of my problems, as copying and pasting through anything but SubEthaEdit seemed the leave the same problem, even copy-paste through TextWrangler left the file a mess.

drupal my cvs module has no line breaks
screwy line breaks in vi
^M instead of line breaks
the whole module code is on one line in the command line vim text editor.

This was noticed after attempting, and failing, to apply a one-letter change patch. (Well I guess patches always change at least one line, so after applying a one-line patch that failed.) But I don't think this was the source of my problems, as copying and pasting through anything but SubEthaEdit seemed the leave the same problem, even copy-paste through TextWrangler left the file a mess.

As noted in my commit message:

Getting the current domain in a Drupal site

drupal get url base

My way:

$url = $_SERVER['HTTP_REFERER']
$domain = parse_url($url, PHP_URL_HOST);
if(substr($domain, 0, 4) == 'www.') $domain = substr($domain, 4);

Used in the Agaric recipe profile for setting the files system location.

The way settings.php did it:

if (isset($_SERVER['HTTP_HOST'])) {
  $domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']);

drupal get url base

My way:

$url = $_SERVER['HTTP_REFERER']
$domain = parse_url($url, PHP_URL_HOST);
if(substr($domain, 0, 4) == 'www.') $domain = substr($domain, 4);

Used in the Agaric recipe profile for setting the files system location.

The way settings.php did it:

if (isset($_SERVER['HTTP_HOST'])) {
  $domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']);

Installing IMAP functions for PHP on Debian: an Agaric saga

Fatal error: Call to undefined function imap_open() in /var/www/drupal-5/modules/contributed/mailhandler-5.x-1.1.tar/mailhandler/mailhandler.module on line 16

Probably the Debian package php-net-imap which installs:

http://pear.php.net/package/Net_IMAP

(no useful documentation there) just doesn't do it.

So:

Fatal error: Call to undefined function imap_open() in /var/www/drupal-5/modules/contributed/mailhandler-5.x-1.1.tar/mailhandler/mailhandler.module on line 16

Probably the Debian package php-net-imap which installs:

http://pear.php.net/package/Net_IMAP

(no useful documentation there) just doesn't do it.

So:

http://us.php.net/manual/en/ref.imap.php

Do it.

Update:

Fascinating.

Searching for
php imap debian
brought nothing useful, just that silly pear package and some defunct Debian and Ubuntu packages.

However, searching for:

Special characters in database password cause error 1045 using mysql via command line

mysql password with percent symbol not working in ssh

mysqldump: Got error: 1045: Access denied for user 'example'@'localhost' (using password: YES) when trying to connect

Here's the password:
8A%2CLrsvi69shN8ty

Internal Agaric communication:

If you use the *correct* password for root-- the mysql root password is not the same as the server root password -- it works.

Using the DB password does not work for me either. I swear it's because the % symbol is messing things up somehow.

mysql password with percent symbol not working in ssh

mysqldump: Got error: 1045: Access denied for user 'example'@'localhost' (using password: YES) when trying to connect

Here's the password:
8A%2CLrsvi69shN8ty

Internal Agaric communication:

If you use the *correct* password for root-- the mysql root password is not the same as the server root password -- it works.

Using the DB password does not work for me either. I swear it's because the % symbol is messing things up somehow.

mysqldump % error

Hunch confirmed:

Backing up a site, manually

Agaric's procedures for backing up a site manually, when we feel like being paranoid, which is quite a lot lately.

Back up the database the Agaric way, including bringing it down to a local computer.

Bring down the files that are not kept in version control:

Ebony:~/Documents/Web Sites Data/COA News & FSTV/media reform job/backup ben$ scp -r ben@66.135.37.243:/var/www/drupal-5-live/sites/democraticmedia.ca/files files

Agaric's procedures for backing up a site manually, when we feel like being paranoid, which is quite a lot lately.

Back up the database the Agaric way, including bringing it down to a local computer.

Bring down the files that are not kept in version control:

Ebony:~/Documents/Web Sites Data/COA News & FSTV/media reform job/backup ben$ scp -r ben@66.135.37.243:/var/www/drupal-5-live/sites/democraticmedia.ca/files files

svn checkout

Say, checking out the groovy in-house version of the Agaric Starter Profile:

svn co https://server.example.com/svn/drupal/profiles/agaric_recipes agaric_recipes

Say, checking out the groovy in-house version of the Agaric Starter Profile:

svn co https://server.example.com/svn/drupal/profiles/agaric_recipes agaric_recipes

Mailhandler, IMAP, round 1

So I set up the mailhandler module, specifically to be able to send pics from my phone that will get posted.. etc.

but, I get this error upon pressing retreive or running cron....

Call to undefined function imap_open() in /srv/drupal-5/live-modules/mailhandler- 5.x-1.1.tar/mailhandler/mailhandler.module on line 16

a bunch of posts say that imap needs to be enabled on the server in php.... can you help me with this?

Did something like apt-get install php-net-imap

So I set up the mailhandler module, specifically to be able to send pics from my phone that will get posted.. etc.

but, I get this error upon pressing retreive or running cron....

Call to undefined function imap_open() in /srv/drupal-5/live-modules/mailhandler- 5.x-1.1.tar/mailhandler/mailhandler.module on line 16

a bunch of posts say that imap needs to be enabled on the server in php.... can you help me with this?

Did something like apt-get install php-net-imap

Editing a sidebar on a page

Hello Lisa,

I apologize for the delay. (A crisis with another client's site-- and all our fault!)

I'm CCing my brother and my friend Danielle who are interested in working with Agaric because this is a good example of the

When you log into the site, you should see an "Edit" tab (following "View" and possibly followed by "Revisions") on each page.

This is somewhat subtle and can be missed: it's directly under the title.

HOWEVER in this case the services provided appear to be listed in the sidebar, and so in a "block".

Edit these at:

<

blockquote>Hello Lisa,

I apologize for the delay. (A crisis with another client's site-- and all our fault!)

I'm CCing my brother and my friend Danielle who are interested in working with Agaric because this is a good example of the

When you log into the site, you should see an "Edit" tab (following "View" and possibly followed by "Revisions") on each page.

This is somewhat subtle and can be missed: it's directly under the title.

HOWEVER in this case the services provided appear to be listed in the sidebar, and so in a "block".

Edit these at:

Syndicate content