Oops, deleted super user Drupal 6, what to do? maybe you emptied user table?

I left my thinking cap off and emptied the user table of a dev Drupal 6 site I was working on. If that happens to you, just access your database with phpMyAdmin or similar, and:

INSERT INTO users (uid, name, pass) VALUES ('1', 'yourname', md5('yourpassword'));

then edit the users table further to add your email address and set status = 1.

Drupal 6 Programmatically Create Users

How to programmatically create new users in Drupal 6:

'pass' => 'password', // note: do not md5 the password
'mail' => 'email address',
'status' => 1,
'init' => 'email address'
user_save(null, $newUser);

To update an existing user:

some_property = 'what_you_want_to_set_it_to';

// save existing user
user_save((object) array('uid' => $existingUser->uid), (array) $existingUser);

List of Citizen Science applications / web sites / mobile phone applications

Hello. I am trying to compile a list of web sites and mobile phone applications wherein people are using technology to enable citizen science. If you know of a project I do not have listed, can you add it via the comments, and I will add it to the list? Thanks!







eBird and Cornell seem most successful, check out these quick facts: More than 60 scientific papers have used Cornell Lab citizen-science data since 1997
97,331 checklists reported from the four-day Great Backyard Bird Count in 2010
More than 96,000 nesting attempts reported to the Cornell Lab since 1997
1,000,000 bird observations reported to eBird on average each month
More than 80,000,000 bird observations in the Avian Knowledge Network


Cornell cit sci page






Project Noah



Leaf Snap



What's Invasive



Google's Open Data Kit




mapping of sudden oak death





will be adding android, iphone apps, and probably expanding to WildCount.org


at Project Noah

there are other projects linked to from project noah site – ladybugs, many many more, some lame, some real good



National Phenology Network





Cornell is involved in multiple apps, with iphone stuff too, having trouble finding all my links -Dave See http://www.birds.cornell.edu/page.aspx?pid=1664


Tucson Bird Count






California Roadkill iphone app



New York, iphone app, horseshoe crabs



multiple projects Cornell Ornithology


multiple citizen science projects listed here, all related to ornithology


Vermont Herp Atlas





Dave is developing the backend / data entry and presentation part of this site.


iPhone apps for citizen science



gulf oil / oil spills cit sci apps



IBM's Creek Watch



interesting article cit sci iphone





has an iphone app coming, built one for RedwoodWatch


plants, leaves



planetary science and cit sci






Discovery's SciSpy



The Great Yew Tree Hunt





EpiCollect.net provides a web application for the generation of forms and freely hosted project websites (using Google's AppEngine) for many kinds of mobile data collection projects.
Data can be collected using multiple mobile phones running either the Android Operating system or the iPhone (using the EpiCollect mobile app) and all data can be synchronised from the phones and viewed centrally (using Google Maps) via the Project website or directly on the phones.


connected to EpiCollect



The Gila Monster Project


to be intergrated into HerpCount.org

HerpCount.org – a new site for citizen science in Herpetology

Working with Phil Rosen, Kevin Bonine, Julia Fonseca, and Brian Powell, I have in my free time developed a cool site for citizen herpetologists. It enables citizen scientists to contribute observational data on herps of southern Arizona. In the next few months, we hope to add iPhone and Android applications to it, and to make many improvements to the site. We also want to expand its scope both geographically and taxonomically.

Check it out – HerpCount.org.

We have even gotten some press on it already, for example, here: article on HerpCount.

No one can log in to Drupal, several possibilities why

You have a Drupal site that is working fine, and then you discover it seems like all of a sudden, no one can login.

This happened to me, and it turned out to be connected to setting the cookie domain in the settings.php file. I set it at FCK Editor’s bequest. And then all heck broke loose, no one could log in. Commenting out the cookie domain line in the settings.php file solved the problem.

If you are moving between production and development versions of a site, then also check the cookie domain setting the sites/default/settings.php is correctly set for each installation.

Another time, it was connected to a cookie domain issue in which Drupal had upgraded how cookies were handled, and if the cookie domain line was set, users had to delete their old cookies in order to be able to log in. I think this happened around the updates somewhere between Drupal 6.16 to 6.20.

It looks in general like if you are experiencing this issue, no one can login, and it is not the cookie domain issue I had, then investigate as such:

i.e. other things to potentially try:

repair your database tables with phpMyAdmin or similar, in particular, the Sessions table. Empty your cache tables – this unlikely to be relevant, but heh I just like clearing them out, it makes me feel good, like everything feels neater and tidier that way 🙂 Delete the browser cookies associated with the site in question.

Most likely it is cookie related somehow.

Any one else have this problem, and it be a different fix? Please comment and let us know…

git insufficient permission for adding an object to repository database ./objects

strangely, I had been pushing to this repository for weeks no problems. Then one day I get the error message for the title above:

$git push
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 506 bytes, done.
Total 5 (delta 2), reused 0 (delta 0)
error: insufficient permission for adding an object to repository database ./objects
fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit

I was a member of the group in question, checked via:

$ groups myusername

and verified that group had write permissions:

$ ls -la

Turned out a few files had shown up in the object directory with different permissions.

To fix:

ssh to server
cd your-repository.git

sudo chmod -R g+ws *
sudo chgrp -R yourgroup *

and maybe:

git repo-config core.sharedRepository true

and then try to push again

How To Move Your Drupal or WordPress Web Site to Amazon EC2 and Get Free Fast Hosting for a Year

Tired of slow shared hosting? Now you can move your Drupal or WordPress web site to Amazon’s EC2 cloud services, and you can even get free hosting for a year! That’s because Amazon has a deal going on to attract new users – they call it their free tier deal. Check it out, sign up.

Amazon’s EC2 service lets you create virtual servers of your own in their cloud. They have since added EBS (Elastic Block Store) and it is the addition of EBS that makes them very attractive for hosting your typical WordPress or Drupal web site, because it gives you persistent storage. The free deal is for running a single micro instance. A micro instance provides nominal computing power all of the time, with the ability to jump up to 2 EC2 Compute Units on demand, and 613 MB of memory. A normal small instance gives 1 EC2 Compute Unit all the time, along with 1.73 GB of memory. A small instance is not free, runs about $80 a month for most after it is all said and done. But the micro instance is great for most sites. I am running four low-traffic WordPress sites and 2 decent traffic Drupal sites on one micro instance, and I get fast page loads — I am very pleased. All told I only see about 1000 page views a day, but on shared hosting all I had was trouble and slow loading pages. And free for a year with low rates after that? Who can complain? Well, there is a downside. You have to configure and manage your server. It is not like with shared hosting where they have everything mostly set up for you.

But managing your own server is not that hard if you are interested in it at all. Setting up a mail server was the hardest part for me. And I detail all the steps below, for your reference, and as I future reference for myself. To save time, I refer you to other guides I used for parts of it.

So you signed up at http://aws.amazon.com/free/ – once you get your emails back from Amazon saying you are good to go, then it is time to log in to the AWS Management Console. Go here: http://aws.amazon.com/console/ and click on the button on the right side to sign in (choose the EC2 popdown next to the button).

First set up a security group. This is like a firewall setup. You’ll want to add SSH for port 20, for SSH access to the server. And you’ll want http access on port 80, and possible https access on port 443. Refer to the section “Setting up a security group” on this guide for more information.

Next, choose Key Pairs from the side bar menu and create a new key pair. This is used for authentication when SSH’ing into your server. More secure than password based authentication. For more info, see “Setting up your AWS account and tools” section in this guide. Save your key pem somewhere where you will not be likely to delete it on your computer.

Note, if setting up a micro instance, the guide I refer to above has information you should not follow about setting up persistent storage, because that article was written before EBS became available.

Now it is time to pick an AMI – Amazon Machine Image. This is like your virtual servers set up – what version or distribution of Linux you want to use, all ready to go. An Amazon Machine Image (AMI) is an encrypted machine image that contains all information necessary to boot instances of your operating system and software. For example, an AMI might contain all the software to act as a web server (e.g., Linux, Apache, and your web site). I went with Ubuntu Lucid LTS. Ubuntu is popular, well supported, and I like that they make long term support versions catering to web server use. From Amazon’s Help Guide:

To use Amazon EC2, you launch one or more instances of an AMI. An instance might be one web server within a web server cluster or one Hadoop node.

When launching AMIs, you can select an Amazon-provided AMI, a public AMI that another Amazon EC2 user provided, or an AMI that you create.

An Amazon EC2 instance can be launched from an AMI backed by either Amazon S3 or by Amazon EBS. Instances launched from AMIs backed by Amazon S3 use the local instance store as the root device (e.g., / or C:). An instance launched from an AMI backed by Amazon EBS uses an Amazon EBS volume as its root device.

I used ami-3e02f257. Make sure you pick an EBS (Elastic Block Store) version of an ami – micro instances require it.

More to come…