Difference between revisions of "Drupal"

From Blue-IT.org Wiki

(2. server wide in php.ini)
Line 1: Line 1:
 +
= Drupal 7 on Ubuntu Maverick / Debian Lenny with postgresql =
 +
 +
1. Prepare the php environment:
 +
sudo apt-get install php5-pgsql
 +
 +
For lenny it might be necessary to use the php version from [http://www.dotdeb.org/instructions/ dotdeb.org].
 +
 +
2. Prepare [[Postgres_SQL#Ubuntu_Feisty.2C_Gutsy.2C_Hardy.2C_....2C_Maverick_.288.4.29|Postgres_SQL on Ubuntu]] as described.
 +
 +
3. Install a database and user as described in the ''INSTALL.pgsql.txt'' file of the Drupal Installation.
 +
 +
4. Edit the drupal configuration file as described in the INSTALL.txt like this
 +
[...]
 +
$databases['default']['default'] = array(
 +
    'driver' => 'pgsql',
 +
    'database' => 'db_name',
 +
    'username' => 'db_user_name',
 +
    'password' => 'db_pass',
 +
    'host' => 'localhost',
 +
    'prefix' => '',
 +
);
 +
$databases = array();
 +
[...]
 +
 +
5. Edit an apache configuration file
 +
<VirtualHost drupal7.localhost:80>
 +
  NameVirtualHost  drupal7.localhost
 +
  DocumentRoot /path/to/drupal7/
 +
 +
  <Directory "/path/to/drupal7/">
 +
    Options ExecCGI FollowSymLinks
 +
    DirectoryIndex index.php
 +
    AllowOverride None
 +
    Order allow,deny
 +
    Allow from all
 +
    DefaultType application/x-httpd-php
 +
 +
    RewriteEngine on
 +
    RewriteBase /
 +
    RewriteCond %{REQUEST_FILENAME} !-f
 +
    RewriteCond %{REQUEST_FILENAME} !-d
 +
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
 +
 +
  </Directory>
 +
 +
</VirtualHost>
 +
 +
6. Start the installation within your webbrowser.
 +
 +
 +
 
= Troubleshooting =
 
= Troubleshooting =
 
== Color module not working ==
 
== Color module not working ==

Revision as of 19:35, 8 January 2011

Drupal 7 on Ubuntu Maverick / Debian Lenny with postgresql

1. Prepare the php environment:

sudo apt-get install php5-pgsql

For lenny it might be necessary to use the php version from dotdeb.org.

2. Prepare Postgres_SQL on Ubuntu as described.

3. Install a database and user as described in the INSTALL.pgsql.txt file of the Drupal Installation.

4. Edit the drupal configuration file as described in the INSTALL.txt like this

[...]
$databases['default']['default'] = array(
   'driver' => 'pgsql',
   'database' => 'db_name',
   'username' => 'db_user_name',
   'password' => 'db_pass',
   'host' => 'localhost',
   'prefix' => ,
);
$databases = array();
[...]

5. Edit an apache configuration file

<VirtualHost drupal7.localhost:80>
 NameVirtualHost  drupal7.localhost
 DocumentRoot /path/to/drupal7/
 <Directory "/path/to/drupal7/">
   Options ExecCGI FollowSymLinks
   DirectoryIndex index.php
   AllowOverride None
   Order allow,deny
   Allow from all
   DefaultType application/x-httpd-php
   RewriteEngine on
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
 </Directory>

</VirtualHost>

6. Start the installation within your webbrowser.


Troubleshooting

Color module not working

File permissions has to be set to public !

Uploading files is not visible in the edit area

Check "content types" (german: Inhaltstypen) from the menu and activate the appropriate feature for the given content type (e.g. page, articel, blog, ...)

Contact form

* The contact form module has an entry in the "navigation" (!) menu which is NOT aktivated by default. Simply pput it e.g. into the secondary links.

PHP memory mimits

There are two ways to do this:

1. locally in your drupal installation

If error messages occur about memory limit when you try to install modules then edit sites/default/settings.php and add the following line:

ini_set('memory_limit',             '24M');

This sets memory limit on a per site basis.

The other way is to edit serverwide (!) apache's /etc/php5/apache2/php.ini and customize the value there. Image processing needs - for drupal 6 - a minimal amount of 96M memory size!

 memory_limit = 96M      ; Maximum amount of memory a script may consume (16MB)

2. server wide in php.ini

You can also set the memory limit server wide in the php.ini file of your webserver.

You can find it in the /etc/php5/apache2 directory.

Not satisfied with Translation (.po files)

Edit the .po files for the translation and add them via the translation module.

You can also add the following module which filters active content:

Alter Strings

Go to Setting->Translation and click to the Search button.

Search for

@username's blog

and add your own translation.

Cron

On your sit enable cron

crontab -e -u www-data

and enter a line like (45 runs every hour)

# m h  dom mon dow   command
 45 *  *   *   *     /usr/bin/lynx -source http://example.com/cron.php

or use wget to achieve the same:

  0 *  *   *   *     wget -O - -q -t 1 http://www.example.com/cron.php

Links

Default

Modules / Addons