Académique Documents
Professionnel Documents
Culture Documents
Welcome to Drupal! Drupal is a powerful content management system which allows you to create and maintain many different types of websites without needing to know any coding languages.
INSTALLATION
http://drupal.org/node/1130898
To install Drupal on IIS version 7.0 by using Web PI 3.0, follow these steps: Prerequisites Step 1. Install the Web Platform Installer 3.0 Step 2. Select the products and applications to install Step 3. Review and configure the selected products and applications Step 4. Verify the installation and configuration Step 5. Enable clean URLs
<!-<caching> <profiles> <add extension=".php" policy="DisableCache" kernelCachePolicy="DisableCache" /> <add extension=".html" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="14:00:00" /> </profiles> </caching> --> <rewrite> <rules> <!-- rule name="postinst-redirect" stopProcessing="true"> <match url=".*" /> <action type="Rewrite" url="postinst.php"/> </rule --> <rule name="Protect files and directories from prying eyes" stopProcessing="true"> <match url="\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|postinst.1|theme|tpl(\ .php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|allwcprops|entries|format)$" /> <action type="CustomResponse" statusCode="403" subStatusCode="0" statusReason="Forbidden" statusDescription="Access is forbidden." /> </rule> <rule name="Force simple error message for requests for non-existent favicon.ico" stopProcessing="true"> <match url="favicon\.ico" /> <action type="CustomResponse" statusCode="404" subStatusCode="1" statusReason="File Not Found" statusDescription="The requested file favicon.ico was not found" /> </rule> <!-- To redirect all users to access the site WITH the 'www.' prefix,
</rule> --> <!-- To redirect all users to access the site WITHOUT the 'www.' prefix,
</system.webServer> </configuration>
If everything works correctly, you'll see a CREATE USER notice. 2. 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":
createdb --encoding=UNICODE --owner=username databasename
Both commands have the same effect. Several FTP tools like Filezilla, Transmit, and Fetch allow you to change file 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). 4. Please note: Do not forget to change permissions back after you have run the installation script. Those permissions should be:
chmod 640 settings.php chmod 755 ../default
5. To let the files directory be created automatically, give the web server write privileges to the sites/default directory.
chmod a+w sites/default
For Drupal 7
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, then you should point your browser to the subfolder (e.g. http://example.com/subfolder). If you have installed Drupal on your desktop machine this 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" (for example http://www.example.com/install.php). You will be guided through several screens: 1. Choose which profile to use for the installation (standard or minimal). 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.
2. Select a language If you want to install using a language other than the default English, click the Learn how to install Drupal in other languages link.
3. Verify requirements If your installation directory is not yet configured properly, you will be informed at this step. You can correct the settings individually and either refresh the browser screen or click 'Try again' to see whether there are any errors left.
Possible errors 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 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: The settings.php file. Note that you will need both the default.settings.php and settings.php files. 4. Set up database Enter the database name as well as the username and 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 will 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 box 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. 5. Install profile 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.
6. Configure site 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, andpassword for the main administration account. Note that there is a distinction, as of Drupal 7, between the main administration account that you set up on this page, and the "Administrator" site administratoruser 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 accountsection during installation is a super-user who has overall control over every aspect of the management and configuration of the site. (This will be http://www.example.com/user/1, for those of you familiar with that
In the Server settings field, select your Default country and Default time zone. In the Update notifications field leave both boxes checked 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 unchecked and
Click "Save and continue". On success you will see the Drupal installation completescreen. If there are any error messages, review and correct them now.
If you make manual changes to the settings.php file later, be sure to protect it again after making your modifications. Failure to remove write permissions to that 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 multi-site setup.)
For Drupal 6
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 desktop machine this URL might be http://localhost.
You will be guided through several screens to set up the database, create tables,
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
Details
This table shows what extra modules will get enabled with the Standard profile:
Module Block Color Comment Contextual Links Dashboard Database Logging Field Field SQL storage Field UI File Filter Help
Minimal x
Standard x x x x x
x x x
x x x x x
x x
Module Image List Menu Node Number Options Overlay Path RDF Search Shortcut System Taxonomy Text Toolbar User
Minimal
Standard x x x
x x x x x x x x
x x
x x
Modules enabled by profile Note: There are core modules not enabled in either profile, and those are not included in the table. It is correct to say that Database Logging and Block are the only two modules that
are enabled in Minimal. The other modules are required by Drupal. Update Status depends on the user choosing updates during installation.
Menus
Both - 4 default menus. The Navigation and Management menu blocks appear by default in Bartik's first sidebar, and the user menu is printed in the upper right. Minimal - The menu module is not enabled. Menus cannot be added or edited under Structure > Menus until the Menu module is enabled. Standard - Default home link in the Main Menu
Blocks
Minimal - The default Bartik theme has the following blocks enabled: System help in the Help section Main page content in the Content section Navigation, User login, and Management in the Sidebar first section Standard - The default Bartik theme has the following blocks enabled: System help in the Help section Main page content in the Content section Search, Navigation, User login in the Sidebar first section Powered by Drupal in the Footer
Appearance
Minimal Bartik is the default theme and the default admin theme Standard Bartik is the default theme Seven is set as the admin theme, and set to appear when editing or creating content Global and Bartik initial theme settings are the same.
Text formats
Minimal - One Plain text format (default with drupal) Standard - 3 text formats, Plain text, Full HTML, and Filtered HTML
Media
Standard - has three default styles: thumbnail, medium, and large (Minimal does not have the Image module enabled.)
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: 1. Navigate to the Clean URLs configuration page (Administer > Configuration > Search and metadata) 2. Wait for the automated Clean URLs test to run. 3. Check or uncheck the Enable clean URLs checkbox 4. 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 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.
You can find a synopsis of any contributed module or theme by visiting its project page, but many modules and themes also include README.txt file with more detailed information.
To view a module's README.txt file without having to download anything, visit http://drupalcode.org/project/modulename.git/blob/HEAD:/README.txt. Be sure to first replace the word modulename with the name of the particular module. For themes, visit http://drupalcode.org/project/themename.git/blob/HEAD:/README.txt. Option 1: Upload the module through the Drupal interface
Navigate to the install page. Navigate to Modules > List (tab), or http://example.com/admin/modules, and click the link 'Install new module.' (You must have theUpdate manager module enabled to see this link.) Follow the prompts. You will be prompted to provide either the URL to the download, or to upload the .tar.gz or .zip file from your local computer. Click 'Install', and the Update manager will copy the files into your sites/all/modules folder. (See Update manager for more information about what that core module can do.) The next screen gives you two links. Click 'Enable newly added modules' and skip down to the 'Enable and configure' section.
If your site asks for your FTP username and password, it is referring to the username and password to access your site, not drupal.org A note about FTP: If FTP is not enabled for your server, you may receive an error message. Drupal will not be able to diagnose the problem, only tell you that there is one. It's up to you to determine whether your server is properly configured for FTP. Option 2: Upload the module manually Extract the files.The downloaded module package will be in a compressed file format such as 'tar.gz'. On Windows, use a program like 7-zip to extract the files. On modern Mac systems, double-click the .tar.gz file. For *nix systems, use the command line:
Upload the folder. Transfer your files with SFTP or FTP to the desired modules folder in your Drupal installation (or if you are using version control, add and commit them to your code repository). The modules folder at the top level of your Drupal installation is reserved for Drupal core modules (the ones that come with the original download of Drupal). Contributed modules belong in sites/all/modules. If you are running a multi-site installation of Drupal, use sites/my.site.folder/modulesfor modules there that are specific to a particular site in your installation. Modules that will be shared between all sites should be placed in sites/all/modules. Please note: Especially for sites with a lot of additional modules, many people have begun to further divide the modules folder, to help stay organized. A typical way of doing this would be: sites/all/modules/contrib for all contributed modules. sites/all/modules/custom for all custom modules. sites/all/modules/features if you have additional modules that were created usingFeatures.
module.
Permissions page (Administer > People > Permissions). Scroll down to see if the module appears in the list and, if it does, give the appropriate permissions to desired roles. Adjust settings. Most modules will have some type of settings page. It will vary from module to module but if not described in the README.txt file, it can usually be located by navigating to (Administer > Modules) and clicking on the 'Configure' link for that module. Not all modules have settings pages. Please note: You can only have one copy of a module with the same name in each Drupal site. The module's name is determined by the name of the .module file, not by the name of the directory. Tip: If you run into problems, search the module's issue queue and the forums. If your problem hasn't already been addressed, post a question or issue and someone will try to help you out. Tip: To keep up-to-date on any issues and fixes related to your newly installed module(s), you can create a user account on Drupal.org (if you haven't done so all ready) and then subscribe to the feed of each module you are using.
Installing themes
Last updated June 20, 2012. Created by sepeck on September 16, 2007. Edited by GreenSkunk, aspilicious, WorldFallz, heather. Log in to edit this page. 1. Download the theme. You can find themes on http://drupal.org/project/themes, as well as some external sites. Make sure the version of the theme matches your version of Drupal. Note that themes labeled "DEV" are in a development stage. They may be written for a previous/current/future version of Drupal, and they are considered unstable and should be handled with care. 2. Extract the files. When you first get the theme, it will appear in a compressed file format such as 'tar.gz'. On Windows, use a program like 7-Zip to extract it. On the Mac, you can use Stuffit Expander. To extract the file using the Unix command line:
tar -zxvf themename-drupalversionnumber.tar.gz
You should see a list of files extracted into a folder. 3. Upload the folder. FTP/Copy/SCP your files to the desired themes folder in your Drupal installation. Since the themes folder at the top level of Drupal is typically reserved for Drupal core themes, you should create a sites/all/themes/ directory for contributed(non-core) themes and put uploaded themes there. If you are running a multi-site installation of Drupal, you can
create a themes folder under sites/my.site.folder and put themes there that are specific to a particular site in your installation. Themes that will be shared between all sites should be placed in sites/all/themes. 4. Read the directions. If the theme has an installation file (usually INSTALL.txt and/or README.txt), read it for specific instructions. There are themes that require special treatment to function properly. 5. Enable the theme. Go to administer > site building > themes. Check the 'Enabled' box next to the theme. 6. Optional: Make it the active, default theme. Check the 'default' box to make this the chosen theme for your site. Enabled alone will allow users to select the theme, if you have allowed that permission. 7. Click the 'Save Configuration' button at the bottom. If you run into problems, check the themes issue queue and search the forums. If your problem hasn't already been addressed, post a question and someone will try to help you out.
Theme settings
Drupal 7
You can locate these settings at "Administer > Appearance > Settings > themeName". For example, the site's slogan can be suppressed by unchecking the "Site slogan" check box on that page.
These checkboxes show themselves depending on the features enabled inside the .info file. It must be specified with the key of 'features' followed by empty brackets then the feature itself, e.g., features[] = the_feature. If none are defined, the following values are assumed.
features[] = logo features[] = name features[] = slogan features[] = node_user_picture features[] = comment_user_picture features[] = comment_user_verification
Drupal 7 removes the previously available mission and search as theme features (they can be created and controlled as blocks instead) and adds a toggle for "User verification status in comments". To disable any features, only add the ones you want into the .info file. Defining only the features needed for the theme will omit the rest. Some of the features will also enable related form fields. For example, 'logo' will enable an upload field for the image along with the checkbox.
A few notes:
The contents of the .info file are cached in the database so altering it will not be noticed by Drupal. (Do not confuse this with the theme registry.) To learn how to clear it, check out the options in Clearing the theme cache. hook_features() is no longer supported.
IIS (Windows)
On a Windows system using IIS:
1. Right-click on sites\default\settings.php and grant Write permissions to IUSR_MachineName (IIS6) or IUSR (IIS7). Server 2008: You can also do this from the command line from within your sites\default directory:
icacls settings.php /grant IUSR:W
The installer will change the file back to Read Only after installation, but you should verify this after installation.
What is PDO?
Last updated August 10, 2012. Created by bekasu on August 14, 2009. Edited by klauq, authentictech, Carolyn, Damien Tournoud. Log in to edit this page. PDO is an acronym for PHP Data Objects. PDO is a lean, consistent way to access databases. This means developers can write portable code much easier. PDO is not an abstraction layer like PearDB. PDO is a more like a data access layer which uses a unified API (Application Programming Interface).
Windows users
For Apache, you will need to make sure php_pdo.dll and php_pdo_mysql.dll exist in the php/ext directory, un-comment or add the appropriate lines in php.ini, and restart the web server. For IIS, PDO DLLs are not enabled by default. The preferred method for enabling them is to go to the Control Panel | Add/Remove Programs, highlight your PHP installation and click "Change" (Change/Remove - XP). Specify "FastCGI", then modify the installed extensions to include these two, then restart your server.