How to Define Database Parameters in Drupal
Drupal knows which database to connect to and what username and password to issue when
establishing the database connection by looking in the settings.php file for your site. This file typically lives at sites/example.com/settings.php or sites/default/settings.php.
The line that defines the database connection looks like this:
$db_url = 'mysql://username:password@localhost/databasename';
This above example is for connecting to a MySQL database. PostgreSQL users would prefix the
connection string with pgsql instead of mysql and the username and password used
- Add new comment
- Read more
- 1199 reads
Images and Image Galleries In Drupal
For creating an image gallery in drupal, the image module (http://drupal.org/project/image) is a good place to start. It handles image resizing and gallery creation.
There are also some very nice solutions when using CCK for displaying images inline.
Imagecache (http://drupal.org/project/imagecache) handles on-the-fly creation of image derivatives (additional modified copies of the uploaded image, such as thumbnails), while imagefield (http://drupal.org/project/imagefield) creates image upload fields within node forms.
- Add new comment
- 662 reads
Where are Session Stored in Drupal
Session informations are stored in the sessions table, which associates session IDs with Drupal user IDs during the DRUPAL_BOOTSTRAP_SESSION phase of bootstrapping. In fact, the $user object, which is used extensively throughout Drupal, is first built during this phase by sess_read() in includes/sessions.inc.
Here’s the table structure in which sessions are stored:
CREATE TABLE {sessions} (
uid int unsigned NOT NULL,
sid varchar(64) NOT NULL default '',
hostname varchar(128) NOT NULL default '',
timestamp int NOT NULL default '0',
cache int NOT NULL default '0',
- Add new comment
- Read more
- 578 reads













