« October 2011 | Main | December 2011 »

November 29, 2011

Karmic Repository Gone

Started getting a crazy error from Ubuntu's update manager which I think derives from my use of PHP5.2 instead of the latest version because of drupal issues (more on that here). The uber-output is below the fold, here's a snippet:

$ sudo apt-get update

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/karmic-security/main/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.166 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/karmic-security/restricted/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.166 80]

E: Some index files failed to download, they have been ignored, or old ones used instead.

The strange thing is my sources.list is not as described in the blogpost I linked above. For some reason I don't recall, I needed to update this file instead with the new, old repository:

$ sudo nano /etc/apt/sources.list.d/karmic.list

Wait a sec, it is because I used this script which created the karmic.list source.



$ sudo apt-get update
Get:1 http://dl.google.com stable Release.gpg [198B]
Hit http://lib.stat.cmu.edu lucid/ Release.gpg
Ign http://dl.google.com/linux/chrome/deb/ stable/main Translation-en_US
Ign http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu/ lucid/ Translation-en_US
Get:2 http://dl.google.com stable Release [1,347B]
Hit http://lib.stat.cmu.edu lucid/ Release
Hit http://us.archive.ubuntu.com lucid Release.gpg
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/main Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/restricted Translation-en_US
Hit http://security.ubuntu.com lucid-security Release.gpg
Ign http://security.ubuntu.com/ubuntu/ lucid-security/main Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/restricted Translation-en_US
Ign http://lib.stat.cmu.edu lucid/ Packages
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://lib.stat.cmu.edu lucid/ Packages
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/universe Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/multiverse Translation-en_US
Hit http://us.archive.ubuntu.com lucid-updates Release.gpg
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/restricted Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/universe Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com karmic Release.gpg
Ign http://security.ubuntu.com/ubuntu/ lucid-security/universe Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/multiverse Translation-en_US
Ign http://security.ubuntu.com karmic-security Release.gpg
Ign http://security.ubuntu.com/ubuntu/ karmic-security/main Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ karmic-security/restricted Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ karmic-security/universe Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ karmic-security/multiverse Translation-en_US
Hit http://security.ubuntu.com lucid-security Release
Hit http://lib.stat.cmu.edu lucid/ Packages
Ign http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release
Get:3 http://dl.google.com stable/main Packages [1,220B]
Ign http://us.archive.ubuntu.com/ubuntu/ karmic/main Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ karmic/restricted Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ karmic/universe Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ karmic/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com karmic-updates Release.gpg
Ign http://us.archive.ubuntu.com/ubuntu/ karmic-updates/main Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ karmic-updates/restricted Translation-en_US
Ign http://security.ubuntu.com karmic-security Release
Hit http://ppa.launchpad.net lucid Release
Ign http://us.archive.ubuntu.com/ubuntu/ karmic-updates/universe Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ karmic-updates/multiverse Translation-en_US
Hit http://us.archive.ubuntu.com lucid Release
Hit http://security.ubuntu.com lucid-security/main Packages
Hit http://security.ubuntu.com lucid-security/restricted Packages
Hit http://security.ubuntu.com lucid-security/main Sources
Hit http://security.ubuntu.com lucid-security/restricted Sources
Hit http://security.ubuntu.com lucid-security/universe Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Sources
Hit http://us.archive.ubuntu.com lucid-updates Release
Ign http://us.archive.ubuntu.com karmic Release
Ign http://us.archive.ubuntu.com karmic-updates Release
Hit http://security.ubuntu.com lucid-security/universe Sources
Hit http://security.ubuntu.com lucid-security/multiverse Packages
Hit http://security.ubuntu.com lucid-security/multiverse Sources
Ign http://security.ubuntu.com karmic-security/main Packages
Ign http://security.ubuntu.com karmic-security/restricted Packages
Ign http://security.ubuntu.com karmic-security/main Sources
Ign http://security.ubuntu.com karmic-security/restricted Sources
Ign http://security.ubuntu.com karmic-security/universe Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://us.archive.ubuntu.com lucid/main Packages
Hit http://us.archive.ubuntu.com lucid/restricted Packages
Hit http://us.archive.ubuntu.com lucid/main Sources
Hit http://us.archive.ubuntu.com lucid/restricted Sources
Hit http://us.archive.ubuntu.com lucid/universe Packages
Hit http://us.archive.ubuntu.com lucid/universe Sources
Hit http://us.archive.ubuntu.com lucid/multiverse Packages
Hit http://us.archive.ubuntu.com lucid/multiverse Sources
Ign http://security.ubuntu.com karmic-security/universe Sources
Ign http://security.ubuntu.com karmic-security/multiverse Packages
Ign http://us.archive.ubuntu.com karmic/main Packages
Ign http://us.archive.ubuntu.com karmic/restricted Packages
Ign http://us.archive.ubuntu.com karmic/main Sources
Ign http://us.archive.ubuntu.com karmic/restricted Sources
Ign http://us.archive.ubuntu.com karmic/universe Packages
Ign http://us.archive.ubuntu.com karmic/universe Sources
Ign http://us.archive.ubuntu.com karmic/multiverse Packages
Ign http://security.ubuntu.com karmic-security/multiverse Sources
Ign http://security.ubuntu.com karmic-security/main Packages
Ign http://security.ubuntu.com karmic-security/restricted Packages
Ign http://security.ubuntu.com karmic-security/main Sources
Ign http://security.ubuntu.com karmic-security/restricted Sources
Ign http://us.archive.ubuntu.com karmic/multiverse Sources
Ign http://us.archive.ubuntu.com karmic-updates/main Packages
Ign http://us.archive.ubuntu.com karmic-updates/restricted Packages
Ign http://us.archive.ubuntu.com karmic-updates/main Sources
Ign http://us.archive.ubuntu.com karmic-updates/restricted Sources
Ign http://us.archive.ubuntu.com karmic-updates/universe Packages
Ign http://us.archive.ubuntu.com karmic-updates/universe Sources
Ign http://us.archive.ubuntu.com karmic-updates/multiverse Packages
Ign http://security.ubuntu.com karmic-security/universe Packages
Ign http://security.ubuntu.com karmic-security/universe Sources
Ign http://us.archive.ubuntu.com karmic-updates/multiverse Sources
Hit http://us.archive.ubuntu.com lucid-updates/main Packages
Hit http://us.archive.ubuntu.com lucid-updates/restricted Packages
Hit http://us.archive.ubuntu.com lucid-updates/main Sources
Hit http://us.archive.ubuntu.com lucid-updates/restricted Sources
Hit http://us.archive.ubuntu.com lucid-updates/universe Packages
Hit http://us.archive.ubuntu.com lucid-updates/universe Sources
Ign http://security.ubuntu.com karmic-security/multiverse Packages
Ign http://security.ubuntu.com karmic-security/multiverse Sources
Err http://security.ubuntu.com karmic-security/main Packages
404 Not Found [IP: 91.189.92.166 80]
Err http://security.ubuntu.com karmic-security/restricted Packages
404 Not Found [IP: 91.189.92.166 80]
Err http://security.ubuntu.com karmic-security/main Sources
404 Not Found [IP: 91.189.92.166 80]
Hit http://us.archive.ubuntu.com lucid-updates/multiverse Packages
Hit http://us.archive.ubuntu.com lucid-updates/multiverse Sources
Ign http://us.archive.ubuntu.com karmic/main Packages
Ign http://us.archive.ubuntu.com karmic/restricted Packages
Ign http://us.archive.ubuntu.com karmic/main Sources
Ign http://us.archive.ubuntu.com karmic/restricted Sources
Ign http://us.archive.ubuntu.com karmic/universe Packages
Ign http://us.archive.ubuntu.com karmic/universe Sources
Err http://security.ubuntu.com karmic-security/restricted Sources
404 Not Found [IP: 91.189.92.166 80]
Err http://security.ubuntu.com karmic-security/universe Packages
404 Not Found [IP: 91.189.92.166 80]
Ign http://us.archive.ubuntu.com karmic/multiverse Packages
Ign http://us.archive.ubuntu.com karmic/multiverse Sources
Ign http://us.archive.ubuntu.com karmic-updates/main Packages
Ign http://us.archive.ubuntu.com karmic-updates/restricted Packages
Ign http://us.archive.ubuntu.com karmic-updates/main Sources
Ign http://us.archive.ubuntu.com karmic-updates/restricted Sources
Ign http://us.archive.ubuntu.com karmic-updates/universe Packages
Err http://security.ubuntu.com karmic-security/universe Sources
404 Not Found [IP: 91.189.92.166 80]
Err http://security.ubuntu.com karmic-security/multiverse Packages
404 Not Found [IP: 91.189.92.166 80]
Err http://security.ubuntu.com karmic-security/multiverse Sources
404 Not Found [IP: 91.189.92.166 80]
Ign http://us.archive.ubuntu.com karmic-updates/universe Sources
Ign http://us.archive.ubuntu.com karmic-updates/multiverse Packages
Ign http://us.archive.ubuntu.com karmic-updates/multiverse Sources
Err http://us.archive.ubuntu.com karmic/main Packages
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic/restricted Packages
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic/main Sources
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic/restricted Sources
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic/universe Packages
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic/universe Sources
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic/multiverse Packages
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic/multiverse Sources
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic-updates/main Packages
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic-updates/restricted Packages
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic-updates/main Sources
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic-updates/restricted Sources
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic-updates/universe Packages
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic-updates/universe Sources
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic-updates/multiverse Packages
404 Not Found [IP: 91.189.92.177 80]
Err http://us.archive.ubuntu.com karmic-updates/multiverse Sources
404 Not Found [IP: 91.189.92.177 80]
Fetched 2,765B in 1s (1,752B/s)
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/karmic-security/main/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.166 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/karmic-security/restricted/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.166 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/karmic-security/main/source/Sources.gz 404 Not Found [IP: 91.189.92.166 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/karmic-security/restricted/source/Sources.gz 404 Not Found [IP: 91.189.92.166 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/karmic-security/universe/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.166 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/karmic-security/universe/source/Sources.gz 404 Not Found [IP: 91.189.92.166 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/karmic-security/multiverse/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.166 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/karmic-security/multiverse/source/Sources.gz 404 Not Found [IP: 91.189.92.166 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic/main/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic/restricted/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic/main/source/Sources.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic/restricted/source/Sources.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic/universe/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic/universe/source/Sources.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic/multiverse/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic/multiverse/source/Sources.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic-updates/main/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic-updates/restricted/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic-updates/main/source/Sources.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic-updates/restricted/source/Sources.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic-updates/universe/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic-updates/universe/source/Sources.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic-updates/multiverse/binary-i386/Packages.gz 404 Not Found [IP: 91.189.92.177 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/karmic-updates/multiverse/source/Sources.gz 404 Not Found [IP: 91.189.92.177 80]

E: Some index files failed to download, they have been ignored, or old ones used instead.

Posted by kkwaiser at 04:11 PM | Comments (0) | TrackBack

Query for Webform Submissions - Snippets

$ip = '::1';

// execute sql using db_query
$sid_sql = db_query("SELECT n.sid FROM drupal_webform_submissions n WHERE n.remote_addr = '%s' ", $ip);

// fetch database results in an array
$results = array();
while ($row = db_fetch_array($sid_sql)) $results[] = $row;

//get last sid as an array $last_sid["sid"]
$last_sid = end($results);

// query to retrieve submitted webform data
$webform_sql = db_query("SELECT data FROM drupal_webform_submitted_data n WHERE n.sid = '%s' ", $last_sid["sid"]);

// fetch database results in an array
$webform_submission = array();
while ($row = db_fetch_array($webform_sql)) $webform_submission[] = $row;

/*put $webform_submission information into message body*/

Notes:

Another option
is to use a webform hook but this returns all of the submissions:

module_load_include('inc', 'webform', 'webform_submissions');
$values = webform_get_submissions($nid, null, $user->uid, 1);

Posted by kkwaiser at 03:15 PM | Comments (0) | TrackBack

Auto-notification of file download

Headache...but at least I see the solution. A sketch:

1- Use squeeze module to collect information from downloader
2- Use Download count to yield a Rules event that will trigger when a file is downloaded
3- Use Custom PHP Rules action to send an email to the Data Set contact with information from the webform

Concerning 3.

- After a lot of googling, the easiest way to use rules to send an email to a dynamic email address is the documented here.

- The IP Address of the downloader is key here. It is logged by Download Count and by Webform. This means I can query the database using the IP address and pull up the Webform Submission associated with it. I can then put that information into an email to the Data Set Contact.

- The Download Count module also gives me the downloaded file's associated NID. Using this, I can backtrace to the Data Set and eventually get the Data Set contact information.

Posted by kkwaiser at 02:10 PM | Comments (0) | TrackBack

November 28, 2011

Multiple Node Add forms on a single page

A few resources:

A forum post describing almost exactly the same challenge. Gives decent technical details.

A less helpful post on Drupal.org.

A fairly advanced tutorial for accomplishing this with D6.

The Multi Node Edit module seems helpful.

Another D6 How To post.

Multiform Module for Drupal 7 - probably the starting point.

Posted by kkwaiser at 10:39 AM | Comments (0) | TrackBack

November 22, 2011

Drupal permissions link

A bookmark of this permissions post and a reminder to read it carefully.

Posted by kkwaiser at 09:40 AM | Comments (0) | TrackBack

Moderate Sensitivity Data

After placing an initial emphasis on delineating which research data fall under the High Sensitivity category I now wonder which fall under the Moderate Sensitivity category. Data Types such as Proprietary Data and Geolocations of Cultural Assets and Endangered Species* Data fall under High Sensitivity (AKA, Sensitive Data) per UM policy which leaves the cupboard bare at MS.

*Yes, great name and thank you.

-------------------------------------------------------------
What research data are Moderate Sensitivity?

Queue a rampaging google search and documentation session.

University of Iowa (Fight! Fight! Fight! for IOWA!!) - Indicates some research data are of Moderate Sensitivity. I thank you, Hawkeyes, in a highly non-specific manner.
- Update (Jan 16, 2012) - UI's data classification page uses three sensitivity categories. Great minds and all that...

DataONE - the ecological informatics guru's weigh in on this topic- serious adverse effect to an organization as a result of the loss of confidentiality with no examples. Although they do reference FIPS 199 [hint: foreshadowing]

University of Miami does not identify research data as falling under Moderate Sensitivity

Cancer Biomedical Informatics Grid (caBIG) is somewhat specific calling MS data that which is Coded/Limited Data. They also have a somewhat opaque flowsheet for determining Data Sensitivity.

A limited data set is protected health information that excludes certain identifiers but permits the use and disclosure of more identifiers than in a de-identified data set. In particular, the limited data set allows the inclusion of all dates, 5 digit ZIP codes, and city as indirect identifiers. A limited data set may be used only for the purposes of research, public health, or health care operations. - source and another source for good measure.

University of Maryland - overview of data classification from their Office of Information Technology. Despite a barrage of acronyms this is useful.**

- NIST's FIPS 199- Federal governments response to data classification needs brought upon by FISMA
- FISCAM - is the manual that is used by OLA to audit us
- GREAT University Policies - George Washington, Stanford*** and UT-Austin

** Although I wonder how many people this talk has put to sleep.
***Stanford's policies have changed since this presentation was assembled

NIH - Two obscure documents and a presentation that includes the caBIG item I link above define Moderate Sensitivity data, in part, as that which is unpublished.


-------------------------------------------------------------
What have I learned from this Rampaging Google Search and Documentation Session™?

A lot but not too much of immediate use. I'm beginning to think Moderate Sensitivity data include unpublished and unique research data. This creates space for Low Sensitivity data to become published data. The problem is, both categories seem to become catch-alls with a lack of specific examples (aka Data Types).

Posted by kkwaiser at 08:58 AM | Comments (0) | TrackBack

Logging and communicating file downloads. Part Deux

This post is an attempted implementation of a need I've posted on previously, specifically the third point.

This approach brings in two more modules:

Squeeze:

This module also support "squeezing" only files on webpage. I.e. user can open page, but to download any file from this page - he is asked to fill a form. To accomplish this you need to use Filefield CCK field to store files and Filefield Stats module - http://drupal.org/project/filefield_stats

Fieldfield Stats - "is a small module which provides a new formatter that outputs a special link for tracking downloads. Each download tracks the File ID, User ID, Node ID, Host IP & Referrer URI and a timestamp."

h/t: This support request
Alternative to keep an eye on.

Warning! Both of these modules are in development and appear to be D7 dead-ends. That said, the show must go onnnn.

1) Download, install, enable the two modules. Run update.php

2) Create a Webform Node to collect desired information

3) Switch the display style to: Generic files + Stats URL [+ Download Count]
- Data File content type (/admin/content/node-type/data-file/display)
- Modify the view used for Data Files within the Data Set Node Template Panel

4) Navigate to /admin/settings/squeeze
- Set Default Squeeze Form - to webform node from 2)
- Check "Default for 'Show Page'?"
- Enable for Data File and Data Setcontent type

5) Evaluate

While this works as expected, I noticed that Squeeze fires only once per user, regardless of how many nodes they download from. This is good from a usability perspective but doesn't work so well if I want to notify Data Originators when their files are downloaded. I may be able to work around this with some combination of Rules, Download Count, Webform Rules and Webform.

6) Extend further
Initial tests show that Download Count can be used to trigger rules when Public files are downloaded. Next is to use that rule to send an email to the data originator with information from the completed webform.

Posted by kkwaiser at 08:30 AM | Comments (0) | TrackBack

November 21, 2011

Convert Date To Text in OpenOffice

This has baffled me many times but not this time. I am revenge.

Melodramatics aside...

This post offers one solution:

1) =TEXT(A1, "YYYY-MM-DD")
2) followed by Paste All -> Text

Except, the output is prepended with an apostrophe. Why?!?!?!?!

Winner!!

I've just managed to do that by pre-formatting the target cell as text and using the dropdown arrow with the Paste icon, selecting "unformatted text".

Paste-special would not work because,

1. if I de-select "date & time", nothing is pasted;
2. if I select "date & time", the number value of the date is pasted.

You need to have the Paste icon on your toolbar. It has a dropdown list with options which vary according to what is on the clipboard.

Thank you, Noranthon. You are my hero.

Posted by kkwaiser at 03:09 PM | Comments (0) | TrackBack

November 18, 2011

UMBS Tidas Buoy Metadata

Just a few emails to document. But, remember this group as one that could potentially teach others about metadata standards.

Hi Susan,

I'll take a stab at this.

DP - The Depth of the corresponding Temperature Profile Node (in meters)
TP - Temperature Profile Node
TP001 - 14.34 ft
TP002 - 23.26 ft
TP003 - 32.19 ft
TP004 - 41.11 ft
TP005 - 50.00 ft
TP006 - 58.92 ft
TP007 - 67.85 ft
TP008 - 76.77 ft
Note: Previous communication with Heidi indicates that the TP006, TP007, and TP008 should be used with caution as they may have been in the muck.

FM - Appears to be a metadata standard code. Here's what I dug up via Google. I've attached a document located here: ftp://compsweb.marine.usf.edu/pub/misc/eriks/TESAC%20XML%20tags.rt

---------------------------------------
For all platforms that measure salinity and/or water temperature and/or currents, include data with these XML tags:

<fm64iii> set to 820 if temperature and/or currents are measured

set to 830 if salinity is also measured

<fm64xx> set to 99

<fm64k1> set to 7, indicates measurements are at fixed depths

<fm64k2> 0, indicates salinity is not measured

1, indicates salinity accuracy > 0.02 ppt.

2, indicates salinity accuracy < 0.02 ppt.

-----------------------------------


-----------------------------------------
Kyle Kwaiser, Information Manager
University of Michigan Biological Station
2541 Chemistry Bldg.
930 North University Ave.
Ann Arbor, MI, 48109-1055 USA
Ph: 734-615-5005


Quoting Susan Hendricks :

[Hide Quoted Text]
Hi Kyle:

Hope you are doing well.

I have been working with this year's DL buoy data. There are some
parameters however that I can't quite figure out such as the ones listed
below. I sent this to Heidi, but she's so busy, I was wondering if you
could decipher them? Particularly the FMs, DPs TPs; the YSIs are
straightforward as were the meteorological data.

Thanks,

Susan

From: Susan Hendricks [mailto:shendricks@murraystate.edu]
Sent: Tuesday, November 15, 2011 2:06 PM
To: 'Purcell, Heidi'
Subject: column/parameter codes

Hi again Heidi,

I was able to download the data and separate 2011 from 2010. I do, however,
need to know what the following column headings represent. Some of them are
obviously depths and others are YSI parameters...Are all the YSI readings
(except for temp) collected at 1 m depth?

FM64III ()

FM64XX ()

FM64K1 ()

FM64K2 ()

DP001 ()

TP001 ()

DP002 ()

TP002 ()

DP003 ()

TP003 ()

DP004 ()

TP004 ()

DP005 ()

TP005 ()

DP006 ()

TP006 ()

DP007 ()

TP007 ()

DP008 ()

TP008 ()

VBAT (V)

YSITEMP ()

YSISPCOND ()

YSICOND ()

YSIPH ()

YSIORP ()

YSITURB ()

YSICHL ()

YSIBGAPC ()

YSIODOSAT ()

YSIODOVOL

()

Posted by kkwaiser at 09:50 AM | Comments (0) | TrackBack

November 16, 2011

Enhancing Drupal Security

Fun stuff. Here are some notes.

I already plan on using an SSL certificate in conjunction with Secure Pages and Secure Pages Prevent Hijack to encrypt forms I use on the Research Gateway.

A fairly exhaustive page with pointers to security modules.

A nice blog post on 10 security modules yields the following:

Secure Password Hashes - will implement the D7 user password encryption on D6. I need to look into how it cooperates with existing passwords before installing it. It appears version 6.x-2.x of this module will rehash existing passwords. This module creates a new table for storing passwords.

Of course, the Password Module implements this same functionality. It has far fewer users, a better known maintainer and claims a more direct upgrade path the D7. Fuuu. Version 1.x is not a security enhancement. This module doesn't create any new tables which should make the upgrade simpler??

Use Login Security to guard against password guessing and put in place automatic account logging and notification.

Posted by kkwaiser at 03:39 PM | Comments (0) | TrackBack

Setting an SSL Certificate up on ITS servers

Well, the below post was informative for me but not at all the right way to set up SSL on an ITS server. Just between me and the internet, my efforts may have brought down the ITS servers as I received confirmation of my certificate seconds prior to the linked outage. Awesome.

Future reference, just email webmasters@umich.edu to request a NEW certificate. Tell them to disable cosign and to have the https site load content from the same location as the http. Simple as that. Sheesh.

This may morph into a large post or become broken into smaller ones. We'll see.

1. Request an SSL Certificate at the Wasup Portal. Self-explanatory for the most part except...

- Creating the Certificate Signing Request
The Wasup service directs you to Instant SSL Comodo for help, which I found to be not helpful. I recommend going to Digicert to generate the terminal command you need to run to generate your CSR.

Logon to your webserver via ssh. Change to your Private directory and run this command.

% openssl req -new -newkey rsa:2048 -nodes -out umbs_lsa_umich_edu.csr -keyout umbs_lsa_umich_edu.key -subj "/C=US/ST=Michigan/L=Ann Arbor/O=University of Michigan/CN=umbs.lsa.umich.edu"

This generates two files:
umbs_lsa_umich_edu.csr - copy and paste everything from this file into the wasup request form
umbs_lsa_umich_edu.key - remove this from the web server and put it somewhere very safe. I committed it to memory and swallowed the file to destroy it. Steel. Trap.

Interesting command to backout a CSR:
% openssl req -in umbs_lsa_umich_edu.csr -noout -text

If you find SSL certificates confusing (as I do) check out this FAQ page for a layman's overview.

Posted by kkwaiser at 02:47 PM | Comments (0) | TrackBack

November 09, 2011

Installing DEIMS using features

*note* probably best to ignore this post. so so sorry.

1. Get drush up and running

2. Download and rearrange Drupal 6

change directory name:
$ sudo mv drupal-6.22/ d2e

Link to web directory:
$ sudo ln -s /var/d2e/ /var/www/

3. Setup drupal

$ cd d2e/
$ sudo cp sites/default/default.settings.php sites/default/settings.php

change permissions on settings.php
chmod o+w sites/default/settings.php

Setup files directory:
$ sudo mkdir sites/default/files
$ sudo chown www-data\: sites/default/files/

create database
run through Drupal's install process

revert permissions on settings.php
$ sudo chmod a-w sites/default/settings.php

4. Install DEIMS features package

Navigate to DEIMS site

Download tar ball containing many necessary modules: Downloads > Sources > Branches > bdp_metabvist>modules

$ sudo mkdir sites/all/modules
$ cd sites/all/modules
$ sudo wget http://code.google.com/p/deims/source/browse/branches/bdp_metavist/modules/contrib/nbiidev_modules_contrib.tar.gz
$ sudo rm nbiidev_modules_contrib.tar.gz

Modify permissions:
$ sudo chmod 755 -R ../modules/*

Retrieve features package
DEIMS > Downloads > bdp_compliant_metadata-6.x-1.0-dev.tar

$ sudo mv /home/umbs/Downloads/bdp_compliant_metadata-6.x-1.0-dev.tar ../modules/
$ sudo tar -xf bdp_compliant_metadata-6.x-1.0-dev.tar

5. Enable modules and features package
Check Modules page to confirms bdp_compliant_metadata is a module

- Enable a whole bunch of modules, download additional modules not included

- fix getID error
Download 1.7.9 from http://sourceforge.net/projects/getid3

$ sudo mv /home/umbs/Downloads/getid3-1.7.9.zip sites/all/libraries/getid3/
$ cd sites/all/libraries/getid3
$ sudo unzip getid3-1.7.9.zip
$ sudo rm -rf demos

Posted by kkwaiser at 10:54 AM | Comments (0) | TrackBack

November 08, 2011

Installing drush (version 2.0)

Follow instructions drupal.org/project/drush

Install pear:
$ sudo apt-get install php-pear

Fix mcrypt error

Upgrade pear (optional):
$ pear upgrade

Establish channel:
$ sudo pear channel-discover pear.drush.org

Install drush:
$ sudo pear install drush/drush

Try drush:
$ drush

Get error:

The drush command 'help' could not be found. [error]
Drush needs a copy of the PEAR Console_Table library in order to [error]
function, and the attempt to download this file automatically failed
because you do not have permission to write files in
/usr/share/php/drush/includes. To continue you will need to download
the 1.1.3 package from http://pear.php.net/package/Console_Table,
extract it, and copy the Table.php file into Drush's directory as
/usr/share/php/drush/includes/table.inc.

$ sudo wget http://download.pear.php.net/package/Console_Table-1.1.3.tgz
$ sudo tar -xzf Console_Table-1.1.3.tgz
$ sudo mv Console_Table-1.1.3/Table.php /opt/drush/includes/table.inc

Initiated by following error:

SeFatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4864 bytes) in /var/d2e/sites/all/modules/ctools/includes/stylizer.inc on line 1736
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Allowed memory size of 33554432 bytes exhausted (tried to allocate
4864 bytes) in /var/d2e/sites/all/modules/ctools/includes/stylizer.inc, line
1736
Your memory limit is set to 32M; drush needs as much memory to run as Drupal.[error]
Please check your configuration settings in /etc/php5/cli/php.ini or in your
drush.ini file; see examples/example.drush.ini for details.
t memory to same amount that Drupal gets.

Locate where drush config file is located:
$ drush status

$ sudo nano /etc/php5/cli/php.in

Posted by kkwaiser at 05:11 PM | Comments (0) | TrackBack

fixing mcrypt error

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mcrypt.so' - /usr/lib/php5/20060613+lfs/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0

The post in this issue about removing .ini files worked for me.

Posted by kkwaiser at 05:00 PM | Comments (0) | TrackBack

DEIMS Content Type Best Practices

Naming convention for fields

field_[contenttype]_[labelabbreviation][_optional]

Where [_optional] is optional and depends on the field type:

Node reference: _ref
Node referrer: _rfrr
Conditional field: _cf

Further notes:

The Label of a field is inconsequential in terms of generating EML

Suggestion Improvements:
- Use Modal Frame and Node Relationship for creating children nodes from parent (leverages Node Reference field)
- Use conditional fields to simplify Variable node/add form
- Use custom module for separating Code-Definition field
- Use OpenLayers vs Geo or Location

Posted by kkwaiser at 04:06 PM | Comments (0) | TrackBack

LAMP Installation notes

$ sudo apt-get install apache2

$ sudo ufw enable
$ sudo chown root:root /
$ sudo chmod 755 /

Installed PHP 5.2 following the instructions on approach 3

$ sudo apt-get install php5

Add following to (pinched from comments on link above):

$ sudo gedit /etc/apt/preferences.d/php


Package: php5-imap
Pin: version 5.2.6*
Pin-Priority: 991

Package: php5-mcrypt
Pin: version 5.2.6*
Pin-Priority: 991

Posted by kkwaiser at 09:56 AM | Comments (0) | TrackBack