last updated july 19, 2013. created by leehunter on april...

69
Community Documentation: Last updated July 19, 2013. Created by LeeHunter on April 25, 2008. Edited by tvn, silverwing, Heine, nevets. Log in to edit this page. This guide covers preparing for installation, running the installation script, a nd the steps that should be done after the installation script has completed. It also explains how to do a "multi site" installation, where a number of differen t Drupal sites run off the same code base. This documentation focuses on performing tasks at the command line. For informat ion on using graphical tools, see the documentation that accompanies the applica tion or is provided by your hosting service. Some web hosting companies also off er "one-click" installations of Drupal, or specific Drupal support. Before proceeding with your first Drupal installation, you should review the min imum requirements and best practices. Most web hosts meet these requirements. Ho wever, a few stand out by also actively supporting the Drupal community. If you need hosting, consider selecting one of these web hosts. For help with Drupal terms, see the glossary page. There is also information about Drupal distributions, which include installation profiles and pre-packaged distributions of Drupal and modules. These may be of help as well. If you encounter difficulties, you can refer to the Troubleshooting Guide. System requirements Step 1: Download and extract Drupal Step 2: Create the database Step 3: Create the settings.php file Step 4: Run the installation script Step 5: Set up cron Step 6: Configure clean URLs After Installation Additional topics Community Docs Home Installation Guide Administration Guide Step 2: Create the database Last updated November 4, 2013. Created by sepeck on April 25, 2008. Edited by rooby, mbaynton, craig.norris, frasierjr. Log in to edit this page. Note: Since 8.x, Drupal can create the database itself if its database user has enough privileges. See the relevant change notice. Before running the installation script, you must create an empty database and da tabase user (a user name assigned the rights to use the Drupal database). This page provides direction for creating your Drupal database using one of the following methods: Web browser-based control panel (such as "CPanel" or "Plesk")

Upload: others

Post on 18-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Community Documentation:

Last updated July 19, 2013. Created by LeeHunter on April 25, 2008.Edited by tvn, silverwing, Heine, nevets. Log in to edit this page.

This guide covers preparing for installation, running the installation script, and the steps that should be done after the installation script has completed. It also explains how to do a "multi site" installation, where a number of different Drupal sites run off the same code base.

This documentation focuses on performing tasks at the command line. For information on using graphical tools, see the documentation that accompanies the application or is provided by your hosting service. Some web hosting companies also offer "one-click" installations of Drupal, or specific Drupal support.

Before proceeding with your first Drupal installation, you should review the minimum requirements and best practices. Most web hosts meet these requirements. However, a few stand out by also actively supporting the Drupal community. If you need hosting, consider selecting one of these web hosts.

For help with Drupal terms, see the glossary page.

There is also information about Drupal distributions, which include installation profiles and pre-packaged distributions of Drupal and modules. These may be of help as well.

If you encounter difficulties, you can refer to the Troubleshooting Guide.

System requirements Step 1: Download and extract Drupal Step 2: Create the database Step 3: Create the settings.php file Step 4: Run the installation script Step 5: Set up cron Step 6: Configure clean URLs After Installation Additional topics

Community Docs Home Installation Guide Administration Guide

Step 2: Create the database

Last updated November 4, 2013. Created by sepeck on April 25, 2008.Edited by rooby, mbaynton, craig.norris, frasierjr. Log in to edit this page.

Note: Since 8.x, Drupal can create the database itself if its database user has enough privileges. See the relevant change notice.

Before running the installation script, you must create an empty database and database user (a user name assigned the rights to use the Drupal database).

This page provides direction for creating your Drupal database using one of the following methods:

Web browser-based control panel (such as "CPanel" or "Plesk")

Page 2: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

phpMyAdmin Creating the database directly (advanced users)

Create a database and user via a browser-based control panel

Most web hosting accounts provide a Web-based control panel to help you administer your site. These tools include easy-to-use features for creating a new database, and for creating a "user" with rights to the database. To create a database using a browser-based control panel consult the documentation or ask your web host service provider.

When you create the user for your database, you may see a page where you can specify the privileges that user will have for various operations on the database. In most web control panels' "database wizard", if you simply check "All" privileges for the user you create (and then uncheck "Grant" if it is listed as a privilege) your user will be set up correctly.

Take note of the username, password, database name and hostname (for example, are you installing in http://example.com, or in http://drupal.example.com, or http://example.com/blog etc.) as you create the database. You will enter these items into fields in your browser when running the install script (see next page).

Note that in many cases when creating databases and users via a web-based interface, the username you use to log into your control panel is added as a prefix to the database name and possibly to the database username as well. For example, if you log into your site's control panel as "webadmin" and create a database named "drupal7db" and a user for that database named "d7user", when running the Install script (see next page) the database and user may need to be typed in as "webadmin_drupal7db" and "webadmin_d7user". (This is because many hosting accounts are on shared servers, and on one server each database and user name must be unique across all accounts on the server.)

If you used the procedure in this section to create your database and user using a web-based interface, continue to the Step 3: Create the settings.php file page of the Installation Guide.

Create a database and user using phpMyAdmin

The most secure method to use when creating a database with phpMyAdmin is to create a user that has all privileges to the new database, but no other databases. This is more secure than using a general username and password for all of your sites on the same server, as it limits access to your databases if someone gets hold of your database logins.

Note: This procedure assumes that you have root access to phpMyAdmin, and that you're using phpMyAdmin 3.5.x.

Sign in to phpMyAdmin as the root user. Click Users, and then click Add user. Note: You can use the root user credential as well.. In the User name field, enter the username that you want to use. In the Host field, select Local, which is a more secure setting, unless you'll be accessing the database with this user from another server. Enter or generate a password for the user. In the Database for User section, select Create database with same name and grant all privileges. Click Add user to create the user.

Page 3: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

phpMyAdmin creates the new database with the same name as the user account. If you want to have a different name for the database and the user:

Click Databases, and then click the link for the database that you want to rename. Click Operations. In the Rename database to section, enter the new database name. Click Go in the Rename database to section.

If you need more details about using phpMyAdmin, check out the official wiki.

Take note of the username, password, database name and hostname (for example, are you installing in http://example.com, or in http://drupal.example.com, or http://example.com/blog) as you create the database. You will enter these items into fields in your browser when running the install script.

In many cases, when creating databases and users using a web interface, the username that you use to sign in to your control panel is added as a prefix to the database name, and possibly to the database username as well. For example, if you sign into your site's control panel as "webadmin" and create a database named "drupal7db" and a user for that database named "d7user", when running the Install script the database and user may need to be typed in as "webadmin_drupal7db" and "webadmin_d7user". (This is because many hosting accounts are on shared servers, and on one server each database and username must be unique across all accounts on the server.)

If you used the procedure in this section to create your database and user using phpMyAdmin, continue to the Step 3: Create the settings.php file page of the Installation Guide.

Create a database from the command line

If you do not use a Web control panel or are experienced with and prefer to use MySQL or PostgreSQL commands, you can use the information in the following sections.

Additional information about privileges, and instructions to create a database using the command line are available in the INSTALL.mysql.txt file for MySQL and in the INSTALL.pgsql.txt file for PostgreSQL.Create a database using MySQL commands

The database should be created with UTF-8 (Unicode) encoding, for example utf8_general_ci.

For information on installing and configuring MySQL see http://dev.mysql.com/tech-resources/articles/mysql_intro.html

In the following examples, 'username' is an example MySQL user who will have the CREATE and GRANT privileges and 'databasename' is the name of the new database Use the appropriate names for your system.

Create a new database for your site.

mysqladmin -u username -p create databasename

MySQL prompts for the 'username' database password, and creates the initial database files. Log in and set the access database rights:

Page 4: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

mysql -u username -p

MySQL prompts for the 'username' database password. At the MySQL prompt, set the permissions using the following command:

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON `databasename`.* TO 'username'@'localhost' IDENTIFIED BY 'password';

In this case: `databasename` is the name of your database 'username'@'localhost' is the username and domain name of your MySQL user account 'password' is the password required for that username

Be sure to use backticks ( ` ) around the database name if you used a MySQL escape character (_ or %) in your database name.

For example, because the underscore character is a wildcard, drupal_test_account.* should be `drupal\_test\_account`.* for security. Otherwise the underscores would match any character and could accidentally give access to other similarly named databases.

Note: Unless your database user has all of the privileges listed above, you will not be able to run Drupal.

For further information on the GRANT statement see http://dev.mysql.com/doc/refman/5.0/en/grant.html If successful, MySQL will reply with:

Query OK, 0 rows affected To activate the new permissions, enter the following command:

FLUSH PRIVILEGES; Now exit the MYSQL prompt by typing: exit The server will answer by saying Bye

Create a database using PostgreSQL

The database must be created with UTF-8 (Unicode) encoding.

Create a database user This step is only necessary if you don't already have a user setup (e.g. by your host) or you want to create new user for use with Drupal only. The following command creates a new user named 'username' (you should substitute this with the desired username), and prompts for a password for that user:

createuser --pwprompt --encrypted --no-adduser --no-createdb username

If everything works correctly, you'll see a CREATE USER notice. Create the database This step is only necessary if you don't already have a database setup (e.g. by your host) or you want to create new database for use with Drupal only. The following command creates a new database named "databasename" (you should substitute this with the desired database name), which is owned by previously created "username":

Page 5: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

createdb --encoding=UNICODE --owner=username databasename

If everything works correctly, you'll see a CREATE DATABASE notice.

� Windows download notes up Step 3: Create the settings.php file �

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Log in or register to post comments

CommentsFlushing privileges unnecessary for MySQLPosted by geertjanvdk on August 16, 2010 at 5:38am

For MySQL, you do not have to do the FLUSH PRIVILEGES when you use the GRANT command. The statement "To activate the new permissions" is false since they were already activated.

Cheers,Geert

Log in or register to post comments

PostgreSQL 9 and byteaPosted by amongtheclouds on January 17, 2011 at 3:17pm

I'm using drupal 6 with a PostgreSQL database.

I just installed postgres 9 on my MacBook Pro and my drupal site began giving me all sorts of these messages...

# warning: array_keys() [function.array-keys]: The first argument should be an array in /Users/ian/GoMOOS/XAMPP/odpdx.gmri.org/htdocs/includes/common.inc on line 3416.# warning: Invalid argument supplied for foreach() in /Users/ian/GoMOOS/XAMPP/odpdx.gmri.org/htdocs/includes/common.inc on line 3419.

I fixed this by adding "set bytea_output = escape; " to includes/database.pgsql.inc. The code is below.

/*** Helper function for db_query().*/function _db_query($query, $debug = 0) {global $active_db, $last_result, $queries;

if (variable_get('dev_query', 0)) {list($usec, $sec) = explode(' ', microtime());$timer = (float)$usec + (float)$sec;}// bytea fix, preface query with set....$query = "set bytea_output = escape; " . $query ;$last_result = pg_query($active_db, $query);

Log in or register to post comments

Connection to OraclePosted by eremind on February 4, 2011 at 6:11pm

Page 6: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Could you provide some info with installation of Drupal 7 on Oracle.Thank you,DE

Log in or register to post comments

_Posted by shamio on April 4, 2012 at 10:20am

These links can help you more about Drupal and Oracle. I hope you can use them for installing Drupal on Oracle.http://groups.drupal.org/node/24398http://inode.me/tutorials/how-to-drupal-7-oracle-xe-install

Doubt is the father of invention..... Hubmesh | download converter

Log in or register to post comments

No can doPosted by 10basetom on March 13, 2011 at 10:52pm

I followed your instructions to the T using phpMyAdmin and still can't get pass this step. I keep getting this error:

SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown storage engine 'InnoDB'

I have MySQL 5.5.9-community installed. I've installed Drupal 6.20 before with no issues. Please advise.

Log in or register to post comments

See if this articlePosted by authentictech on May 16, 2011 at 7:35pm

See if this article helps:

http://www.youdidwhatwithtsql.com/unknown-table-engine-innodb/760

--http://www.hostplenty.comhttp://www.hostplenty.co.uk

Log in or register to post comments

CollationPosted by Kami Petersen on June 27, 2011 at 6:18pm

You might want to mention something about choosing collation if you're building a localized site. Some languages have characters that migth turn out in the wrong alphabetical order in sorted queries if you go by the general collation, for instance scandinavian languages (åäöÅÄÖ and similar should be in the end of listings but are shown in proximitiy to aAoO).

Log in or register to post comments

Instructions for Installing on godaddy.comPosted by nilashis on July 9, 2011 at 11:29pm

If you are installing drupal on Godaddy.com, then be sure to change the "Host Na

Page 7: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

me" under "Advanced Options" to the complete host name given in the Godaddy hosting center account under databases for your database.

Hostname will look something link: nameofthedatabase.db.7235321.hostedresource.com

Neil

Log in or register to post comments

Installing on another mysql serverPosted by vmevada102 on September 15, 2011 at 7:12am

i would like to install the drupal 6 in my on desktop pc and database on the other mysql database contating server

in one pc all is worked well,

but when installing on the another server having ip 192.168.200.70 with ubuntu as OS

and apache/XAMPP in windows to upload files on webserver having ip 192.168.200.60

I got the error like,

Failed to select your database on your MySQL database server, which means the connection username and password are valid, but there is a problem accessing your data. MySQL reports the following message: Host '192.168.200.70' is not allowed to connect to this MySQL server.

* Are you sure you have the correct database name?* Are you sure the database exists?* Are you sure the username has permission to access the database?

Please help me to solve it

Log in or register to post comments

You may need to explicitlyPosted by mustang on January 4, 2012 at 1:46am

You may need to explicitly allow connection from your PC's IP address to your MySQL server.

Log in or register to post comments

Installing Drupal on OS X LionPosted by lrvk on September 25, 2011 at 3:07am

For those who are struggling with postgres:https://discussions.apple.com/thread/3199015?start=15&tstart=0

Creating database is not sufficient, it is also necessary to enable TCP connections. Link above gives details.

Log in or register to post comments

For C-Panel UsersPosted by milne on September 25, 2011 at 6:32pm

Page 8: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

I found this to be pretty straight forward and easy. In the Databases section of c-panel use the "MySQL Databases" or you can use "MySQL Database Wizard", which walks you through the whole process step by step.

If you use "MySQL Databases" create a database, then a user. Make sure you link the two in the "add user to database" section.

If you use shared hosting the name of the database and user are "youradminusername"_"nameyouspecified", which is displayed easily for you to see.

Zach

Log in or register to post comments

Command line instructions for postgres incorrect.Posted by sgbotsford on February 5, 2012 at 3:29pm

This is likely going to be like nailing jello to the wall. Many OS's will have postgresql or mysql as packages, but there is some variation in where stuff is put, and what the unprivileged user is called. So for example, this is what I had to do on FreeBSD 8.

1. The default database is in /usr/local/postgresql, not /var. I don't like data to reside in /usr. The unprivileged user is pgsql.mkdir /optmkdir /opt/postgreschown pgsql /opt/postgres

This gave me a place to put the database

2. On freebsd the commands to initialize and create must be run as the owner of the database system -- pgsql.su pgsql -c "initdb -D /opt/postgres"

3. The database engine has to be started before you can create a databsesu pgsql -c "pg_ctl -D /opt/postgres -l /var/log/pg.log start"

4. NOW you can create the admin user and the database, but to create with unicode you have to use Template0su pgsql -c "create user --pwprompt --encrypted --no-adduser --no-createdb drupal_admin"su pgsql -c "createdb --encoding=UNICODE -T template0 --owner drupal_admin DrubleBase"

This is going to vary with each OS.

Log in or register to post comments

What about SQL lite.?Posted by jamiemarchant on November 29, 2012 at 10:12pm

What about SQL lite.?

Log in or register to post comments

Create MySQL Database with UTF-8 encodingPosted by sd2k9 on December 17, 2012 at 8:03am

The documentation says that the "The database should be created with UTF-8 (Unic

Page 9: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

ode) encoding, for example utf8_general_ci." but doesn't give details.

To achieve this by the mysql command line interface use the following commands:mysql -u root -p # LoginCREATE DATABASE databasename CHARACTER SET utf8; # Create with utf-8

When using mysqldump/mysql for backup/restore also force both server and client to utf8 byinserting into "/etc/mysql/my.cnf"default-character-set = utf8 # Serverskip-character-set-client-handshake # Force client

Otherwise you could experience charset trouble when you once migrate the data to a different location.(Make sure not to break other databases on your system in case they rely on anothe charset for mysql)

Check: Login to your database and isse following commands, you should see everywhere utf8:SHOW VARIABLES LIKE 'char%';SHOW VARIABLES LIKE 'collation%';

Most of the information taken from the following blog post - Thanks to them!http://www.bluebox.net/about/blog/2009/07/mysql_encoding/

Log in or register to post comments

Different privileges to INSTALL.mysql.txtPosted by rooby on May 14, 2013 at 7:36am

In drupal 7 in INSTALL.mysql.txt it only says:

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON databasename.* TO 'username'@'localhost' IDENTIFIED BY 'password';

Which is different to what is mentioned on this page.

Extra ones mentioned on this page are:

LOCK TABLES, CREATE TEMPORARY TABLES

What's the deal? The doco should be the same in both places.

This was added in revision 976154

Log in or register to post comments

See related issue...Posted by rooby on October 31, 2013 at 4:26am

See this related issue: #1969108: INSTALL.mysql.txt does not mention LOCK TABLES, CREATE TEMPORARY TABLES

Log in or register to post comments

Easy to use tool for database creationPosted by SergeiK on August 2, 2013 at 12:27pm

I'm using dbForge Studio for MySL management - freat tool. All necessary functio

Page 10: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

ns + confortable design!

Log in or register to post comments

MySQL database names with underscoresPosted by mbaynton on October 31, 2013 at 2:06am

The documentation seems incorrect or out of date re: correct escaping of underscores as wildcards. While the documentation reads

Be sure to use a single quote ( ' ) around the database name if you used a MySQL escape character in your schema name.

For example, because the underscore character is a wildcard, drupal_test_account.* should be drupal\_test\_account.* for security. In this case, use: 'drupal\_test\_account'.*

In fact, wrapping the database name in single quotes on MySQL 5.5 producesERROR 1064 (42000): You have an error in your SQL syntax; ...

The correct syntax appears to be to use a backquote (`) instead of a single quote ('), and still escape the underscore with a backslash.

Log in or register to post comments

Did a little more research,Posted by mbaynton on October 31, 2013 at 2:15am

Did a little more research, the backtick is definitely the correct way. Updating page...

Log in or register to post comments

No need to escape at allPosted by rooby on October 31, 2013 at 4:42am

Backticks are generally used for tables & column names in sql queries and such, however in the case of that doco where you are doing something likegrant all on table_name.* to username identified by 'password';

you don't need to escape it at all, as per the above example, which I never have any trouble with.

From your linked doco:

Permitted characters in unquoted identifiers:

ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore)

Extended: U+0080 .. U+FFFF

Underscore is not a wildcard in this situation, they are wildcards when comparing strings.

Your link is also for the MySQL 5.0 version, which is very old now as 5.5 is probably most commonly used.Although I note that 5.0 is all that is required for Drupal 7 so it probably the right way to go for the doco.

[edit] Another relevant page: http://dev.mysql.com/doc/refman/5.5/en/grant.html

Page 11: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

[edit2] Doco on pattern matching, where underscores are wildcards: http://dev.mysql.com/doc/refman/5.5/en/pattern-matching.html

Log in or register to post comments

_ is a wildcard herePosted by mbaynton on November 3, 2013 at 8:17pm

Hi rooby,Thanks for your investigations on this. Despite what the docs say and what seems sensible, however, I am not sure this is quite right. The syntax you give won't give you trouble in that it'll run, but if you test it out (on MySQL 5.5) you'll find it does permit the mysql user with access to databases as though _ is a wildcard. Or have a look at a terminal session I did to demonstrate this: http://paste.ubuntu.com/6355015/.

Let me know if you can reproduce.

- mbaynton

Log in or register to post comments

Oops, you're rightPosted by rooby on November 4, 2013 at 3:00am

Oops, you're right, sorry. I will revert my change.

Step 3: Create the settings.php file

Last updated October 4, 2013. Created by tgeller on August 4, 2009.Edited by craig.norris, LeeHunter, batigolix, thumbslinger. Log in to edit this page.

Your Drupal download comes with a sample configuration file at sites/default /default.settings.php.

Before you run the installation script, you must copy the configuration file as a new file called settings.php file and then set some permissions.

Note: With Drupal 7.x, on some types of shared/local hosting, if PHP and Apache are run by the same user, Drupal will attempt to execute the first three steps for you. If you get errors referring to the "Settings file" during installation, you can perform these steps manually.

Copy the default.settings.php file and save the new file as settings.php in the same directory. To do this, run the following command from the directory that contains your Drupal installation files:

cp sites/default/default.settings.php sites/default/settings.php

Note: Do not simply rename the file. The Drupal installer needs both files. To make the settings.php file writeable and to allow the installer to edit the file, use either of the following commands:

chmod a+w sites/default/settings.php chmod 666 sites/default/settings.php

Both commands have the same effect.

Several FTP tools like Filezilla, Transmit, and Fetch allow you to change fi

Page 12: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

le permissions, using a 'file attribute' or 'get info' command. In this case the file permission should be set to 666. If your FTP client has checkboxes for setting permissions, check both the Read and Write boxes for "Owner", "Group", and "Others" (but leave the Execute boxes unchecked).

Note: Be sure to change the file's permissions back after you have run the installation script. Those permissions should be:

chmod 644 settings.php chmod 755 ../default To let the files directory be created automatically, give the web server write privileges to the sites/default directory.

chmod a+w sites/default

OS-specific instructions

� Step 2: Create the database up OS-specific instructions �

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Log in or register to post comments

Comments"NOTE: Do not forget toPosted by HS on May 31, 2010 at 7:10pm

"NOTE: Do not forget to change permissions back after you have run the installation script."

Change back to what?

Log in or register to post comments

Change back the settings.phpPosted by bawoor on June 6, 2010 at 6:24am

Change back the settings.php permission.change settings.php permission to 755. (read only, to make protected)

step by step:-copy file default.settings.php to settings.php (do not rename). Now you have both files.-change file permission settings.php to read/write with chmod 644 settings.php-continue the installation..-after all installation finished, change file permission settings.php to read-only with chmod 755 settings.php

?????

Log in or register to post comments

change file permission of settings.php on windows XP homePosted by shamveelq on June 26, 2010 at 9:45pm

Hi,

How do you change the permissions of settings.php if you are installing Drupal on Windows XP home environment?

Page 13: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

It does not allow this (there is no security tab).In addition I tried the cacls program from the cmd - but (ACL) Access Control Lists apply only to files stored on an NTFS formatted drive and not on FAT 32.

Thanks

Log in or register to post comments

Cannot proceed installation...Posted by mrprint on January 8, 2011 at 10:29pm

I have copied the default.settings.php file, renamed it to settings.php, now both default.settings.php and settings.php exists in the default folder, I didn't need to change file permissions since both already are 666. I then click the "proceed with the installation" link in the installer, but the page reloads with the same error, "The settings file does not exist." What am I doing wrong?

EDIT: I just made it work, the error I got was "Settings file The settings file does not exist.The Drupal installer requires that you create a settings file as part of the installation process. Copy the ./sites/default/default.settings.php file to ./sites//settings.php. More details about installing Drupal are available in INSTALL.txt." When I put the settings file in the sites/ folder the installation went on, is this what the .sites// mean?

Why is it that my settings file should be in the sites folder and not in the default folder as stated in all the instructions I've read?

Log in or register to post comments

installation problemPosted by gagan7887 on January 10, 2011 at 9:56am

when i locate localhost in web brower then the Xampp page appears,,,

thats i don't want..

I want to install the drupal further.

tell me the way.....s there any settings related problem????

Plz nyone reply soon....

~!G!~

Log in or register to post comments

the solution to this problem in my casePosted by pavlovt on December 18, 2011 at 10:10am

Hi,I had the same problem - run drush make with my make file, all the files ware created instead the settings.php and files folder. I created the folder and the file from default.settings.php ut the drupal installation still insisted that the file and directory does not exists. Then I looked at the permissions and I saw that I created them with the root user :)Then I executed the following commands:chown root:apache settings.phpchmod ug+rw settings.php

Page 14: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

which changed the group of the file to apache which is the user group of the apache web server on my host and gave it write permissions on this file. The same have to be done to the file directory too.After that I refreshed the drupal installation screen and everything was fine

Log in or register to post comments

SElinuxPosted by lostchord on May 16, 2011 at 11:36am

You need to do a bit more if you have SElinux enabled (a good idea):

chcon -t httpd_sys_content_rw_t settings.php

This will leave it writeable by the httpd daemon after the event as well.

------------We are born naked, wet, and hungry. Then things get worse.

Log in or register to post comments

file permissions after installation - Drupal 7Posted by mengi on May 30, 2011 at 11:42pm

After installing Drupal 7, what should the file permissions be for

-setting.php-default.settings.php-default folder-sites folder-files folder

I have ready many different things on this, and it seems everyone has a different opinion. (from 000 to 444 to 644 to 555 to 755). Can someone set the record? What should those file permissions be so that they are a) Most secure b) Will not mess anything up?

Log in or register to post comments

I would like to know thisPosted by Sunsani on August 17, 2011 at 6:21pm

I would like to know this also. I used Simple Scripts for installation and I'd like to check and make sure my permissions are correct.

rift-prophecy.com

Log in or register to post comments

setting.phpPosted by claverfred on September 16, 2011 at 11:28am

am getting a problem in running the installation script,every time am sticking at the second step "verifying the requirements"i dont know what is the problem while I followed the procedures in setting.php

Log in or register to post comments

I'd love to know thisPosted by Steady on September 17, 2011 at 5:01pm

Page 15: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

I'd love to know this too:

----Quote:"After installing Drupal 7, what should the file permissions be for

-setting.php-default.settings.php-default folder-sites folder-files folder

I have ready many different things on this, and it seems everyone has a different opinion. (from 000 to 444 to 644 to 555 to 755). Can someone set the record? What should those file permissions be so that they are a) Most secure b) Will not mess anything up?"----

Does anyone have the final answer for this?

Log in or register to post comments

my ip blockedPosted by seniorOtaka on October 17, 2011 at 1:17am

i installed drupal 7.8 on a server successfully but while i'm using the site like configuring modules or changing the settings of the themes the servers blocks my ipwhen i tried to understand what is going on the server admin told me to adjust the files permissions and cookies usage for drupalhow can i do this?Note: i 'm extracting the drupal files in the root directory (Public_html)

Log in or register to post comments

Helloy. Help me. It isPosted by ruzer on October 28, 2011 at 9:16pm

Helloy.Help me.It is permission?

Notice: Undefined index: minnelli in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.maintenance.inc on line 63

Notice: Trying to get property of non-object in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.inc on line 104

Notice: Trying to get property of non-object in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.inc on line 452

Notice: Trying to get property of non-object in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.inc on line 452

Notice: Trying to get property of non-object in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.inc on line 452

Notice: Undefined index: minnelli in /var/www/ruuser/data/www/fashionrelease.ru/

Page 16: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

includes/theme.inc on line 1023

Notice: Trying to get property of non-object in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.inc on line 1035

Notice: Trying to get property of non-object in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.inc on line 1044

Notice: Undefined index: minnelli in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.maintenance.inc on line 216

Notice: Trying to get property of non-object in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.maintenance.inc on line 216

Warning: array_keys() [function.array-keys]: The first argument should be an array in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.maintenance.inc on line 219

Warning: Invalid argument supplied for foreach() in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.maintenance.inc on line 219

Warning: include(./themes/garland/maintenance-page.tpl.php) [function.include]: failed to open stream: No such file or directory in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.inc on line 1078

Warning: include() [function.include]: Failed opening './themes/garland/maintenance-page.tpl.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/ruuser/data/www/fashionrelease.ru/includes/theme.inc on line 1078

Log in or register to post comments

a suggestionPosted by pavlovt on December 18, 2011 at 10:21am

Hi,I don't know how exactly you ware able to accomplish this :)Please give me more details on how you did the installation otherwise I cannot help you.There maybe a problem with permissions because it cannot load maintenance-page.tpl.php

Why don't you start with new installation - Drupal checks for it's requirements and gives warnings if something is not ok

Log in or register to post comments

Help!Posted by cwhy on February 22, 2012 at 6:03am

i have changed all the files and directories in drupal folder to 777 but why drupal still shows"The Drupal installer requires write permissions to ./sites/default/settings.php"...............

Log in or register to post comments

I had the same problem.Posted by femim on March 7, 2012 at 12:15am

I had the same problem. SELinux was running and enforced.

Page 17: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Log in or register to post comments

You don't have permission to accessPosted by asesortecnologico on March 6, 2012 at 2:22am

Please can you help?, I have installed and properly configured Drupal 6.XX permissions, folder either (755) and file (644), but when accessing the Web site throws me the following message:

ForbiddenYou don't have permission to access / on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

thanks you...

Rodrigo

Log in or register to post comments

If you have SELinux runningPosted by femim on March 7, 2012 at 12:13am

If you have SELinux running turn it off. Check the error_log for the web server. It maybe that it is not able to read the .htaccess file

Log in or register to post comments

SELinuxPosted by lostchord on March 16, 2012 at 7:32am

If you have SELinux running then see my reply earlier in this thread (May 2011).

------------We are born naked, wet, and hungry. Then things get worse.

Log in or register to post comments

What about upgrades?Posted by joevansteen on May 9, 2012 at 3:48am

This covers settings.php during the initial install process. But what about during upgrades? What is the appropriate way to update/upgrade the settings.php file when doing a Drupal upgrade which may have changed some of the content in the default.settings.php file? Is there any standard practice on this? Will Drupal "update" upgrade the file based on the new default.settings.php file, or is it a case of needing to make those changes by hand? A link to any "best practices" would be appreciated.

Log in or register to post comments

New features require manual integration.Posted by joevansteen on May 10, 2012 at 5:30pm

From the Drupal upgrade.txt file:

Sometimes an update includes changes to default.settings.php (this will be noted in the release notes). If that's the case, follow these steps:

Page 18: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Make a backup copy of your settings.php file, with a different file name. Make a copy of the new default.settings.php file, and name the copy settings.php (overwriting your previous settings.php file). Copy the custom and site-specific entries from the backup you made into the new settings.php file. You will definitely need the lines giving the database information, and you will also want to copy in any other customizations you have added.

This was from D7.14, so I guess I answered my own question. It does change, but the updates need to be made manually.

Log in or register to post comments

File permissionPosted by Brian Patrick F... on February 12, 2013 at 1:52pm

The mark of the beast 666 is the file extension. No way. I have serious issues with this.

Brian Patrick Fromme

Log in or register to post comments

You can also set permissions using a+wPosted by tgeller on February 12, 2013 at 10:38pm

If you don't want to type:

chmod 666 sites/default/settings.php

...you can type:

chmod a+w sites/default/settings.php

instead. They do the same thing.

---Tom Geller * tomgeller.com * Oberlin, OhioSee my lynda.com videos about Drupal

Log in or register to post comments

chmod settings.phpPosted by kate_h on February 15, 2013 at 5:42pm

My host has the file at 555

I installed via fantastico.

Log in or register to post comments

security settings issues, need help please.Posted by bdavis113 on February 19, 2013 at 5:57pm

I have installed ckeditor and finder, and it appears to have been successful.

However, when I click on the browser server button to be able to go to the area to upload an image, the next thing I see is this message:

The file browser is disabled for security reasons. Please contact your system ad

Page 19: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

ministrator and check the CKFinder configuration file.

I have read the article, and adjusted my security settings according to what is stated. But I am still getting this message.

I am running Drupal 7, and nothing else fancy at this point. I have very little content on my site at this point other than a few pieces of test content. Because this is such a huge part of what I need for other content to be put in place.

Any thoughts? I can upload screen shots, and if necessary provide access.

Thank you,

Log in or register to post comments

Restricting rights - doing it rightPosted by RobKay on February 21, 2013 at 11:35pm

In fact, granting rights for "others" and the "group" is not needed, nor desirable.

In a shared hosting environment, which effectively is a single-user environment, this is ok, but as soon as you go out to a root server, where other users (that you might seem to trust) have access to, you will want to protect your installation to not see anything of it. Only the user running the webserver should be able to read the files, so I suggest to restrict the files appropriatley.

These commands, fired off on a system where drupal resides in /var/www/drupal and the running user is www-data, restrict access to all the files to that exact user and allow write access in sites/default/files:

chown -R www-data. /var/www/drupalchmod -R u=rX,go= /var/www/drupalchmod -R u+w /var/www/drupal/sites/default/files

Adjust to your needs, YMMV.

Do not EVER use XX4 or XX6 rights, as almost NEVER the group of "other" user need access to any of your files, nor does the group of the webserver (in most cases). To be precise: a chmod 644 something should always be a chmod 640 something to prevent anyone from reading your files.

Hope this helps.

Rob

Log in or register to post comments

Do we need to update settings.php?Posted by vchen on March 5, 2013 at 3:43pm

Do we need to update settings.php with each new drupal core update/upgrade?

Usually, when I update core, the first thing I do is delete the sites folder, which contains the default.settings.php.

Until recently, I decided to look at drupal 7.20's default.settings.php and noticed some changes. Should I be updating my settings.php to the new code found in default.settings.php? What's the best practice for this?

Page 20: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Log in or register to post comments

Permissions settings explainedPosted by thekurt on March 20, 2013 at 7:42pmSecuring file permissions and ownership

On the page http://drupal.org/node/244924 there's a thorough explanation on permissions settings.

On that page is a comment with all the numerical values off the permissions you have to set for files and directories: http://drupal.org/node/244924#comment-2689024

And if you're short in time you'll find a summary of that comment a wheelscroll deeper or click here: http://drupal.org/node/244924#comment-3651134.

Succes.Kurt

De gustibus et coloribus non disputandumwww.mediaha.be, the aha in multimedia

Log in or register to post comments

Drupal Installation instructionsPosted by humberto.sachs on June 16, 2013 at 3:18pm

The instructions are quite detailed and excellent if the user has access to a terminal ON THE SERVER. For most of us, we depend on popular and efficient host tools, which do not allow terminal mode. I am offering to help Drupal build a tmED type of instructions. But I need to have contact with a collaborator which is an expert on Drupal. Anyone there? We could make all the difference in the world for an easy installation and site build up.

Community Docs Home Installation Guide Administration Guide

Step 4: Run the installation script

Attachment Size02-database-configuration_sm.jpg 20.79 KB03-configure_site_sm.jpg 35.24 KBprofiles.png 41.6 KBlanguage.png 37.14 KBrequirements.png 101.63 KBdbconfig.png 62.94 KBinstaller.png 36.6 KBsiteinfo.png 59.79 KBcomplete.png 35.67 KBsiteinfo2.png 54.23 KB

Last updated October 4, 2013. Created by emmajane on April 25, 2008.Edited by craig.norris, wusel, batigolix, [email protected]. Log in to edit this page.

Select the method based on the version of Drupal that you want to install:

Page 21: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Drupal 7 Drupal 6

Drupal 7 installation script

To run the Drupal install script, point your browser to the base URL of your web site.

The base URL means the document root (directory) where you placed your Drupal files (and is defined in your web server configuration file). If you have installed Drupal on a web host this will likely be a domain name such as http://www.example.com. If you installed Drupal in a subfolder, you should point your browser to the subfolder (for example, http://example.com/subfolder). If you installed Drupal on your desktop machine, the URL might be http://localhost/drupal.

If the installation process does not simply appear by entering the base URL of your site, add the file name install.php to the end of your site's URL (for example, http://www.example.com/install.php).Installation process

After you run install.php, you'll be guided through several pages:

Choose which profile to use for the installation (standard or minimal or your chosen distribution).

Most people should select the "standard" option. The standard option comes with default content types already enabled, such as Article and Page, and with appropriate publishing options already set. (Of course you can later edit these default content types and their settings, or add additional ones.) The standard profile also has a useful collection of modules pre-enabled for you.

The "minimal" option is targeted toward more experienced Drupal site creators who wish to set up their own content types with associated publishing options. The minimal profile has only three modules enabled: Block, Database logging, and Update status.

Choose the 'name of your distribution', if you have downloaded a distribution and not a normal drupal at step one.

If you want to install using a language other than the default English, click the Learn how to install Drupal in other languages link.

If your installation directory is not yet configured properly, you'll be informed on this page. You can correct the settings individually and either refresh the browser screen or click 'Try again' to see whether there are any errors left.

Reported errors can include: Missing directories and/or incorrect permissions The installer will attempt to automatically set up a number of directories, but this may fail due to permission settings. In this case you will find the missing directories listed. sites/default/files sites/default/private sites/default/private/files

These directories should be set to the following permissions: chmod o+w sites/default/files OR

Page 22: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

chmod 777 sites/default/files Missing settings.php or incorrect permissions If settings.php is missing or not accessible, follow the instructions in Step 3: Create the settings.php file. Note that you will need both the default.settings.php and settings.php files. Enter the database name, the username, and the password for the database that you created in Step 2: Create the database. This username and password information allows Drupal to access your database so the install script can create tables. Note that this is not the username and password for administering Drupal; these will be created in the next step.

The Advanced options allow you to change the database host ('localhost' is usually used in this entry: wamp/bin/apache/Apache2.2.11/bin/php.ini as an example of the location on a Windows computer running WAMP). You can also change the port and the table prefix. You only need to change the port if you are using a non-standard port number. The table prefix is useful if you are installing multiple instances of Drupal tables that share the same database.

Click Save and continue at the bottom of the page. A progress bar will appear and display notes from the installer regarding the progress of the installation. If no errors are encountered, the next page will automatically load in your browser.

After the installer completes, input the information for the first user account (which will be automatically assigned full administration permissions) and provide basic web site settings. In the Site name field enter the name you wish to use for the site. You can also edit it later through the administration interface. In the Site e-mail address field, enter the e-mail address that will be used by Drupal when it sends out notifications such as registration information. In the Site maintenance account field, enter the Username, E-mail address, and password for the main administration account.

Note that as of Drupal 7 there is a distinction between the main administration account that you set up on this page, and the "Administrator" site administrator user role that you will see when you visit the "Roles" and "Permissions" pages in the administration interface. The account you set up in the Site maintenance account section during installation is a super-user who has overall control over every aspect of the management and configuration of the site. (For those of you familiar with the account from earlier versions of Drupal, this will be http://www.example.com/user/1.) In the Server settings field, select your Default country and Default time zone. In the Update notifications field, leave both check boxes selected if you want your Drupal server to alert you when updates are required. Often updates relate to security issues and are important to perform. However, if you have restricted Internet connectivity (for example, if you are behind a corporate firewall) you may want to leave these settings unselected and then test them later.

Click "Save and continue". On success you will see the Drupal installation complete screen. If there are any error messages, review and correct them now.

Secure your site

After the installation is complete, you will want to change the permissions on the settings.php file back so that it is protected:

chmod u=rw,o=r,a=r sites/default/settings.phpORchmod 644 sites/default/settings.php

Page 23: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

If you make manual changes to the settings.php file later, be sure to protect it again after making your modifications.

Important: Failing to remove write permissions to the settings.php file is a security risk.

Although the default location for the settings.php file is at sites/default/settings.php, it may be in another location if you use the multisite setup.

Drupal 6 installation script

To run the install script point your browser to the base URL of your website.

The base URL is defined in your Web server configuration file and is specific to the document root where you placed your Drupal files. If you have installed Drupal on a Web server this will likely be a domain name, such as http://example.com. If you have installed Drupal on your local computer, this URL might be http://localhost.

You will be guided through several screens to set up the database and create tables.

Next, add the first user account and provide basic web site settings.

If you get any errors regarding the files directory and its permissions, read more information about the Files directory.

Install Drupal in another language Built-in Installation Profiles (Drupal 7)

� Windows (IIS) settings.php notes up Install Drupal in another language �

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Log in or register to post comments

CommentsLocalhost error on IIS 7 with PHP 5.3Posted by GreenReaper on December 3, 2009 at 8:33am

When using PHP 5.3 to connect to "localhost", the database script will time out when attempting to make a test connection to the database as documented at PHP's mysql_connect page.

This is because the mysql native driver now used by PHP cannot properly handle two addresses being returned for localhost.

To avoid this problem, either use 127.0.0.1, or comment out or remove the IPv6 entry for "::1 localhost" in your windows\system32\drivers\etc\hosts file (leave the other "localhost" setting).

Laurence "GreenReaper" ParryFlayrah - Flickr - WikiFur -

Log in or register to post comments

Error 500Posted by pwijsen on December 16, 2009 at 8:57am

Page 24: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

I received "Server Error 500" untill I commented out following lines in file '.htaccess' :

# Don't show directory listings for URLs which map to a directory.# Options -Indexes

# Follow symbolic links in this directory.# Options +FollowSymLinks

My provider : One.com

Log in or register to post comments

This fixed my issue asPosted by grnlightdotnet on September 8, 2013 at 1:39am

This fixed my issue as well...

Log in or register to post comments

I did check that I have bothPosted by uvarovo on March 16, 2010 at 10:48pm

I did check that I have both files default.settings.php and settings.php cretated via copy and still same problem... :(

Log in or register to post comments

It happened to be a problemPosted by uvarovo on March 17, 2010 at 2:50am

It happened to be a problem with db connectivity. I was installing on Vista 64 Home Premium. Namely problem was with "localhost". I wrote simple php script to check how I can connect to db and got the same result: no error messages, no nothing. So i started searching and found that problem was with localhost used in mysql_connect as soon it was replaced with 127.0.0.1 my script worked. So the hosts file contained line '::1 localhost'. The info i found was suggesting to comment that line out. I did so and installation script now passes the db info screen to the next one with no problem. I hope it helps...

Log in or register to post comments

same herePosted by sjobeck on March 19, 2010 at 12:48am

Any one found the secret sauce on this one yet? I am in need as well. I tried editing the options lines & override lines in /etc/http/conf/httpd.conf as well as the conf file for the vhost as well as the .htaccess file for Drupal in the site. None seem to be quite right. I ended up renaming the .htaccess file in the Drupal site to get it to work, however I REALLY do not like this, since that exposes a lot of the Drupal guts to the wild wild wild WAN. I can not quite get the correct combinations in place for the .htaccess file un-edited to live inside the Drupal directory (the ultimate goal). This box is ours & we host a few dozen sites on it & I can do anything I need to. I prefer to maintain all these types of things inside the conf file for each separate vhost file for each site.

Any & all advice greatly appreciated.

Cheers all!

Page 25: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Thanks.

Peace.

Jason SjobeckSjobeck Integration Professionalswww.sjobeck.com

www.sjobeck.com

Log in or register to post comments

I wouldn't say I've found thePosted by jcavell on April 8, 2010 at 12:22pm

I wouldn't say I've found the secret sauce, but I've found a solution that worked for me:

1. Place a copy of default_settings.php into your new site's directory. Make a copy of this and call it settings.php2. Ensure the files have appropriate write permissions3. Edit your new settings.php file so that the Database URL format is in the correct format for you - see http://drupal.org/node/172885#comment-1017698

Then enter the database details on the install page again.

Jonny

Log in or register to post comments

Where on the install page?Posted by guswah on July 2, 2010 at 11:01pm

I presume that you mean the install.php file? This file appears to have 1180 lines in it, so it would be helpful to know where you entered the database details. Thanks.

Log in or register to post comments

Parse errorPosted by bburns on July 28, 2010 at 9:38pm

If you get an error like this:

Parse error: syntax error, unexpected '{' in includes/bootstrap.inc on line 690

it's because you're not using PHP5 (it's bombing on a 'try' statement).You can usually fix this by adding a line like this to the .htaccess file in the Drupal folder:

AddType x-mapp-php5 .php

Log in or register to post comments

HTTP 500 Internal Server Error - While installation in WindowsPosted by nidhikumaran on September 5, 2010 at 5:16am

As pre-requisites to Drupal installation, have installed

Page 26: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Apache 2.2 - Found to be starting the services and displaying the localhost home pagePHP 5.3.3MySQLServer 5.1

When I am trying to install Drupal, once I entered all the data in "Database configuration" page, it gives "HTTP 500 Internal Server Error".

Can somebody guide, as to how to refer to the error logs (if any) to find out where the issue is?

The error log of Apache give the following as last lines:

--

** (httpd.exe:2656): WARNING **: Error loading plugin: `E:\dev\php\ssleay32.dll': The operating system cannot run %1.

[Sun Sep 05 10:19:05 2010] [error] [client 127.0.0.1] File does not exist: E:/dev/apache/htdocs/favicon.ico

--

Log in or register to post comments

I have the same issue ,,, didPosted by Narek on August 25, 2011 at 8:54pm

I have the same issue ,,, did you find the solution?

Log in or register to post comments

e-mail sitePosted by john faust on January 23, 2011 at 6:27am

Configuration of site is demanding an e-mail site for registration information even though it is installed as http://localhost/drupal-7.0. I'm using MAMP as the server on my Mac OS X 10.5.8.

Cancel: It apparently likes webmaster@localhost.

Log in or register to post comments

After install no default drupal site comes up.Posted by sambarton on February 20, 2011 at 2:29am

I have installed drupal on my site samuelbarton.net and as you will see when you look at the site, its just a list of the files in that directory of my hosting account. I want to know why the default drupal site doesn't come up? And why I can't make it come up by clicking on any of the .php files on page?

Please let me know.

Log in or register to post comments

Same problem. When I click onPosted by nadinnne on February 21, 2011 at 9:10pm

Same problem. When I click on the link "your new site" i get the list of drupal files...

Page 27: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Log in or register to post comments

samePosted by supervova on February 24, 2011 at 4:17pm

Have you solved the problem? Please tell us how.

Log in or register to post comments

Apache DirectoryIndex directivePosted by generalelektrix on March 2, 2011 at 5:35pm

Hi,

Simply add or edit the DirectoryIndex directive to your httpd.conf file:

<IfModule dir_module>DirectoryIndex index.php index.html</IfModule>

Specifying that apache must serve index.php when a directory is requested.

Log in or register to post comments

Thank youPosted by marcela1158 on July 9, 2012 at 4:46pm

You just give me the right answer...thank you very much

Lina Marcela

Log in or register to post comments

oopsPosted by Carolyn on April 14, 2011 at 10:06pm

moved to child page.

Log in or register to post comments

Installing Drupal CommonsPosted by davidmcc3 on April 27, 2011 at 8:52am

Have followed instructions to the letter.Extracted files on hosting, so no files 'lost' in ftp transfer.After starting install, get this error:Fatal error: Class 'ctools_export_ui' not found in /home/wowuk/public_html/drpc/profiles/drupal_commons/modules/contrib/panels/plugins/export_ui/panels_layouts_ui.class.php on line 4

What do I do next?

Log in or register to post comments

Wrong Link in the SitePosted by khappieinstein on May 6, 2011 at 10:24am

Hi ,Can you please update the link under

Page 28: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Point 4 , Set up database which has link for Step 2 : Create the databaseIt should be pointing to right page :http://drupal.org/documentation/install/create-databaseinstead of : http://drupal.org/documentation/install/create-database4

Regards,Puneet

Log in or register to post comments

Drupal 7 Installer FailsPosted by bgmills on June 23, 2011 at 2:02am

I am trying to install on a 64-bit PC running Apache 2.2 (localhost) under Zend Community Server with PHP 5.3.3. The installation root is a standalone vhost. The DB is setup in MySQL and the user access privileges are confirmed. The installer launches fine. After completing the DB configuration form and hitting 'save and continue,' the installer sends the following request 'http://drup7/install.php?profile=standard&locale=en&op=start&id=1' then silently dies--the so called WSOD. No code is ever executed and no error is returned. This is not particularly useful.

Error reporting is turned on. There are no relevant errors reported in PHP or server logs. The WSOD troubleshooting document does not seem to contain any relevant information other than turning off Zend compatibility in Apache config. That does not make any sense in this environment. Do I have to hack the installer to get this to work?

FYI. Joomla and other frameworks install and run without a hitch.

Does anyone have words of wisdom to share on this topic? Thanks.

BGM

Log in or register to post comments

Drupal 7 Installer FailsPosted by dashah on January 2, 2012 at 6:27am

Hi BGM,

I also faced the same issue i.e Drupal 7 Installer Fails on the Install Profile step. Dont know the reason for it but what i marked is that this generally happens when i tried to install drupal using Google Chrome. When i tried to install it using Firefox it worked well. So may be its a browser issue but not sure.

Hope this can help anyone..

Thanks.

Log in or register to post comments

chmod of default folder is missing as reminderPosted by no longer here ... on July 30, 2011 at 9:26pm

Step 3 (the settings.php file) of the install guide reminds us twice to "Do not forget to change permissions back after you have run the installation script" for the settings.php file and its default folder.

On this page of the guide, in the "Secure your site" section, it writes about ch

Page 29: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

mod the settings.php file. What is missing is the reminder to chmod the default folder. I recommend the text be expanded here to include a reminder for the default folder. I also recommend adding (or moving) this reminder to the "After Installation" page of the setup guide.

Log in or register to post comments

D7 + Localhost + Snow Leopard = won't connect to database serverPosted by heatherann on September 29, 2011 at 2:46pm

In order to complete Step 4 (Set up database), I needed to go into Terminal and run the following commands:

sudo mkdir /var/mysqlsudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

Since it was looking for mysql.sock in the wrong place, it was unable to find the database I had created and gave me the following error:

Failed to connect to your MySQL database server. MySQL reports the following message: No such file or directory.

- Are you sure you have the correct username and password?- Are you sure that you have typed the correct database hostname?- Are you sure that the database server is running?

For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.

Running those commands in Terminal fixed it.

Log in or register to post comments

and what did you do? you havePosted by izhig on November 12, 2011 at 3:15pm

and what did you do? you have solved the problem?I also have this problem ....

Log in or register to post comments

Can not complete set up error "Table variable already exist"Posted by goldcrusaider on November 22, 2011 at 10:30am

I am installing Drupal 7 on a windows laptop using xamp. I can not finish the last step of installation I get the error "Table variable already exist" I tried dropping my data base uninstalling drupal and setting up a new data base and Drupal 3 times and no luck. I even uninstalled Xamp and started over. What do I do?

Log in or register to post comments

400 - Bad Request on /install.phpPosted by dhcadmin on January 24, 2012 at 8:39pm

I ran into the following problem installing Drupal. I didn't find a clear answer or documentation, so I thought I would leave a note for whoever makes the same mistakes I did.

If .htaccess files are disabled on your server then you will have to move the contents of the .htaccess file into the Apache config file. Exactly which file tha

Page 30: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

t is will vary based upon your *nix flavor. Whichever file that is, just copy and paste the whole .htaccess file contents into the directory statement for the root website where Drupal is installed.

It could be the apache2.conf file, or the httpd.conf file. I'm running Apache2 on Ubuntu with named virtual hosts. So my Apache config files are in /etc/apache2/sites-available/, and there is a separate file for each named site. Then the file looks like this (greatly simplified)

ServerName blah.domain.comServerAdmin [email protected]

DocumentRoot /home/marketing/www

(various directives)

(various directives)(.htaccess file contents go here)

(other directories and random apache directives are down here)

If you get this in the wrong place you are likely to get 400 - Bad Request errors when you try to open up the install.php file.

Cheers!

Doublehorn Communications Drupal Teamdrupaladmin (at) doublehorn.com

Log in or register to post comments

I get the errors in the photoPosted by brandeeb on February 28, 2012 at 8:13pm

I get the errors in the photo above (sites/default/files not writeable and sites/default/settings.php not writeable) but both are set to 777. Is there a way to fix this odd occurance?

Log in or register to post comments

The CHMOD can be different inPosted by shamio on March 9, 2012 at 5:13pm

The CHMOD can be different in some servers. For example in some servers you can use 755 instead of 777 or etc that your files work true and you don't face problem and can access them. I recommend you to try installing Drupal without changing any CHMOD of your files and folders to see if it works true. For example in one of the servers i use, i didn't change CMHOD of any file or folder and the values are like this:Sites folder is :755default folder ( which is inside Sites folder) is: 555settings.php is: 444and it works true without any problem and as i said, i didn't change any permission before/after instillation. So please try installing Drupal once again without changing file permissions.Also if your server is Linus based and it uses cPanel with Fantastico , you can install Drupal almost automated through it.

Doubt is the father of invention..... Hubmesh | download converter

Page 31: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Log in or register to post comments

Text field not getting pulledPosted by kphillips on March 15, 2013 at 5:53pm

I keep getting the same error below no matter what database username and database host I put in the text fields for the database configuration screen. The database is created and have all the correct privileges. I have tried both with a user I created and for the root user.

Database username field is required.

In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with configuring your database server, see the installation handbook. If you are unsure what any of this means you should probably contact your hosting provider.

Failed to connect to your database server. The server reports the following message: SQLSTATE[42000] [1044] Access denied for user ''@'localhost' to database 'drupal7'.

Is the database server running?Does the database exist, and have you entered the correct database name?Have you entered the correct username and password?Have you entered the correct database hostname?

Log in or register to post comments

NothingPosted by futuredigitalmedia on March 27, 2013 at 11:02pm

Hi, I have followed the steps in the guide but I cannot see anything at my web address. Yesterday I changed the nameservers to point to my hosting account (another company). Do you think perhaps it's because the change has not fully propagated on all servers? I am going to mywebsite.net and I've tried with /install.php to no success. Thank you.Update: my website working fine now. Thank you. Yes, you have to wait for the servers to fully propagate any changes before you can do the installation.

http://www.futuredigitalmedia.net -http://creativevisualart.com - my art & design blog

Log in or register to post comments

cant get the drupal/install.php to load - 404 errorPosted by ajc001 on April 7, 2013 at 3:34am

I have tried :-http://localhosthttp://localhost/drupalhttp://localhost/drupal/install.phphttp://http:///install.php

all of them give me a 404 error

I am running 64 bit Windows 7 and have installed:--Apache v2.4.4-PHP v5.4.13-MySql v5.6.10.1

Page 32: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

following all the install steps on this site.

I am attempting to install drupal 7.22I can get to http://localhost/info.php and it displays all my php info, so I believe my web server is working ok.My apache web server is running and no errors appear in the apache log.

I was getting an error earlier in my log when attempting to get to the urls above but resolved it by adding the following to the bottom of my httpd.conf:-AcceptFilter https noneAcceptFilter http noneEnableSendfile OffEnableMMAP off

The error was 'Apache 2.4 => winnt_accept: Asynchronous AcceptEx failed.'but like I say that error no longer appears in my log.

Apache is installed in c:\Apache24 and Drupal was copied to c:\Apache24\drupal.

Any ideas why I cant get the installation screen and get a 404 error instead???

Regards Anthony

Step 5: Set up cron

Last updated October 18, 2013. Created by laura s on April 25, 2008.Edited by zk_deng, craig.norris, davidneedham, batigolix. Log in to edit this page.

Setting up cron is an important step in the installation of the website and assists in the maintenance of the site's assets for search results, checking for updates to Drupal core and modules, and removing temporary files.

A properly configured cron job can manage a variety of tasks:

the Search module that indexes the website's content the Aggregator module's that retrieves feeds the Ping module that notifies other sites of updates the System module that performs routine maintenance tasks, such as pruning of logs

What is cron?

Cron is a daemon that executes commands at specified intervals. These commands are called "cron jobs." Cron is available on Unix, Linux and Mac servers. Windows servers use a Scheduled Task to execute commands. The actual "cron job" is a time-triggered action that is usually (and most efficiently) performed by your website's hosting server, but can also be configured by a remote service or even from your own desktop.

What actually happens is that the cron job visits the cron.php file in your website at a URL like http://www.example.com/cron.php?cron_key=0MgWtfB33FYbbQ5UAC3L0LL3RC0PT3RNUBZILLA0Nf1Re. You can find the exact address of the cron.php file in the Status report at Administration > Reports > Status report (admin/reports/status) in the section Cron maintenance tasks.Enabling cron

In Drupal 8 you can enable cron via Menu > Configuration > System > Cron (admin/config/system/cron). The default frequency is every three hours. Cron will then

Page 33: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

be triggered by end users visiting your site, no more frequently than every three hours. Note that for low-traffic sites it can also be desirable to create a cron job.

In Drupal 7 you can enable cron via the Administration > Configuration > System > Cron (admin/config/system/cron). If you want to use external Cron service, you can use EasyCron.

In Drupal 6 you need to create a cron job or use Poormanscron.Disabling cron

For performance reasons it may be desirable to disable cron.

You can disable cron (e.g., at Administration > Configuration > System > Cron (admin/config/system/cron), by setting the "Run cron every" value to "Never".

Alternatively you can set the 'cron_safe_threshold' variable in the {variable} table to 0. (Note that drush will assume this variable is 0 if you have left the "Run cron every" value at the default, so you will need to set it explicitly, either at admin/config/system/cron, or via drush -y vset cron_safe_threshold 0)

Another way to disable cron is to add the following line to your settings.php:$conf['cron_safe_threshold'] = 0;Note that this fixes the setting at admin/config/system/cron to "Never", and administrative users cannot override it.Resources

Got Drupal video about cron Drupal 6 that talks about cron, shows various ways of configuring it and helps troubleshooting.

Configuring cron jobs using the cron command Running cron manually Solving cron problems Multisite cron Configuring cron without wget, lynx, or curl commands

� Built-in Installation Profiles (Drupal 7) up Configuring cron jobs using the cron command �

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Log in or register to post comments

Commentstomato router can be used to set up cron jobsPosted by Adam Kowalewski on May 9, 2011 at 5:35pm

I use my Buffalo WHR-HP-G54 with tomato 1.27 firmware to trigger cron on my drupal websites. I made a short tutorial which you can find on my website

http://www.adamkowalewski.com/cron-job-drupal-6.html

cyaAdam

Log in or register to post comments

Nice tip! I use a WRT54GLPosted by drupleg on December 29, 2011 at 5:10pm

Page 34: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Nice tip! I use a WRT54GL with the Tomato firmware, and this is an awesome tip for my local dev site crons, thanks!

Log in or register to post comments

What is the trade-off between external cron and poormanscron?Posted by a1tsal on June 8, 2012 at 1:08pm

It would be helpful if this page were revised to explain why you might want to use a true, external cron job rather than the "internal" poor man's version (/admin/config/system/cron in Drupal 7).

After spending 15 minutes googling around, it appears that the external cron is "more efficient". How? How much? What functionality has its performance affected?

Webmaster, Buddhism for Vampires, Meaningness, and Approaching Aro

Log in or register to post comments

The trade-off of poormanscron.Posted by reg.doug on July 8, 2012 at 4:03pm

The question is not which is "more efficient" because in truth both are equally efficient. The difference is that poormanscron *will* slow down page loads for your end user while "external" cron will not (or at least will mitigate the effect)

Let's consider why this is the case.

First, remember that cron jobs are used to get long tasks done by splitting them into a bunch of short pieces.

When you depend on poormanscron to do your cron jobs for you, it performs one (or a few) of these short jobs every time a user accesses a page on your site. Effectively, this means that to display a page, Drupal has to do more than just render the page in order to finish execution and return some HTML to the end user, which lengthens the page load.

When you use an external cron trigger, it processes the cron tasks in *parallel* with your ongoing page loads so while it may slow down your server because of extra CPU load, it doesn't add to the page load time that your users see.

Step 6: Configure clean URLs

Last updated October 3, 2013. Created by jbrauer on January 9, 2005.Edited by craig.norris, myglobaldata_gil, 3lackRos3, batigolix. Log in to edit this page.

By default, Drupal uses and generates URLs for your site's pages that look like "http://www.example.com/?q=node/83." This style of URLs can be hard to read, and can prevent some search engines from indexing all the pages of your site. Research suggests this may not be as big of a problem for major search engines as it once was; however, it is worth noting the recommendation from Google's webmaster guidelines stating:

If you decide to use dynamic pages (i.e., the URL contains a "?" character),

Page 35: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

be aware that not every search engine spider crawls dynamic pages as well as static pages. It helps to keep the parameters short and the number of them few.

If you are unhappy with the default URLs in Drupal, you may be able to tell Drupal to use "clean URLs", eliminating the "?q=" in your site's URLs, and this page explains how to do it. The instructions below are largely applicable only for the most common server setup, which is an Apache web server running on some flavor of Unix/Linux, with the mod_rewrite Apache module configured and mod_rewrite enabled in httpd.conf configuration file. If you are running Drupal on a different type of server, check the links section below (just above the Comments section of this page) to see if there might be something that addresses your server configuration on a different page.

Before enabling clean URLs in the Drupal configuration screens (see below), you may need to prepare your server for clean URLs to work. There are two ways to prepare your server for clean URLs to work in Drupal. If you have complete control of your server, for example: You run your own server; are installing a development site on your personal computer; or you have a dedicated server hosting account, then you should enable clean URLs in the httpd.conf file for better performance and security. However, if you have a shared hosting account (at DreamHost, BlueHost, HostGator, GoDaddy, 1and1, et al.), you will not be able to modify the httpd.conf file and should use the Drupal .htaccess file instead.Clean-Urls Test - False Negatives

On some setups the Clean Urls test gives a false negative result. If you can visit Clean Url links like http://example.com/user/login and Drupal returns the user login page, .htaccess and mod_rewrite are working. Visiting the Clean Urls admin page directly at http://example.com/admin/config/search/clean-urls, should give you a checkbox that lets you enable Clean Urls. See http://drupal.org/node/1178850. Note: If Clean Urls like http://example.com/user/login. stops working (switching hosts) you can visit the same page by changing the URL to look like: http://www.example.com/?q=user/login.Enabling Clean URLs in Drupal

Note: The standard Drupal installation contains a sample .htaccess file which supports clean URLs. It is easy to miss copying this file, because of the leading "dot". So before trying to enable Clean URLs, make sure this file exists in your Drupal installation.Drupal 7.x

In Drupal 7, the installer tests for compatibility with Clean URLs as a part of the installation process. If the environment is tested as compatible with Clean URLs, it will be enabled as part of the installation process and no further action is required to enable Clean URLs.

If you need to enable Clean URLs post installation, Drupal will run the clean URL test automatically when you navigate to the Clean URLs configuration page (Administer > Configuration > Search and metadata), show the results, and allow you to save configuration.

You can enable or disable it at a later time by following these steps:

Navigate to the Clean URLs configuration page (Administer > Configuration > Search and metadata) Wait for the automated Clean URLs test to run. Check or uncheck the Enable clean URLs checkbox Click "Save configuration"

Even if Clean URLs are successfully enabled at install-time, if you have a dedicated server you may still want to follow the steps (below) to enable the more ef

Page 36: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

ficient httpd.conf rewrite method for clean URLs. If you choose to do that, you might want to turn off Clean URLs while you are working on the server.Drupal 6.x

In Drupal 6, the installer tests for compatibility with Clean URLs as a part of the installation process. If the installer was not able to run the test successfully at install time, you can later follow the instructions below for Drupal 5 to get Clean URLs working. There is one minor difference: Drupal 6 will run the clean URL test automatically when you navigate to the Clean URLs configuration page and will show the results, in place of giving you a link to run the test manually.

Also note that even if Clean URLs are successfully enabled at install-time, if you have a dedicated server you may still want to follow the steps (below) to enable the more efficient httpd.conf rewrite method for clean URLs. If you choose to do that, you might want to turn off Clean URLs while you are working on the server.Drupal 5.x

Here are the steps necessary to enable Clean URLs in Drupal 5:

Go to the Clean URL's (Administer > Site configuration > Clean URLs in Drupal 5) section of the administrative interface. Look for the paragraph that reads as follows:

This option makes Drupal emit "clean" URLs (i.e. without ?q= in the URL.) Before enabling clean URLs, you must perform a test to determine if your server is properly configured. If you are able to see this page again after clicking the "Run the clean URL test" link, the test has succeeded and the radio buttons above will be available. If instead you are directed to a "Page not found" error, you will need to change the configuration of your server. The handbook page on Clean URLs has additional troubleshooting information. Run the clean URL test.

Click on the Run the clean URL test link at the end of the above paragraph. If the test is successful, set Clean URLs to "enabled" and save the configuration. If the test is not successful, use the steps below to fix your server configuration and try again.

Prior to Drupal 5.x

For Drupal versions prior to Drupal 5, there is no automatic Clean URLs test or link. Instead, you can test manually by typing in the Clean URL for your settings page: http://www.example.com/admin/settings (where www.example.com is replaced by your hostname). If this results in seeing the settings page, and no errors, then Clean URLs are safe to enable, and you can do so with the setting on this page. If there is an error, follow the instructions below to configure your server.Error recovery

Enabling "Clean URLs" when your server is not properly configured (i.e. if the Clean URLs tests described above fail) can make it difficult to navigate back to administration pages to undo your mistake, because all the Drupal-generated menus and links will have URLs that do not work. If you find yourself in this situation, you can return to the administrative settings page by typing in the URL in the 'non-clean' form: http://www.example.com/?q=admin/settings for the admin settings page in Drupal 4.x, or http://www.example.com/?q=admin/settings/clean-urls to get to the Drupal 5 or Drupal 6 Clean URLs settings page. Once there, you should be able to reset to not using Clean URLs.

There are additional instructions for recovering from malfunctioning Clean URLs

Page 37: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

the Handbook page Unset clean URLs.Server configuration for Clean URLs on a dedicated server, with httpd.conf

Enabling clean URLs on a dedicated server involves these steps:

Enable mod_rewrite for Apache. You can talk to your web host or consult the Apache documentation for mod_rewrite to get more information on how to do this. At a minimum, this will involve making sure that mod_rewrite is enabled for your installation of Apache.

To test if mod_rewrite is available in Apache2, you can type the following at a command prompt, to list all installed Apache modules: apache2ctl -M

On some systems this command may be: apachectl -M

In the output, check to see if the rewrite_module is included in the list of modules.

If the rewrite module is not in the list, it will have to be either compiled-in or made available as a loadable module. Generally speaking, you can tell Apache to load the module by including LoadModule rewrite_module modules/mod_rewrite.so AddModule mod_rewrite.c

in your Apache configuration file (see below for information on the configuration file). Be sure to uncomment AddModule mod_rewrite.c, if it is in your configuration file but has been commented out. The following may work to enable the module without editing any files:

a2enmod rewrite

Note that these approaches may not work for all combinations of operating system and Apache server -- consult the Apache documentation that came with your Apache software for the correct syntax.

Remember to restart Apache for the new configuration to take effect. The next step is to locate the appropriate Apache configuration file for your site. Depending on your server configuration, the appropriate Apache configuration file could be httpd.conf, a virtual-host-specific file (vhost.conf), a specific site file (e.g. "default"), or apache2.conf. They are usually located in /etc/httpd/conf, /etc/apache2, or a sub-directory; if not, try the command: find /etc -name httpd*

to find the file if it is located elsewhere in your file system.

If you do not have write permissions to these files, and Clean URLs are not working out-of-the-box for you, you may have to ask your systems administrator or hosting provider for help. You may still be able to read these configuration files to troubleshoot a little however.

The next step is to copy or include the Drupal-specific settings directly into your configuration file. There are instructions here for how to include the Drupal directives in your configuration file. Consult the .htaccess file in Drupal page for examples of rules, such as the following: <Directory /var/www/example.com> RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f

Page 38: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </Directory>

Make sure that you are looking at the .htaccess file for your major version of Drupal (i.e., 7.x, 6.x, 5.x).

Note: If you do not want to put the rewrite rules in your Apache configuration file, you can still simply use the Drupal .htaccess file (as you would if you were on shared hosting). You will need to have the Allow Override directive set in your Apache configuration file (this will allow local .htaccess overrides on your site):AllowOverride AllAccessFileName .htaccess

Read Behind the scenes with Apache's .htaccess for a thorough review of .htaccess. You may also find it helpful to view samples of Apache 2 AllowOverride directives.

Note Regarding MultiViews: Apache supports a feature called "MultiViews" (more generally: "Content Negotiation"), which allows navigation to your pages without the need for file extensions. For instance, if you had a file called "evaluation.txt", a MultiViews-enabled site could access this file with the URL "example.com/evaluation". While MultiViews can be a handy feature when used knowingly, it can cause problems when Drupal's Clean URLs are enabled. Unless you know what you're doing, you should not use MultiViews if you plan to use the Clean URLs feature of Drupal. However, MultiViews is not enabled in a default Apache installation, so it is likely that this note will not apply. Consult the Apache documentation for further information about MultiViews.Server configuration for Clean URLs on a shared server, with .htaccess

The standard Drupal installation contains a sample .htaccess file which should be sufficient to get Clean URLs running. It is easy to miss copying this file, because of the leading "dot". So before trying to enable Clean URLs, make sure this file exists in your Drupal installation.

To check for this in terminal, use ls -a to make sure the "dot" files are also listed.

If you have this file installed, but Clean URLs still do not work, you can try some of the troubleshooting suggestions below. If you still cannot get Clean URLs to work, contact your hosting provider.Fixing problemsCheck that .htaccess is even being used

Apache needs to be explicitly told to respect the instructions in your sites .htaccess file. This is off by default, though most hosts will have turned it on. That is what the AllowOverride All directive above does - it makes .htaccess start working.

To check if your host is currently even reading your .htaccess, you can (temporarily) add some garbage string to the file in an attempt to break it. Your site should immediately start returning a "500 Server Error" when you load a page from that directory due to this misconfiguration. (Remove the garbage string immediately.)

If you do this, and your site does not break - then .htaccess is being ignored and you will not be able to use clean URLs until you get support from your hosts, or enable it in httpd.conf as described above. Some hosts allow you to enable this option through their site management control panel, so look there first.

Page 39: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

RewriteBase setting

The main configuration option which may need to be changed for your site is the RewriteBase. This can be specified in the Drupal .htaccess file or in the httpd.conf file, depending on where you are putting the Drupal rewrite directives (see above). By default, the RewriteBase setting is commented out of the Drupal .htaccess file, and that works well for many configurations.

If you are having trouble getting Clean URLs to work, you may need to change this setting. For example, if your Apache DocumentRoot is /var/www/ (i.e., /var/www/index.html is what is displayed when you point your browser at http://www.example.com/) and your Drupal installation is installed in the subdirectory /var/www/mysite/, then the RewriteBase could be set toRewriteBase /mysite

and that might help. In some configurations, settingRewriteBase /

will allow clean URLs to work.$base_url

You may need to manually set the $base_url variable in the settings.php file if not already set. It's currently known that servers running FastCGI can run into problems if the $base_url variable is left commented out (see http://bugs.php.net/bug.php?id=19656).Multi-site

RewriteBase works when your Drupal installation serves only one site, or when all the sites it serves are in the same subdirectory of their domains. For example,RewriteBase /

will work for the following sites:

http://www.example.com/http://www.example2.com/http://www.example3.com/

RewriteBase /mysite

will work for the following sites:

http://www.example.com/mysitehttp://www.example2.com/mysitehttp://www.example3.com/mysite

However, if your sites are in different subdirectories, RewriteBase will not work. You will need to create a special rule for each subdirectory. For example, your Drupal installation may serve the following sites:

http://www.example.com/http://www.example.com/mysite

In order to enable clean URLs for both sites, you will need to addRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} ^/mysite/RewriteRule ^ /mysite/index.php [L]

before the existing rewrite rules.

Page 40: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Location of index.php

For some server configurations, another change to the Drupal .htaccess file may be necessary. Find a line that looks like this, near the end of your Drupal .htaccess file:

RewriteRule ^ index.php [L]

You may need to replace index.php with the URL path to your Drupal installation's index.php file (only the part after the base URL). For instance, if your site's home page URL is http://example.com/subdir/, you might need to use /subdir/index.php instead of index.php. If your site's home page URL is http://example.com/, you might need to use /index.php instead of index.php. This is necessary on some, but not all server configurations.Clean URLs on Windows servers with IIS

Starting from Drupal 7, the package includes a basic web.config file for use with IIS.See this article for more information and setup instructions.Create Even Cleaner URLs with the Path Module

Using Clean URLs will cause Drupal to generate URLs in the form "http://www.example.com/node/83." In order to change the 'node/##' portion of the URL to something more like 'news/june-1st-news' a site will need the Path module enabled. See the Path module handbook page for more information on using the path module.

Configuring clean URLs for various systems Setting Clean URL with https(SSL) for the backend and http for the front end when Drupal is in a subdirectory/ subdomain Troubleshooting

� Using Perl to run cron up Configuring clean URLs for various systems �

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Log in or register to post comments

CommentsNeed apache VirtualHost setup for rewrites to workPosted by j26crowley on November 7, 2008 at 1:08am

Just thought that It would be good to mention that you need to have a VirtualHost setup in your apache config.When I did fresh install of apache on ubuntu server 8 I had to first make a static link to the rewrite.load file

as admin I ran the commanda2enmod rewrite

Had to setup a virtual host for my domain nameNameVirtualHost *:80<VirtualHost *:80>ServerName yourdomainname.comServerAlias *.yourdomainname.comDocumentRoot /var/www/drupal6/</VirtualHost>

restart apache/etc/init.d/apache2 restart

Page 41: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Log in or register to post comments

Litte ontributionPosted by Andrés Chandía on March 10, 2009 at 11:14am

Scenario:Fedora Core 4Apache 1.3Multisite (Many web applications, 4 moodle sites and drupal)web directory /www/moodle1 - /www/moodle2 - /www/webappx - /www/drupal - etc)

I just added next lines at the server httpd.conf file and it worked

# for drupal, added by achandia<Directory "/www/drupal"> AllowOverride All</Directory>

restart apache/etc/init.d/httpd restart

I hope this helps.

@ch

Log in or register to post comments

Yes, setting up a virtual host makes 'clean URLs' work.Posted by pinenut on June 24, 2010 at 4:13am

I set a virtual host as follows and now I can have 'Clean URLs' work.For some reason, the same setup did not work with Drupal-6.17.

<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /opt/lampp/htdocs/drupal-6.16 ServerName drupal.xxx.org ErrorLog logs/xxx.org-error_log CustomLog logs/xxx.org-access_log common</VirtualHost><Directory "/opt/lampp/htdocs/drupal-6.16"> RewriteEngine on RewriteBase /drupal-6.16 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]</Directory>

Log in or register to post comments

Re: Yes, setting up a virtual host makes 'clean URLs' work.Posted by tsuchan on August 2, 2010 at 10:45pm

pinenut> I set a virtual host as follows and now I can havepinenut> 'Clean URLs' work. For some reason, the samepinenut> setup did not work with Drupal-6.17.

I've just updated to Drupal-6.17, and configured according to the instructions. It worked for me. I've got two suggestions:

Page 42: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

You've got "drupal-6.16" in your DocumentRoot, Directory and and RewriteBase. Have these directories been renamed to drupal-6.17 during your upgrade? Try moving the </VirtualHost> line to underneath </Directory>, so that the Directory section is embedded in the VirtualHost.

Log in or register to post comments

Clean URLs not working Zend Server Community EditionPosted by phpcore13 on April 5, 2013 at 9:12am

Hi Friends,

I am using Zend Server Community Edition (Windows Version - Windows 7) and I have set Virtual Host on httpd-vhosts.conf like below

ServerAdminDocumentRoot "full/directory/path"ServerName drupal.local

Options All Includes +Indexes +ExecCGI +FollowSymlinksOptions FollowSymlinksAllowOverride AllAllow from all

ErrorLog "logs/drupal.local.log"CustomLog "logs/drupal.local.log" common

I have also set "AllowOverride All" in httpd.conf file.

Still problem exist of Clean URLs.

Details:Zend Server Community Edition (Windows Version - Windows 7)Apache 2.2PHP 5.3

Please consider this as an urgent issue.

Log in or register to post comments

I get the message a2enmod:Posted by psorto on July 8, 2013 at 4:32pm

I get the message a2enmod: command not found andLoadModule: command not found

The server is running on centOS5

Log in or register to post comments

clean url on multisitePosted by mokko on November 28, 2008 at 11:04pm

on a drupal regular multisite clean url will not work without .htaccess in each project root, so make sure to copy also .htaccess

/.htaccess/anothersite/.htaccess

Page 43: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Hope that helps anybody

Log in or register to post comments

Thanks!Posted by allpick on February 15, 2012 at 6:38pm

I was having an issue with multisite. I'm trying to convert about a dozen sites from static to Drupal and couldn't get this to work until I found this post. Awesome.

Gary JohnsonE-Renter.comTenant Screening Services

Log in or register to post comments

Thanks !!!Helps me a lot !!!Posted by cruzeta on May 14, 2013 at 3:08pm

Thanks !!!Helps me a lot !!!Hoop !!! Not yet, same problem with Amazon AMI Cloud...

Log in or register to post comments

Clean URL .htacccess with DreamHost, GODaddy and BluehostPosted by dannychang on December 26, 2008 at 9:34pm

DreamHost users have to use following code in .htaccess for clean URL

I haven�t test on godaddy and blueshot, but they should work the same<IfModule mod_rewrite.c> RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]</IfModule>

Log in or register to post comments

godaddy settingsPosted by sunward on November 15, 2009 at 6:18am

As a further update on anyone using godaddy:I have a deluxe hosting with many sites. Using ftp, I edit the .htaccess file for the directory I am loading drupal in. At the bottom, remove the comment symbol to show the following<IfModule mod_rewrite.c> RewriteEngine on## big bunch of comment lines# RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]</IfModule>

Page 44: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

The line with favican.ico was there. Even though I am using a subdirectory, I didn't need to change any of the lines. Save and check clean url's. Should work right away.

Log in or register to post comments

Same problem D7.12 on shared hosting - fixedPosted by lucyconnuk on March 9, 2012 at 12:11pm

Thanks, this also solved the problem for me.

Just to clarify, this is the .htaccess file in the Drupal root directory.

In the section of code which reads: # Pass all requests not referring directly to files in the filesystem to # index.php. Clean URLs are handled in drupal_environment_initialize(). RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^ index.php [L]

.. the last line was changed to: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Lucy C

Log in or register to post comments

Thanks, it works for me onPosted by khoomy on May 3, 2012 at 10:14am

Thanks, it works for me on greengeeks vps :)

Khurram Fraz

Log in or register to post comments

That "little" detail save myPosted by eltioseba on October 30, 2012 at 9:24pm

That "little" detail save my day.Thanks!

Log in or register to post comments

Fixed Clean Urls at Godaddy SettingsPosted by lpolanco on January 27, 2013 at 3:22pm

After moving my site from an "Economy" to a "Deluxed" Godaddy's account (shared with another site), Clean URLs didn't work as before the moving, after days trying to find the answer I just figured out:

I change the following line in the .htaccess:(exactly how it comes by default in your drupal installations files):

RewriteRule ^ index.php [L]

so it would now be:

Page 45: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

RewriteRule ^ /index.php [L]

(note the slash "/" in front of "index.php [L]"

after that it would look like this:

# Pass all requests not referring directly to files in the filesystem to# index.php. Clean URLs are handled in drupal_environment_initialize().RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} !=/favicon.icoRewriteRule ^ /index.php [L]

Some systems need index.php and others need /index.php in order to work further than the Drupal front page when Clean Url is not enabled.I hope it helpsI also noted that: when this line is missing or commented drupal can not change from "Clean URLs"

Log in or register to post comments

thanks also works on greengeeks with D7 installationsPosted by dougzilla on May 6, 2011 at 2:59pm

I just set up a D7 site on a greengeeks vps.I could not get clean urls to work at all. This addition to the .htaccess file did the trick.Interestingly enough, I had no problem on the same server with clean urls on 2 D6 sites that I was running there.

Log in or register to post comments

Works on Bluehost!Posted by staceyb on November 20, 2011 at 9:34pm

Thank you, I had been trying to find this feature and the above works on Bluehost. If you're unfamiliar about how to get to this file (I had to learn today). cPanel -> File Manager and in the popup, choose your root of your Drupal site and before you hit Go, there's a checkbox to show hidden files. Click that, then on the next page you can edit your .htaccess file and add the code.

Log in or register to post comments

clean url with Bluehost by Ftp accountPosted by kokotaboy on November 29, 2011 at 3:57pm

hello I'm very interested by your post on the clean URL. As I use bluehost made ??to host my drupal site that is already installed, but I do not have access to the Cpanel because he (the hosting) belongs to my brother who is in another country, he just set up the site and give me an ftp account. is it possible to have access to htaccess in my FTP account assigned to me for changes or it must do so then it is he who has access to Cpanel.Merci!

Log in or register to post comments

I think you need to accessPosted by staceyb on December 9, 2011 at 2:47am

I think you need to access the .htaccess through the cPanel because it's a hidden file (you can't see it through ftp). Can you get your brother to give you the

Page 46: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

user name and password to access Bluehost?

Log in or register to post comments

it is impossible to do it by FTPPosted by kokotaboy on December 9, 2011 at 2:18pm

it is impossible to do it by FTP access the htaccess necessarily false, as explained above I could thank you Acctiva mine.

Log in or register to post comments

Mac OS X 10.5 (client not Server)Posted by dilby on January 9, 2009 at 4:18am

To turn on clean URL's on Mac OS X 10.5.6:

AddAccessFileName .htaccessto /private/etc/apache2/httpd.conf

Then dependant on where you have installed drupal either:

If you've installed it in /Library/WebServer/DocumentsIn /private/etc/apache2/httpd.conf change the AllowOverride directive toAllowOverride Allwithin the <Directory "/Library/WebServer/Documents"> block.

If you've installed it in /Users/<username>/Sites:In private/etc/apache2/users/.conf change the AllowOverride directive toAllowOverride Allwithin the <Directory "/Users/<username>/Sites"> block (it's likely this will be the only block in this file).

Finally in the .htaccess file in the drupal directory uncomment the line#RewriteBase /drupaland change the /drupal to what ever is appropriate for your install

Good luck!

Log in or register to post comments

for the last step. thisPosted by helloari on March 19, 2009 at 1:50am

for the last step. this worked for meRewriteBase /~[username]/ouroakland/htdocs

but this did not:RewriteBase /Users/[username]/Sites/ouroakland

the leading slash is required.

Log in or register to post comments

Glad it worked for you, but ...Posted by EliseVanLooij on May 14, 2009 at 1:18pm

... but what finally worked for me was:

Page 47: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

httpd.conf (mine is at /opt/local/apache2/conf since I'm using a MacPorts installation)DocumentRoot "/Users/elisevanlooij/Sites"<Directory "/Users/elisevanlooij/Sites">

~/Sites/Drupal6/.htaccess (I also have a Drupal5 install in Sites)RewriteBase /~elisevanlooij/Drupal6

Thank you Dilby for taking the time to write out these instructions for your fellow 10.5 users. I'm really happy to finally have this working.

Log in or register to post comments

Thank youPosted by danbretl on February 9, 2010 at 7:27am

Thank you so much your and dilby's comments finally made things clear for me, fixed my problem, and allowed me to turn on Clean URLs.

Log in or register to post comments

Mac OS X 10.6 (client not Server)Posted by KathyW on July 21, 2010 at 8:11am

All I needed to get CleanURLs (Drupal 6.17) going on my Snow Leopard (PHP5.3) setup was:

In /etc/apache2/httpd.conf change the AllowOverride directive from None (default) to All :AllowOverride All

And in the .htaccess file in the drupal directory uncomment the line#RewriteBase / <== whatever is appropriate for your setup

Hope this might help someone else.

Log in or register to post comments

Hi, I have the same OSXPosted by kevinpw on December 17, 2010 at 9:25am

Hi,

I have the same OSX version as you do, and Drupal 6.1.9. I did exactly as you instructed, but it did not work. I edited httpd.conf, .htaccess, and restarted apachectl. Can you help?

Thanks

Log in or register to post comments

Perfect, this is exactly whatPosted by zonajustin on February 21, 2013 at 3:50am

Perfect, this is exactly what I needed. I tried everything for weeks, and all I ended up needing was this override directive. Heads up to everybody having this problem!

Makes my site, www.accurental.com, finally work as it should.Tenant Screening services website

Page 48: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Log in or register to post comments

1And1 SolutionPosted by SethVIII on January 9, 2009 at 12:16pm

For 1And1 with PHP 5, only change needed is:RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]to:RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]

Found solution here: http://geeksandgod.com/forum/drupals-clean-urls

Log in or register to post comments

Right on this was exactlyPosted by jordojuice on April 18, 2011 at 2:51am

Right on this was exactly what I needed! Thanks

Log in or register to post comments

Looks like this is no longerPosted by Hanscraft on April 23, 2012 at 7:26pm

Looks like this is no longer relevant in Drupal 7.12.

Log in or register to post comments

Also works for Ilisys Cloud HostingPosted by Demma10 on June 19, 2012 at 4:19am

Thanks SethVIII. After moving two Drupal sites (one D6 the other D7) to Ilisys's cloud clean URLs stopped working. This setting was just what I needed to get clean URLs working on two both sites.

Log in or register to post comments

Using Clean URLs and WAMP2Posted by AlexanderPop on January 10, 2009 at 8:07am

Windowsc:\wamp\bin\apache\Apache2.2.11\conf\httpd.confuncomment#LoadModule rewrite_module modules/mod_rewrite.sowill haveLoadModule rewrite_module modules/mod_rewrite.so

Log in or register to post comments

Uniform Server 4.0 (Mona)Posted by strands on April 19, 2009 at 9:06am

This edit is also required in uniserv 4.0.

Edit the file[drive][path]\Uniform Server\udrive\usr\local\apache2\conf\httpd.conf

Change line 194#LoadModule rewrite_module modules/mod_rewrite.so

Page 49: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

toLoadModule rewrite_module modules/mod_rewrite.so

See http://wiki.uniformserver.com/index.php/Installing_Drupal_on_4.0-Mona for more tips.

Versions prior to 4 already have the rewrite_module line uncommented.

Log in or register to post comments

Great!Posted by Apollosama on November 7, 2011 at 9:19am

This is really good to know "Before enabling clean URLs in the Drupal configuration screens (see below), you may need to prepare your server for clean URLs to work. There are two ways to prepare your server for clean URLs to work in Drupal." more power..

background check

Log in or register to post comments

UBUNTUPosted by zagnutts on January 13, 2009 at 11:50pm

I wanted to share my problem with getting clean urls to work in ubuntu. I couldn't find any info on how to do this, but finally I pieced it together and it is actually very simple. Just do the following:

1)enable rewrite module on apache.a2enmod rewrite(to disable type a2dismod rewrite)

2)Set directory permission.You must find the file that sets permission of each directory for apache. In my case it was /etc/apache2/sites-enabled/000-defaultedit the page so that the directory that you will be using to serve webpages has "AllowOverride All". My file contains the following:

Options Indexes FollowSymLinks MultiViewsAllowOverride AllOrder allow,denyallow from all

3)Just restart apache and it should be working:/etc/init.d/apache2 restart

Log in or register to post comments

Great Job!!!Posted by damaddhacker on November 24, 2009 at 12:08am

In testing Ubuntu 9.10 I've set up 2 different servers 1) Ubuntu w/XAMMP and 2) Ubuntu with LAMP install from the server installation...both were different in getting this to work. Thanks.....

Log in or register to post comments

Thank youPosted by juankvillegas on April 17, 2010 at 4:00am

Page 50: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Great!!! I'm using Linux Mint Helena (based on Ubuntu 9.10) and this works...

Thank you again.

Juan VillegasmicoworkerDiseño y Desarrollo Web

Log in or register to post comments

Ubuntu 10.04 LTS + Apache2 +PHP5 + MySql 5.1.41 + Drupal 6.16Posted by alaca on May 18, 2010 at 5:11pm

I followed Method 2 http://drupal.org/node/134439

You have to enabled the rewrite module(mod_rewrite)

sudo a2enmod rewrite

My Drupal Installation serves one site which is in the subdirectory Drupal6

Hence my site address is http://localhost/drupal6

1st step

With Apache version 2, the httpd.conf has been deprecated (actually mine is empty ), and the new file is located at: /etc/apache2/apache2.conf

So, in the command line type:

sudo /etc/apache2/apache2.conf

Copy paste following lines in the directory section, if it doesn't exist, just copy paste the lines at the bottom , and save the file.

<Directory /var/www/localhost/drupal6>AllowOverride All</Directory>

2nd step

sudo nano etc/apache2/apache2.cnf

Copy paste the following lines and save the file

RewriteLog "/var/log/apache2/rewrite.log"RewriteLogLevel 3

3rd step

sudo nano /etc/drupal/6/htaccess

Under rewrite rules make sure the following lines exist otherwise copy paste them , make sure to replace /drupal6 in line 4, /drupal6 in line 7 and /drupal6 in line 8 by your site's directory otherwise it won't work. Save changes.

<IfModule mod_rewrite.c>RewriteEngine OnRewriteRule "(^|/)\." - [F]

Page 51: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

RewriteBase /drupal6RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} ^/drupal6/(.*)$ RewriteRule ^(.*)$ /drupal6/index.php?q=$1 [L,QSA]</IfModule>

4th step

Reload apache

sudo /etc/init.d/apache2 reload

5th step

Enable url rewriting at /admin/settings/clean-urlssave changes

alaca

Log in or register to post comments

EasierPosted by Dokuro on June 1, 2010 at 2:04am

Easier way?https://help.ubuntu.com/community/Drupal

sudo gedit /etc/apache2/sites-available/default

Find every occurrence of "AllowOverride none" and replace with "AllowOverride All" then save and restart your server.

sudo /etc/init.d/apache2 restart or sudo service apache2 restart

Also, you need to change the RewriteBase line in the htaccess file in your drupal folder in order to get clean urls working (Ubuntu 10.04).

Example, my install is /var/www/html/cd /var/www/htmlsudo gedit .htaccess

# Modify the RewriteBase if you are using Drupal in a subdirectory or in a# VirtualDocumentRoot and the rewrite rules are not working properly.# For example if your site is at http://example.com/drupal uncomment and# modify the following line:RewriteBase /html

Seems to work for me.

Log in or register to post comments

WorkedPosted by dwieeb on October 27, 2011 at 1:48am

Thank you! This worked.

Log in or register to post comments

Page 52: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

clean urlsPosted by benitezv1ang on October 10, 2010 at 9:07pm

this work for me in the .htaccess fileplace full website url in RewriteRule

example: RewriteRule ^(.*)$ http://www.yoursite.com/drupalfolder/index.php?q=$1 [L,QSA]

RewriteBase /

# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} !=/favicon.icoRewriteRule ^(.*)$ http://www.yoursite.com/drupalfolder/index.php?q=$1 [L,QSA]

Log in or register to post comments

AllowOverride All Worked For MePosted by Clint Eagar on May 10, 2011 at 5:35pm

Thanks a bunch.

Log in or register to post comments

ThanksPosted by rafinskipg on October 4, 2011 at 12:50pm

In debian it worked this.(Only needed if instalattion of drupal is in the root directory, not in a subfolder. In a subfolder i didnt need this change)

Thank you, i was wondering how to enable clean url's

www.monchacos.com

Log in or register to post comments

My SituationPosted by maku520 on February 24, 2009 at 10:15pm

I installed Drupal (6.9) in a subdomain using GoDaddy hosting. I was initially unable to use clean URLs.

First I changed the RewriteBase directive to "/subdomainfolder". That didn't work.

Next, I added the "AllowOverride All" and "AccessFileName .htaccess" directives to the .htaccess file but that only produced a 500 error.

Lastly, I commented out the "AllowOverride All" and "AccessFileName .htaccess" directives and added a "/" in front of "index.php" in the line reading "RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]" to make it "RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]"

That worked.

Log in or register to post comments

Page 53: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

subpath in DebianPosted by xxvelcrar on March 8, 2009 at 10:34pm

In Debian, when you want to use clean URLs with a subpath you can do it in the following way:

<Location /mysubpath> <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/usr/share/drupal6/(.*)$ index.php?q=$1 [L,QSA] </IfModule> </Location>

This will give you a Drupal site at http://example.com/mysubpath/

Make sure to update the RewriteRule line with whatever version of Drupal you happen to be using.

Log in or register to post comments

subpath in Debian Lenny Backports (maybe etch/ubuntu too?)Posted by rclemley on April 25, 2010 at 9:11pm

See the page http://drupal.org/node/781412 for up-to-date Debian configuration for Lenny backports and Squeeze (Drupal 6.16).

pro-freedom

Log in or register to post comments

Apache no longer needs AddModulePosted by geoff_eagles on March 9, 2009 at 6:28pm

AddModule used to be used to control the order in which you enabled the different Apache modules. However as of Apache 2.0 the directive AddModule is no longer required (pop to the apache site for a full explanation) so there's no need forAddModule mod_rewrite.cunless you're running an older Apache.

Log in or register to post comments

Error provoked by AddModulePosted by Fiable.biz on May 16, 2011 at 11:10am

Not only it is not required, see:http://httpd.apache.org/docs/2.0/upgrading.htmlbut it seems it may provoke an error:$ sudo service apache2 restartSyntax error on line 7 of /etc/apache2/conf.d/drupal-7.0.conf:Invalid command 'AddModule', perhaps misspelled or defined by a module not included in the server configurationAction 'configtest' failed.

http://Fiable.biz Web site creation.

Log in or register to post comments

Page 54: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Network Solutions FixPosted by obrigado on March 31, 2009 at 1:11pm

Network Solutions hosting is a complete disaster, but if you're stuck with it the following post helped me get Clean URLs working in a D6.10 install.

http://drupal.org/node/11861#comment-18597

This only applies to the shared unix hosting package, where PHP is run through CGI.

In short, you need to create a php.ini file in the /cgi-bin folder at the root of your Network Solutions directory.

Fill the php.ini with the settings from the IfModule mod_php5.c section of your Drupal install's .htaccess. You can't just cut and paste because the ini format is parsed differently than .htaccess.

In D6.10, your php.ini file should looks like this:

register_globals = offmagic_quotes_gpc = 0register_globals = 0session.auto_start = 0mbstring.http_input = passmbstring.http_output = passmbstring.encoding_translation = 0

Then you need to set BOTH the RewriteBase in your .htaccess file, and the $base_url variable in your site's settings.php file.

Go back to the clean urls admin page, and you should be able to flip the switch.

Some have reported that you need to comment out the Options +FollowSymLinks setting in your .htaccess file, but I haven't had to do so.

It's also worth noting that you won't be able to make it through the install process without errors without setting up a php.ini file as described above to disable register_globals.

Log in or register to post comments

I can confirm this still worksPosted by stupiddingo on February 28, 2011 at 2:55am

I can confirm this still works to enable Clean URLs for Drupal 6.20 in the root directory on Network Solutions Unix Hosting. For subfolder installations Clean URLs will work without configuration changes, but for a root directory install you'll need to uncomment line 107 in .htaccess RewriteBase /

And create a php.ini in /cgi-bin with the following:magic_quotes_gpc = 0register_globals = 0session.auto_start = 0mbstring.http_input = passmbstring.http_output = passmbstring.encoding_translation = 0

Thanks obrigado!

Page 55: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

brent

Log in or register to post comments

Network Solutions for Drupal 7: php.ini, .htaccess. settings.phpPosted by brianlewisdesign on July 25, 2012 at 10:05pm

Network Solutions... not awesome for Drupal 7. All files uploaded with FTP get wrong permissions by default. You need a bunch of custom server settings to get Drupal 7 working without 404, 403, forbidden, admin access denied, and clean URLs, memory limit, or session errors. They have wasted a couple days of my time this week. I read that they are slow and oversell shared hosting, but I am still under development, can't confirm that yet.

Drupal 7 settings for network solutions:--php.ini (in the cgi-bin directory above the htdocs web root folder)Lots of fun server settings here.register_globals = off;upload_max_filesize = 20M;post_max_size = 96M;memory_limit = 128M;output_buffering = 2048;magic_quotes_gpc = 0;session.auto_start = 0;mbstring.http_input = pass;mbstring.http_output = pass;mbstring.encoding_translation = 0;

--.htaccess (in drupal install directory)Use drupal default .htaccess, and uncomment the RewriteBase including your folder name if it's a subfolder of htdocs.RewriteBase /myfolder

--settings.php (755 the permissions temporarily so FTP works)Comment out the $cookie_domain, and uncomment the $base_url and put your URL.$base_url = 'http://mydomain.com'; // NO trailing slash!

--Hope this saves some time.

Not all chemicals are bad, H20 for instance is a vital ingredient in beer.

Log in or register to post comments

Clean URLs on DotEasy HostingPosted by Daniel_Warner on April 1, 2009 at 1:52am

I just installed Drupal 6.10 in a subdomain hosted by doteasy.

I read for hours about Apache Modules and mod_rewrite in particular only to discover that getting clean URLs to work is very easy in this situation.Maybe this will save you some time:

1. Make sure you include the .htaccess file with the rest of your Drupal files in the directory on the server. Obvious to some, but .htaccess files are hidden by default in OSX and not included in a standard drag-and-drop transfer from your

Page 56: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

local directory to an FTP client. Installing Drupal is 100% possible without the .htaccess file but enabling clean URLs in a shared hosting environment is not.

2. Uncomment line 101 of the .htaccess file -- the one that has the "RewriteBase /" command

------------------website | livejournal

Log in or register to post comments

I use Aplus.net hosting and this worked for me!Posted by christykintzel on November 12, 2009 at 4:41pm

Uncomment line 101 of the .htaccess file -- the one that has the "RewriteBase /" command

Thanks so much!

Log in or register to post comments

Aplus hosting - Drupal installed in subfolderPosted by Xanthrop on September 15, 2011 at 8:24pm

If you have installed Drupal on Aplus in to a subfolder. Be sure to use "RewriteBase /subfolder".

Log in or register to post comments

Tip on .htaccessPosted by rick.archibald on April 2, 2009 at 9:56pm

I moved an existing site to another server, but the clean URLs no longer worked. After spending umpteen hours trying to troubleshoot it, I found the problem. Apache has multiple references to the .htaccess file. The first is a "default" setting as follows (even though I had changed the AllowOverride to All, it had no effect because it was overridden later [see below]):<Directory /> Options FollowSymLinks AllowOverride None</Directory>

The second reference actually overrides the default setting:<Directory "/var/www/html"> AllowOverride None</Directory>

After changing that setting, my clean URLs were all bright and shiny again! :-) Probably a no-brainer for those who spend a lot of time in the httpd.conf file, but it escaped me because I kept referring to the default setting.

Log in or register to post comments

Getting clean URLs working under Windows running Apache2Posted by mbohner on May 7, 2009 at 6:01am

I got this from http://quillem.com/node/506 and it worked:

In your httpd.conf uncomment#LoadModule rewrite_module modules/mod_rewrite.so

Page 57: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

and add the following in httpd.conf with Directory config block, replace the path with the path of your Drupal installation:

Options FollowSymLinksAllowOverride AllRewriteEngine On

Note: there is no "AddModule mod_rewrite.c" needed

Log in or register to post comments

Thank you, the RewriteEnginePosted by rmmcclay on April 23, 2010 at 3:43pm

Thank you, the RewriteEngine On is what I needed. This was a problem I encountered on a WAMP even though I had the rewrite module in httpd.conf enabled. I assumed the engine was On. Wrong. =0

Log in or register to post comments

Clean URL's not working when switching from XAMPP Zend Server CEPosted by ericpai on November 18, 2010 at 10:33pm

I just switched from running XAMPP to Zend Server CE on my localhost.I had a drupal site using clean url's fine and now after the switch, clean url's don't work anymore.I had to make the switch because xampp was so slow.

In the httpd-vhosts.conf file I have :<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "C:\xampp/htdocs/drupal_shared/html" ServerName drupalsite.dr ServerAlias www.drupalsite.dr ErrorLog "logs/drupalsite-dr-error.log" CustomLog "logs/drupalsite-dr-access.log" combined</VirtualHost>

I'm using the same .htaccess file that drupal came with (Drupal 6.19).In my httpd.conf file I changed lines:#<Directory "C:\Program Files\Zend\Apache2/htdocs"><Directory "C:\xampp/htdocs">" Options FollowSymLinks AllowOverride All RewriteEngine On

I'm running a multi-site configuration with separate databases.My drupal sites are in C:\xampp\htdocs\drupal_shared\html

PHP is running as CGI now also. It wasn't before.

Can anyone help with this?

thanks

Eric

Log in or register to post comments

Page 58: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

I got clean URL's runningPosted by ericpai on November 19, 2010 at 12:26pm

Had to change AllowOverride none to AllowOverride All in file:///C:/Program Files/Zend/Apache2/conf/httpd.conf.I was also getting this warning:warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for '-5.0/no DST' instead in C:\xampp\htdocs\drupal_shared\html\sites\all\modules\token\token_node.inc on line 40.Solution:date.timezone was not set in C:/Program%20Files/Zend/ZendServer/etc/php.ini inChanged it to date.timezone = "America/New_York"

Eric

Log in or register to post comments

This also works for 1and1 customers!!!Posted by powerserg1 on June 11, 2009 at 4:27pm

Great Job!! This also works for 1and1 customers!!!

Clean URL .htacccess with DreamHost, GODaddy and Bluehostdannychang - December 26, 2008 - 21:34DreamHost users have to use following code in .htaccess for clean URL

I haven�t test on godaddy and blueshot, but they should work the same

RewriteEngine on

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

-------

Log in or register to post comments

another thingPosted by Rennes on August 29, 2010 at 12:57pm

I had my head banging on the wall about this ... so easy.

Don't forget, if you installed your drupal under the ROOT, you have to change the RewriteBase to specify which root drupal is installed under.

Like this:RewriteEngine onRewriteBase /yoursiteRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} !=/favicon.icoRewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Page 59: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Log in or register to post comments

mod_rewrite on Mac Os X in vhost.conf...Posted by matreides on June 30, 2009 at 12:47pm

mod_rewrite & Virtualhosts on Mac OS X Leopard Server

After much trial and error (mostly error). I finally got Clean URLs working on my Mac server. However let me start off by station that my Leopard server does not run the stock Apache, but one that I built form the ports tree because the stock one is a rpita!!! when it comes to php customization. Plus Apple is rather slow to keep up with basic security updates on UNIX ports.

RewriteEngine off <Directory "/Volumes/Data/web/SOMESITE.com/public/"> AllowOverride Options <IfModule mod_dav.c> DAV Off </IfModule> Options All -Includes -ExecCGI +MultiViews -Indexes RewriteEngine On RewriteCond %{REQUEST_METHOD} ^TRACE RewriteRule .* - [F] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA] </Directory>

Thanks to this note I found on the Zend Framework Page regarding mod_rewrite which suggests placing a forward slash before index.php. I did try the tag but that did not work so I moved things around and well struck pay dirt. I shall test this on one of my FreeBSD web servers tomorrow morning and if it work I'll make another note.

I hope this saves someone hours of headaches from not having to knock their head on a wall...;-|

<VirtualHost *> ServerName beta.SOMESITE.com ServerAdmin [email protected] DocumentRoot "/web/SOMESITE.com/public/" DirectoryIndex "index.php" "index.html" CustomLog "/web/SOMESITE.com/logs/access_log" "%h %l %u %t "%r" %>s %b" ErrorLog "/var/log/apache2/error_log" ErrorDocument 404 /error.html <IfModule mod_dav.c> DAVLockDB "/var/run/davlocks/.davlock100" DAVMinTimeout 600 </IfModule> <IfModule mod_mem_cache.c> CacheEnable mem / MCacheSize 4096 </IfModule> RewriteEngine off <Directory "/web/SOMESITE.com/public/"> AllowOverride Options <IfModule mod_dav.c> DAV Off </IfModule>

Page 60: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Options All -Includes -ExecCGI +MultiViews -Indexes RewriteEngine On RewriteCond %{REQUEST_METHOD} ^TRACE RewriteRule .* - [F] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA] </Directory> LogLevel warn ServerAlias beta.SOMESITE.com</VirtualHost>

Cheers,Mikel King http://twitter.com/mikelkinghttp://olivent.comhttp://jafdip.comhttp://mikelking.com

Log in or register to post comments

For Ubuntu 10.04 ServerPosted by faqing on March 28, 2011 at 12:59pm

sudo a2enmod rewritesudo nano /etc/apache2/sites-available/default

Edit line 7 to read, "AllowOverride All".Edit line 11 to read, "AllowOverride All".Save and exit.

orFind and Replace All "AllowOverride None" with "AllowOverride All".Save and exit.

Linux and Web Development

Log in or register to post comments

ISAPI Re-writePosted by scifisi on August 25, 2009 at 2:07pm

Thought I'd report back.

It's been several hours now and 5 re-boots of my server just in case it was services not starting of something. I must have visited 20 websites and checked everything I could.

Finally I decided to download the trial version instead of the free 'Lite' version. Bam! Working straight away - I guess they don't want anyone to go without paying. I'm sure they deserve their money. I just wish someone would pay me for the hours of banging my head against a wall.

I'm very glad it's working. I just feel a bit flat after so much effort and so many angry thoughts running through my head.

Log in or register to post comments

Adding rewrites to Mac Leopard ServerPosted by robballan on August 30, 2009 at 5:26am

Page 61: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

1. make sure mod_rewrite.so is checked on in Server Admin

2. if Server Admin on your system allows you to check "Allow All Overrides" in the Apache Options for your site, you're done. Otherwise...

3. edit /etc/apache2/sites/[0000_your_site_info.conf] (where "0000_your_site_info.conf" is a filename corresponding to the site you have created in Server Admin -> Web -> Sites) and make the following change:

search for the <Directory "/Library/WebServer/Documents"> entry (if you haven't changed your site's root, otherwise look for the entry with your specified root) change AllowOverride None to AllowOverride All

Log in or register to post comments

Fix for Omnis HostingPosted by idebill on September 17, 2009 at 12:23pm

To get clean urls working with my Omnis hosting account, I had to remove the following from the standard .htaccess file:

# Follow symbolic links in this directory.Options +FollowSymLinks

Log in or register to post comments

Clean URL on drupal 6.14Posted by dagdag on October 20, 2009 at 12:13pm

Hi

I have a similar problem but when I transfer the site to the final server, it shows me a similar message so what I did was

- check if the rewrite module is enabledprompt$apache2ctl -Mto see the apache modules

and as it was enable I add this code to my httpd.conf to allow clean URLs# Various rewrite rules.<IfModule mod_rewrite.c> RewriteEngine on RewriteBase /home RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]</IfModule>

this works for me. the /home is for my drupal installation location

drupal 6.14Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.7 with Suhosin-Patch

Log in or register to post comments

Ubuntu Clean URLs setupPosted by bruceclothier on November 12, 2009 at 1:23pm

Hi. I get irritated every time I have to do this, so writing a note for me and f

Page 62: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

or everyone else that it might help:

Setup LAMP on Ubuntu. Create symbolic link to phpmyadmin (just by the way because its annoying to remember):Setup instructions here: http://www.ubuntugeek.com/howto-install-lamp-server-in-jaunty.htmlCreating link: sudo ln -s /usr/share/phpMyAdmin /var/www

Install mod_rewrite:sudo a2enmod rewrite

Add this to conf (sudo gedit /etc/apache2/httpd.conf):<Directory /var/www/fridays> RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] AllowOverride All</Directory>

Restart Apache:sudo /etc/init.d/apache2 restart

Hope that works straight away for someone. Took me 2 hours to work out.

Bruce

Log in or register to post comments

That was the trick!Posted by tehchaps on January 12, 2011 at 6:42pm

Thank you so much for the "AllowOverride All" I was going crazy trying to get my apache2 to start up again and that was just the trick.

Log in or register to post comments

Corrected rewrite rule for multi-sitePosted by querbach on January 14, 2010 at 3:56am

Under "Multi-site" above, we find the following prescription:

In order to enable clean URLs for both sites, you will need to add

RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} ^/mysite/(.*)$ RewriteRule ^(.*)$ /mysite/index.php?q=$1 [L,QSA]

before the existing rewrite rules.

The $1 in the last line should be %1, since we want to take the back-reference from the last RewriteCond, not from the RewriteRule itself.

If we use $1, we get an extra "mysite/" in the query part of the URL. As an example, for /mysite/target-url we get:

/mysite/index.php?q=mysite/target-url

Page 63: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

With %1, we instead get

/mysite/index.php?q=target-url

which is what we want.

Log in or register to post comments

Rewriting root to existing subdirectoryPosted by iantresman on January 20, 2010 at 10:14pm

Having installed Drupal v6 in a subdirectory /drupal, I wanted to "move" the installation to the root, without having to move all the files up a level. After finding some great posts online, this could be done with a .htaccess file and a few other tweaks, mainly sourced from a post "Getting started with Drupal 6 in a subfolder". In a nutshell:

1. I created a new .htaccess file in the root, containing:

RewriteEngine onRewriteRule ^$ /drupal/ [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.+)$ drupal/$1 [L,QSA](If your installation is in a different subdirectory, you will need to amend the two occurrences pointing to "drupal" to your subdirectory name)

2. I deleted the existing file in the root, index.htm, so that it would not be found and served up. You might also need to remove, if it exists, index.php (actually I renamed the files on the server, so that if I encountered a problem, I could rename it back, and continue with the old site)

3. In sites/default/settings.php, I changed the commented line to:$base_url = 'http://www.mydomain.com'; // NO trailing slash!

I did not need to make any changes to the existing Drupal .htaccess file. I needed to log-in again to gain access to the site I placed my site in Maintenance mode while making the change

Log in or register to post comments

D6: Auto test failedPosted by MatthieuP on January 27, 2010 at 6:21pm

I struggled an hour before understanding that the test which allows to enable clean-urls which was failing.I was modifying my configuration and was refreshing http://localhost/q=admin/settings/clean-urls , unable to enable it.After validating that mod_rewrite was enabled, I guessed this auto-test was failing, and tried to reload my page at http://localhost/admin/settings/clean-urls . The test succeeded and I was able to enable clean urls :p

Log in or register to post comments

Here's another fixPosted by khosman on January 29, 2010 at 9:54pm

I just spent hours trying to figure this out - and finally got it to work trying something I haven't seen listed elsewhere:

Page 64: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

I had been opening the httpd.conf file in dreamweaver - editing per instructions found here - then closing it. Turns out, Dreamweaver was adding something to the mix unbeknownst to me. Opening the httpd.conf file in notepad, editing and saving out that way suddenly made everything work. Here are the only changes I made:

1) Per an earlier message in this thread, I removed the hash (#) mark before the following in the .htaccess file:RewriteBase /2) I removed the pound sign/hash mark/# before the following in the httpd.conf file:LoadModule rewrite_module modules/mod_rewrite.so

After saving each of those files, (again, editing in notepad as opposed to dreamweaver) I simply restarted "all services" and refreshed the "clean urls" page on my site and was able to enable clean urls.

Note: I made no other changes; other suggestions/coding found in this thread were unnecessary for my setup (wamp, windows xp home, apache 2.2.11, php 5.3.0, drupal 6.15)

Log in or register to post comments

a fix that workedPosted by marsd on March 1, 2010 at 7:38pm

trying to get the Clean URLs page at Home > Administer > site configuration to work properly so the radio button for ENABLED would work. I finally got- "your server has been successfully tested to support this feature"

using Windows XP, WampServer2.0h.exe, MySQL 5.1.33, PHP 5.2.9-2, Apache 2.2.11, Drupal 6.15

working on my local computer:I found the file named httpd.conf at C/wamp/bin/apache/apache2.2.11/confOpened this file using Notepad and removed the # marks from the line that reads - LoadModule rewrite_module modules/mod_rewrite.so

Then I added to httpd.conf as stated above while changing the directory as follows to read:

<Directory /var/www/sites/default> RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]</Directory>

Mar

Log in or register to post comments

like itPosted by fausty on April 24, 2010 at 5:38pm

it work perfect for me. thanks for the solution.

Log in or register to post comments

Page 65: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

thank youPosted by maxrossello on May 13, 2010 at 2:30pm

Thank you!I would have never suspected that using http://localhost/?q=admin/settings/clean-urls reported a wrong result, while http://localhost/admin/settings/clean-urls succeeded!

For this reason I did not understand your instructions immediately. So more clearly, what I did after restoring mod_rewrite is just changing the URL in the browser.

Log in or register to post comments

Goodness mePosted by damban on June 9, 2012 at 11:40pm

June 2012, I just installed D7.14, and had to follow this trick to get clean urls working.

It took me a lot of reading to find it. Why is this problem still in Drupal? Ho would a new user EVER solve that problem??

Log in or register to post comments

Same for D7Posted by mt3ch on January 14, 2012 at 1:59am

In Drupal 7 the above comment was the answer that saved me. I was following every piece of advice that seemed appropriate and clicking the clean URL test button to no avail (took about 4-5 hours on solving this problem).

After reading the above comment and simply editing the browser URL manually to a clean URL I finally see it does work and I now see the "enable clean URLs" checkbox.

This isn't a good situation, though, as working clean URLs should be detected by Drupal and it should not keep reloading the page asking the user to press the test button. I hope this can be fixed in future.

Anyway, I'm glad my struggle is now finally over! Thanks to all who posted solutions.

Log in or register to post comments

The same situationPosted by AFFLemos on March 13, 2012 at 7:31pm

Hi,

I had the same situation and solved like that as well.

Cheers,

Log in or register to post comments

Thanks MatthieuP, maxrossello and looseSparkPosted by Jennifer_M on June 4, 2011 at 8:51pm

Thanks people - this was the threadlet which rescued me from a dead end!

Page 66: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

I've done a bug report, http://drupal.org/node/1178850.

Log in or register to post comments

Clean URLs on SourceforgePosted by raffamaiden on April 5, 2010 at 5:07pm

For projects hosted on Sourceforge, you will need to uncomment the following line from the standard .htaccess file

RewriteBase /

and then copy .htaccess in your /home/groups/f/fo/fooproject/htdocs folder, where "fooproject" is your project UNIX name.

Log in or register to post comments

Clean URLs on multisite installationPosted by aosiname on May 2, 2010 at 12:47am

My Scenario:

Using multisite in that I have a main installation of Drupal on my server in /drupal

Created 3 sites to run off a single codebase by doing the following:

Create the following sub directories (note the final directory should match the domain name without the "www"):

* /drupal/sites/siteone.co.uk* /drupal/sites/sitetwo.co.uk* /drupal/sites/sitethree.co.uk

Created a MySQL database for each site and copied the default.settings.php file from drupal/sites/default into each of the directories created above.

Renamed each instance of default.settings.php => settings.php and input the corresponding database login details so siteone.co.uk could connect to its own database and sitetwo.co.uk could connect to its own database and...

Visited www.siteone.co.uk/install.php to install and repeated for the other two sites.

Read many articles that claimed clean urls would only work if I made a reqrite rule for each site in the main .htaccess file.

No need for that on my server. The only two changes I made were to declare the drupal code directory like so:

### Declare drupal directory ###RewriteBase /drupal

And changed:RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] => RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]- note the "/" in the latter.

Clean URLS is now working on all three sites.

Page 67: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Through my testing, I must have broken the .htaccess file so I re-downloaded drupal, copied the .htaccess file and made just those two changes and it worked.

My file is attached as a .txt here if you need it as a reference point.

Log in or register to post comments

ExamplePosted by xmariachi on May 14, 2010 at 6:32pm

Hi,the text mentions it removes the query parameter, but it does not say what is the expected format of your URL for a regular node.

I'm finding that to be, for a default install (e.g. no additions to the URL like the country name ../es/.., etc. ) :domain.com/node/nodenumbersuch asdomain.com/node/1234just as the nodes on the drupal.org site.

I'm looking for SEO friendly URLs for a blog or forum. Is this module addressing this problem?Thanks

La escupidera - Blog de xmariachi

Blog de Xmariachi|Poesía dadá

Log in or register to post comments

I've got a problem with my Clean URLsPosted by jakery on May 19, 2010 at 9:17pm

Mostly, they work. However, on

http://www.jacobkking.com/

On the main page, if you scroll to the bottom and click one of the "next page" links, the rewrite rule doesn't take effect. Instead of getting

http://jacobkking.com/page=1

I get

http://jacobkking.com/node/?page=1

which produces a broken link.

I'm hosted on GoDaddy and these are my .htaccess settings:

RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

If you think you know everything, you know nothing.

Page 68: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

Log in or register to post comments

Hi, Please, anybody have IdeaPosted by wils.solutions on May 22, 2010 at 5:01pm

Hi,

Please, anybody have Idea how to get It running on Windows+ IIS?

tks

WilsNever is to late for refactoring =D

Log in or register to post comments

Clean URLs on IISPosted by Sahin on October 14, 2010 at 10:50pm

Clean URLs on IIS (http://drupal.org/node/3854)

Log in or register to post comments

Clean UrlsPosted by mseraphim on April 25, 2011 at 12:35pm

Hi Jakery,

Having exactly the same problem. I understand it's been a while since this post of yours, have you found the answer? can you help me please?

Regards,

Mseraphim

Log in or register to post comments

It got fixed, but...Posted by jakery on April 25, 2011 at 1:17pm

I don't know if I have the correct answer (see the last paragraph).

I do remember that the .htaccess file didn't copy from the drupal install zip to my root web directory. I didn't even know it was provided, so I'd built one on my own, and it was missing lots of important rules. If this is the case for you, make sure that the Drupal's default .htaccess file is in your home dir. I don't even know if that will fix the clean URL problem, though.

Another possible issue: I've just looked at my .htaccess file. The line:RewriteBase /Is in the my post in the thread, but is not in my current .htaccess file. I'm not sure why this would make any difference, but it's possible that this line was causing trouble. I don't know if this line is in the Drupal-provided .htaccess file, but you can try commenting this line out and see if it makes any difference.

Truthfully, I don't remember how exactly this problem got fixed. A couple months after I posted my issue I completely lost my web site's files and database tables (my backups were on a hard drive that had just failed), so I had to start fro

Page 69: Last updated July 19, 2013. Created by LeeHunter on April ...docshare04.docshare.tips/files/18379/183796004.pdf · er your site. These tools include easy-to-use features for creating

m scratch. It's very possible that I'd incorrectly installed Drupal the first time around, and the clean install was the real fix. Hopefully, you won't have to do something this drastic, however.

Good luck.

If you think you know everything, you know nothing.

Log in or register to post comments

Thanks but...Posted by mseraphim on April 25, 2011 at 1:36pm

Thanks for your comment, but the RewriteBase seems like it is used when your drupal site is in a subdirectory. ex. Normal installation would be http://localhost/drupalsite and subdrirectory would be http://localhost/subfolder/drupalsite. If drupal installation is in a sub folder, then it would look something like this in the .htaccess: RewriteBase /subfolder

In my case RewriteBase / is commented out.

I have done so much work on this site and to do it all over again on a new drupal install is almost not worth the effort.

I haven't changed anything in the drupal files except for the page.tpl.php. And that change was to enable no title content types like pages without titles. Maybe I could make a new installation, copy changed files over, still use the current database. don't know it it will work. I'll give it a try and let you know, might takes some time though.

Regards,

Mseraphim