Monday, February 18, 2008

Drupal 6 on 1and1.com

I successfully installed Drupal 6 today on a 1and1.com shared hosting plan.

I created the MySQL db (mySQL Version 5) and uploaded the files for the site to a folder that was alone on a subdomain.

I hit the site, the first step asked me to select a language. The next screen gave me an error saying that register_globals needed to be disabled.

I checked .htaccess in the root and for php 5 register_globals was set to 0.

After trying a handful of different things, all I needed to do was create a file called php.ini and add it to the root of the site. It only has 1 line of text:

register_globals = off

I found this on a Drupal.org comment here.

hopefully this saves at least one other person some grief.

2008.03.03 UPDATE: I kept running out of memory so I added the following line to php.ini:
memory_limit = 40M

I don't have a good reason to pick 40M, it seems to be running fine now though.

2008.10.19 UPDATE: I am installing Uberart 1.5 Deluxe (running Drupal 5.11) and the same php.ini file was required.

12 Comments:

Anonymous Anonymous said...

Consider this one person you've saved from some grief. Thanks!

One minor addition to this in case anyone else runs into this... if you're installing drupal on a subdirectory of your main 1and1 account (say, if you're running multiple sites from one 1and1 account), the php.ini needs to be in the drupal directory, not the root of the whole account.

5:44 PM  
Blogger Sarah Nadine said...

I don't mean to bother you but I could use some help. I installed drupal successfully a year ago with 1&1. I am now attempting to install it on a different domain. I unpacked the latest version and uploaded it to my server so that the install.php is in the root. I keep getting a 404 error when I point my browser to the domain. Is there something I'm doing wrong with 1&1 that is preventing me from being able to access the content there? If you have any experience with this, I would definitely appreciate it. My email is: misscoffey@gmail.com

8:00 PM  
Anonymous Anonymous said...

Yes...save (at least) one more person from the pain! Me! Thanks!!

2:56 AM  
Blogger Unknown said...

i was just trying to install drupal on my 1and1 shared hosting. got the same error message... found this info and was up and running immediately. thanks alot!

7:40 AM  
Anonymous Anonymous said...

hmmmm - i think i'm up against this:

http://faq.1and1.com/scripting_languages_supported/php/16.html

1and1 seems to have a 20m memory limit regardless of what you put in php.ini

I have a number of modules installed it fails with :

Fatal error: Out of memory (allocated 33554432) (tried to allocate 1470355 bytes) in drupal-6.6/includes/database.mysqli.inc on line 303

:-(

8:00 AM  
Anonymous Anonymous said...

YOU ARE SO AMAZING. I have been trying to install drupal for a while. Thanks for posing your results.

9:06 AM  
Blogger Swift Arrow said...

You have saved a good many people many hours of hair-pulling!

For me, however, it was your first commentor, stating that php.ini had to be in the root of the _drupal_ install, not in the root folder.

1:55 AM  
Anonymous Charlie said...

You can put the php.ini settings into the root of your entire site or just in the Drupal root folder, as the settings will affect all subfolders (unless a subfolder defines it's own settings).

But this is a moot point, the real solution is to put a .htaccess file in the root of your site with this line in it:

AddType x-mapp-php5 .php

This tells your shared server @ 1and1 to use php 5 instead of 4. php5 not only has register_globals disabled by default but there are a lot of other useful functions, memory and speed improvements, etc., that give it a broad advantage over php4.

10:54 AM  
Anonymous Anonymous said...

thank you... :) saved one more.

12:09 PM  
Blogger Unknown said...

Deciding upon a content management system is highly important long-term I now only use Drupal. Because As I researched and found out the influential non-profits with Fight Hunger and UNICEF use Durpal, I picked Drupal For Drupal hosting I selected Pantheon with features like SFTP access to build on-server What CMS do you like?

Drupal Dedicated Hosting

2:56 AM  
Anonymous Drupal Dedicated Hosting said...

Selecting your content management system is highly significant I develop with Drupal. Because When I discovered the largest sports websites like Golf.com use Durpal, I pulled the trigger For my hosting I selected Pantheon with SFTP access to build on-server What Content Management System do you develop on?

3:15 AM  
Anonymous Drupal Hosting said...

Picking your CMS is very important long-term I advocate Drupal. Because Seeing that the most well known companies like Cisco use Durpal, my mind was made up For Drupal hosting I went with Pantheon with features like Multidev What Content Management System do you like and why?

4:06 AM  

Post a Comment

<< Home