Top Host e drupal 7

Caricando Drupal 7 su TOP HOST  ci sono due o tre cosette da sapere

Prima di tutto le direttive dei file .htaccess,che permettono la navigazione alle cartelle, devono avere la riga Options +FollowSymLinks commentata o renderanno una sequenza spiacevole di errori di tipo 500. Questo è il contenuto tipo del .htaccess principale, quello della root del sito (dentro /htdocs, per intenderci):

#
# Apache/PHP/site settings:
#

# Protect files and directories from prying eyes:

Order deny,allow
Deny from all


# Set some options
# non supportato da aruba
#Options -Indexes
# non supportato da aruba
#Options +FollowSymLinks

# Customized server error messages:
ErrorDocument 404 /index.php

# Set the default handler to index.php:
# non supportato da aruba
# DirectoryIndex index.php

# Overload PHP variables:

   # If you are using Apache 2, you have to use 
   # instead of .
   php_value register_globals        0
   php_value track_vars              1
   php_value short_open_tag          1
   php_value magic_quotes_gpc        0
   php_value magic_quotes_runtime    0
   php_value magic_quotes_sybase     0
   php_value arg_separator.output    "&"
   php_value session.cache_expire    200000
   php_value session.gc_maxlifetime  200000
   php_value session.cookie_lifetime 2000000
   php_value session.auto_start      0
   php_value session.save_handler    user
   php_value session.cache_limiter   none
   php_value allow_call_time_pass_reference  On


# Various rewrite rules

  RewriteEngine on

  # Modify the RewriteBase if you are using Drupal in a subdirectory and the
  # rewrite rules are not working properly:
  RewriteBase /

  # Rewrite old-style URLS of the form 'node.php?id=x':
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x':
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite URLs of the form 'index.php?q=x':
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


# $Id: .htaccess,v 1.58 2004/10/09 20:41:49 dries Exp $
e questi sono i .htaccess da metter SOLO nelle directory navigabili dagli utenti (sites/default/files , sites/default/files/styles e sottodirectory che contengono le icone di anteprima ecc) Se ottenete un 500 è probabile sia dovuto alla direttiva "FollowSymLinks" che top host ha disattivato per problemi di sicurezza:
 
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +SymLinksIfOwnerMatch
# Options +FollowSymLinks

Una volta superato lo scoglio della navigabilità all'interno delle cartelle (e dei permessi, da settare a 755 (ossia drwxr-xr-x) ottenevo un funereo 

fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 190357 bytes) in /home/mhd-01/...ecc ecc
E' bastato aggiungere
 
ini_set(”memory_limit”,”64M”);
 
a riga 2 di index.php (e di update.php, se doveste avere bisogno di updatare il Db dopo un aggiornamento)
Per i vari fatal error (indipendenti da Top Host)  sul caricamento immagini e per il fatal del wisywig , applicare la patch  o più semplicemente scaricare il modulo nell'ultima versione e aggiornare il DB (/update.php).
Per quanto riguarda il modulo media_gallery () bisogna trasformare il tipo da number a float ('type' => 'list_float')
Ovverossia sostituite le righe col - davanti a quelle col + nelle righr 210  e 257 del file media_gallery.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media_gallery/media_gallery.install,v
retrieving revision 1.2
diff -u -p -r1.2 media_gallery.install
--- media_gallery.install	21 Oct 2010 16:26:44 -0000	1.2
+++ media_gallery.install	6 Jan 2011 17:20:40 -0000
@@ -210,7 +212,7 @@ function _media_gallery_controlled_field
       'field_name' => 'media_gallery_columns',
       'cardinality' => 1,
       'locked' => TRUE,
-      'type' => 'list_number',
+      'type' => 'list_float',
       'settings' => array(
         'allowed_values_function' => '_media_gallery_get_columns_values',
       ),
@@ -257,7 +259,7 @@ function _media_gallery_controlled_field
       'field_name' => 'media_gallery_block_columns',
       'cardinality' => 1,
       'locked' => TRUE,
-      'type' => 'list_number',
+      'type' => 'list_float',
       'settings' => array(
         'allowed_values_function' => '_media_gallery_get_block_columns_values',
       ),
 
Il rotating-banner, invece, si sistema semplicemente cambiando alla linea 251 di sites/all/modules/rotating_banner/rotating_banner.admin.inc
 
function rotating_banner_add_form(&$form, &$form_state) {
 
in
 
function rotating_banner_add_form($form, &$form_state) {
 
insomma, da  &$form a $form :) 
Invece il 
Fatal error: Declaration of EntityAPIController::resetCache() must be compatible with that of DrupalEntityControllerInterface

si risolve applicando la patch al file entity.controller.inc alla linea 326 Quindi la sezione di codice passa da

   public function resetCache() {
    $this->entityCache = array();
    unset($this->defaultEntities);
    $this->defaultsFiltered = FALSE;
  }

a

  public function resetCache(array $id = NULL) {
    unset($this->defaultEntities);
    if (isset($id)) {
      unset($this->entityCache[$id]);
    }
    else {
      $this->entityCache = array();
    }
  }

come spiegato nel http://drupal.org/node/985648.

Un altra cosa che non  mi era mai capitata prima di mettere un sito su Top Host, è il dover dare il permesso a 

Overlay
Access the administrative overlay

anche agli utenti anonimi per poter accedere all'overlay dellla lightbox indecision vabè.

Il sito ancora in costruzione è visibile quì