Skip to content

Commit

Permalink
- Patch #18641 by Morbus:
Browse files Browse the repository at this point in the history
 # The INSTALL.txt no longer contains the SERVER CONFIGURATION block. These settings are now hardcoded into sites/default/settings.php, and are merely scary technical junk here.

 # The INSTALL.txt has been updated with the latest system requirements. A whole sentence was struck regarding differing versions of PHP for the OSs.

 # The INSTALL.txt contains URLs to MySQL and PostgreSQL. If we're including the URL for PHP in the same sentence, then there's no reason why we wouldn't include them for the database engines. What are the minimal requirements for the RDBMS? Those should be included here too.

 # The INSTALL.txt's OPTIONAL COMPONENTS has renamed to OPTIONAL REQUIREMENTS. The only difference between the meaning is the amount of user confusion.

 # The INSTALL.txt has a new CONTENTS OF THIS FILE, in hopes that people will more immediately notice that there are upgrade instructions at the bottom.

 # The INSTALL.txt had some potentially confusing lines adjusted, including further clarifications, standarding to "userid" (instead of using both userid and username interchangebly) and so on.

 # I've moved most of .htaccess php_value's to the ini_set system for /sites/. There are a few reasons for this, chiefly that it is centralizing all the PHP setting modifications to one place. But, this also clears up a few initial configuration issues: first, the user doesn't have to worry about whether they have Apache 1 or 2, and whether they need to change an IfModule line. Also, the running assumption is that these php_value's are /going to work by default anyways/, when the INSTALL.txt suggests otherwise (under OPTIONAL REQUIREMENTS, it talks about "the ability to use local .htaccess files", which suggests that "local .htaccess files" INCLUDING "mod_rewrite" are entirely optional.) Some variables, however, had to remain in .htaccess because they can't be overridden at runtime, but the amount was so small that duplicating them for both Apache 1 and Apache 2 possibilities is no longer a prohibitive concern.

 # There are two variables in .htaccess that I'm concerned about: track_vars, and allow_call_time_pass_reference. track_vars appears to be no longer necessary (as of 4.0.3, track_vars is always on, and my setting it here had no impact on the results of a phpinfo), and allow_call_time_pass_reference seems, at least here, to ONLY WORK if the .htaccess value is set to "1", and not "On" - meaning that Drupal installations are currently working correctly with its default value (off). According to the PHP docs, this feature is now deprecated. However, since both of these variables require further investigation, track_vars has been moved to settings.php, and allow_call_time_pass_reference has been "fixed" to a 1 (not 'On').

 # Along with the changes above for sites/default/settings.php, I've also removed the spacing indent in the documentation, as well as many a few grammatical/punctuation changes here and there. I don't think the leading spacing is "right" according to the style guidelines, but maybe there's a special need for it. Correct me if I'm wrong.
  • Loading branch information
dbuytaert committed Mar 12, 2005
1 parent 2eec4e8 commit a666c7d
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 117 deletions.
133 changes: 59 additions & 74 deletions INSTALL.txt
@@ -1,33 +1,29 @@
// $Id$

CONTENTS OF THIS FILE
---------------------

* Requirements
* Optional requirements
* Installation
- Drupal administration
- Customizing your theme(s)
* Upgrading
* More Information

REQUIREMENTS
------------

Drupal requires a web server, PHP4 or PHP5 (http://www.php.net/) and
either MySQL or PostgreSQL. Drupal requires PHP 4.1.0 or greater on
Linux and PHP 4.2.3 or greater on Windows.
Drupal requires a web server, PHP4 (4.33 or greater) or PHP5
(http://www.php.net/) and either MySQL (http://www.mysql.com/)
or PostgreSQL (http://www.postgresql.org/).

NOTE: The Apache web server and MySQL database are strongly recommended;
other web server and database combinations such as IIS and PostgreSQL
are possible but tested to a lesser extent.

SERVER CONFIGURATION
--------------------

Your PHP must have the following settings:

session.save_handler user

In addition, we recommend the following settings:

session.cache_limiter none

These values are set in php.ini and can be overwritten in a .htaccess
file; you can print out your local PHP settings with PHP's phpinfo()
function.

OPTIONAL COMPONENTS
-------------------
OPTIONAL REQUIREMENTS
---------------------

- To use XML-based services such as the Blogger API, Jabber, RSS
syndication, you will need PHP's XML extension. This extension is
Expand Down Expand Up @@ -59,30 +55,28 @@ INSTALLATION
2. CREATE THE DRUPAL DATABASE

This step is only necessary if you don't already have a database
set-up (e.g. by your host).

If you control your databases through a web-based control panel
check its documentation for creating databases, as these instructions
are for the command-line.
set-up (e.g. by your host). If you control your databases through a
web-based control panel, check its documentation for creating databases,
as the following instructions are for the command-line only.

These instructions are for MySQL. If you are using another database,
check the database documentation. In the following examples,
"dba_user" is an example MySQL user which has the CREATE and GRANT
privileges. You will need to use the appropriate user name for your
system.
'dba_user' is an example MySQL user which has the CREATE and GRANT
privileges. Use the appropriate user name for your system.

First, you must create a new database for your Drupal site:
First, you must create a new database for your Drupal site
(here, 'drupal' is the name of the new database):

mysqladmin -u dba_user -p create drupal

MySQL will prompt for the dba_user database password and then create
MySQL will prompt for the 'dba_user' database password and then create
the initial database files. Next you must login and set the access
database rights:

mysql -u dba_user -p

Again, you will be asked for the dba_user database password. At the
MySQL prompt, enter following command:
Again, you will be asked for the 'dba_user' database password.
At the MySQL prompt, enter following command:

GRANT ALL PRIVILEGES ON drupal.*
TO nobody@localhost IDENTIFIED BY 'password';
Expand All @@ -93,26 +87,26 @@ INSTALLATION
'nobody@localhost' is the userid of your webserver MySQL account
'password' is the password required to log in as the MySQL user

If successful, MySQL will reply with
If successful, MySQL will reply with:

Query OK, 0 rows affected

to activate the new permissions you must enter the command
To activate the new permissions you must enter the command:

flush privileges;

and then enter '\q' to exit MySQL.

3. LOAD THE DRUPAL DATABASE SCHEME

Once you have a database, you must load the required tables into
the database.
Once you have a database, you must load the required tables into it.

If you use a web-based control panel, you should be
able to upload the file 'database.mysql' from Drupal's 'database'
If you use a web-based control panel, you should be able
to upload the file 'database.mysql' from Drupal's 'database'
directory and run it directly as SQL commands.

From the command line, use:
From the command line, use (again, replacing 'nobody' and
'drupal' with your MySQL userid and name of your database):

mysql -u nobody -p drupal < database/database.mysql

Expand All @@ -124,9 +118,9 @@ INSTALLATION
base URL to the web site. Open the configuration file and edit the
$db_url line to match the database defined in the previous steps:

$db_url = "mysql://username:password@localhost/database";
$db_url = "mysql://userid:password@localhost/database";

where 'username', 'password', 'localhost' and 'database' are the
where 'userid', 'password', 'localhost' and 'database' are the
username, password, host and database name for your set up.

Set $base_url to match the address to your Drupal site:
Expand All @@ -135,18 +129,16 @@ INSTALLATION

In addition, a single Drupal installation can host several
Drupal-powered sites, each with its own individual configuration.
If you don't need to run multiple Drupal sites, you can skip to the
next section.
If you don't need multiple Drupal sites, skip to the next section.

Additional site configurations are created in subdirectories within
the 'sites' directory. Each site subdirectory must have a
'settings.php' file which specifies the configuration settings. The
easiest way to create additional sites is to copy the 'default'
directory and modify the 'settings.php' file as appropriate. The new
directory name is constructed from the site's URL. The
configuration for www.example.com could be in
'sites/example.com/settings.php' (note that 'www.' should be omitted
if users can access your site at http://example.com/).
the 'sites' directory. Each subdirectory must have a 'settings.php'
file which specifies the configuration settings. The easiest way to
create additional sites is to copy the 'default' directory and modify
the 'settings.php' file as appropriate. The new directory name is
constructed from the site's URL. The configuration for www.example.com
could be in 'sites/example.com/settings.php' (note that 'www.' should
be omitted if users can access your site at http://example.com/).

Sites do not each have to have a different domain. You can use
subdomains and subdirectories for Drupal sites also. For example,
Expand All @@ -161,8 +153,7 @@ INSTALLATION

When searching for a site configuration (for example
www.sub.example.com/site3), Drupal will search for configuration
files in the following order, using the first configuration file it
finds:
files in the following order, using the first configuration it finds:

sites/www.sub.example.com.site3/settings.php
sites/sub.example.com.site3/settings.php
Expand All @@ -183,10 +174,8 @@ INSTALLATION

sites/sub.example.com/:
settings.php
themes/:
custom_theme
modules/:
custom_module
themes/custom_theme
modules/custom_module

NOTE: for more information about multiple virtual hosts or the
configuration settings, consult the Drupal handbook at drupal.org.
Expand All @@ -202,9 +191,8 @@ INSTALLATION

Many Drupal modules have periodic tasks that must be triggered by a
cron job. To activate these tasks, you must call the cron page by
visiting http://www.example.com/cron.php ;
This will pass control to the modules and the modules will decide
if and what they must do.
visiting http://www.example.com/cron.php -- this will pass control
to the modules and the modules will decide if and what they must do.

Most systems support the crontab utility for scheduling tasks like
this. The following example crontab line will activate the cron
Expand All @@ -224,17 +212,15 @@ configuration with only a few active modules, one theme, and no user
access rights.

Use your administration panel to enable and configure services. For
example, set some general settings for your site with "Administration -
configuration". Enable modules via "Administration - configuration -
modules". User permissions can be set with "Administration - accounts
- permissions".
example, set some general settings for your site with "Administer >
Settings". Enable modules via "Administer > Modules". User permissions
can be set with "Administer > Users > Configure > Permissions".

For more information on configuration options, read through the
instructions which accompany the different configuration settings and
consult the various help pages available in the administration panel.

Note that additional community-contributed modules and themes are
available at http://drupal.org/.
Community-contributed modules and themes are available at http://drupal.org/.

CUSTOMIZING YOUR THEME(S)
-------------------------
Expand All @@ -243,27 +229,26 @@ Now that your server is running, you will want to customize the look
of your site. Several sample themes are included in the Drupal
installation and more can be downloaded from drupal.org.

Customizing each theme depends on the theme. In general, each theme
Customizing each theme depends on the theme engine. In general, each theme
contains a PHP file themename.theme which defines a function header()
that can be changed to reference your own logos.

Most themes also contain stylesheets to tune the colors and layouts;
check the themes/ directory for README files describing each alternate
theme.
check the themes/ directory for READMEs describing each alternate theme.

UPGRADING
---------

1. Backup your database and Drupal directory - especially your
configuration file.
configuration file in 'sites/default/settings.php'.

2. Log on as the user with user ID 1.

3. Remove all the old Drupal files then unpack the new Drupal files
into the directory that you run Drupal from.
3. Remove all the old Drupal files then unpack the new Drupal
files into the directory that you run Drupal from.

4. Modify the new configuration file to make sure it has the
correct information.
4. Modify the new configuration file to make sure
it has the latest and correct information.

5. Run update.php by visiting http://www.example.com/update.php.

Expand Down
91 changes: 48 additions & 43 deletions sites/default/settings.php
Expand Up @@ -5,18 +5,17 @@
* @file
* Drupal site-specific configuration file.
*
* The configuration file which will be loaded is based upon the rules
* below.
* The configuration file to be loaded is based upon the rules below.
*
* The configuration directory will be discovered by stripping the
* website's hostname from left to right and pathname from right to
* left. The first configuration file found will be used and any
* others will be ignored. If no other configuration file is found
* left. The first configuration file found will be used and any
* others will be ignored. If no other configuration file is found
* then the default configuration file at 'sites/default' will be used.
*
* Example for a ficticious site installed at
* http://www.drupal.org/mysite/test/ the 'settings.php' is
* searched in the following directories:
* For example, for a ficticious site installed at
* http://www.drupal.org/mysite/test/, the 'settings.php'
* is searched in the following directories:
*
* 1. sites/www.drupal.org.mysite.test
* 2. sites/drupal.org.mysite.test
Expand All @@ -36,69 +35,75 @@
/**
* Database settings:
*
* Note that the $db_url variable gets parsed using PHP's built-in
* URL parser (i.e. using the "parse_url()" function) so make sure
* not to confuse the parser. In practice, you should avoid using
* special characters that are not used in "normal" URLs either.
* That is, the use of ':', '/', '@', '?', '=' and '#', ''', '"',
* and so on is likely to confuse the parser; use alpha-numerical
* characters instead.
* Note that the $db_url variable gets parsed using PHP's built-in
* URL parser (i.e. using the "parse_url()" function) so make sure
* not to confuse the parser. In practice, you should avoid using
* special characters that are not used in "normal" URLs either.
* That is, the use of ':', '/', '@', '?', '=' and '#', ''', '"',
* and so on is likely to confuse the parser; use alpha-numerical
* characters instead.
*
* To specify multiple connections to be used in your site (i.e. for
* complex custom modules) you can also specify an associative array
* of $db_url variables with the 'default' element used until otherwise
* requested.
* To specify multiple connections to be used in your site (i.e. for
* complex custom modules) you can also specify an associative array
* of $db_url variables with the 'default' element used until otherwise
* requested.
*
* If an optional $db_prefix is specified all database table names
* will be prepended with this string. Be sure to use valid database
* characters only, usually alphanumeric and underscore. If no
* prefixes are desired, set to empty string "".
* If an optional $db_prefix is specified, all database table names
* will be prepended with this string. Be sure to use valid database
* characters only, usually alphanumeric and underscore. If no
* prefixes are desired, set to empty string ''.
*
* Database URL format:
* $db_url = 'mysql://db_user:db_password@db_hostname/db_name';
* $db_url = 'pgsql://db_user:db_password@db_hostname/db_name';
* Database URL format:
* $db_url = 'mysql://db_user:db_password@db_hostname/db_name';
* $db_url = 'pgsql://db_user:db_password@db_hostname/db_name';
*/
$db_url = 'mysql://drupal:drupal@localhost/drupal';
$db_prefix = '';

/**
* Base URL:
*
* The URL of your website's main page. It is not allowed to have
* a trailing slash; Drupal will add it for you.
* The URL of your website's main page. It is not allowed to have
* a trailing slash; Drupal will add it for you.
*/
$base_url = 'http://localhost';

/**
* PHP settings:
*
* To see what PHP settings are known to work well, read the PHP
* documentation at http://www.php.net/manual/en/ini.php#ini.list
* and take a look at the .htaccess file to see which settings are
* used there. Settings defined here should not be duplicated there
* to avoid conflict issues.
* To see what PHP settings are possible, including whether they can
* be set at runtime (ie., when ini_set() occurs), read the PHP
* documentation at http://www.php.net/manual/en/ini.php#ini.list
* and take a look at the .htaccess file to see which non-runtime
* settings are used there.Settings defined here should not be
* duplicated there so as to avoid conflict issues.
*/
ini_set('arg_separator.output', '&amp;');
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_sybase', 0);
ini_set('session.auto_start', 0);
ini_set('session.cache_expire', 200000);
ini_set('session.cache_limiter', 'none');
ini_set('session.gc_maxlifetime', 200000);
ini_set('session.cookie_lifetime', 2000000);
ini_set('session.gc_maxlifetime', 200000);
ini_set('session.save_handler', 'user');
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid', 0);
ini_set('track_vars', 1);

/**
* Variable overrides:
*
* To override specific entries in the 'variable' table for this site,
* set them here. You usually don't need to use this feature. This is
* useful when used in a configuration file for a vhost or directory,
* rather than the default settings.php. Any configuration setting from
* the variable table can be given a new value.
* To override specific entries in the 'variable' table for this site,
* set them here. You usually don't need to use this feature. This is
* useful in a configuration file for a vhost or directory, rather than
* the default settings.php. Any configuration setting from the 'variable'
* table can be given a new value.
*/
// $conf = array(
// 'site_name' => 'My Drupal site',
// 'theme_default' => 'pushbutton',
// 'anonymous' => 'Visitor'
// );
//$conf = array(
// 'site_name' => 'My Drupal site',
// 'theme_default' => 'pushbutton',
// 'anonymous' => 'Visitor'
//);

?>

0 comments on commit a666c7d

Please sign in to comment.