Drupal Drupal Installing Drupal 7 CMS

Procedures and notes for local and remote installations of Drupal 7 CMS. Local installation went smoothly. Remote installations had issues with Clean URLs and shared tmp directory.

Remote Drupal Installations kcshadow.net/hiking | kcshadow.net/mobile | kcshadow.net/wpdeveloper
  1. Verify Software requirements, for Drupal Version: 7.22 (see file /includes/bootstrap.inc for version).

    • Database Requirement: MySQL5.0.15 or higher with PDO.
      (using: MySQL 5.1.30)
    • PHP Requirement: PHP 5.2.5 or higher, 5.3 recommended.
      (using: PHP 5.3.6)
    • Web Server Requirement: Apache 2.x, 1.3 will likely work.
      (using: Apache)

  2. Run Drupal Installer script using Zacky Installer.

    • Open Zacky Installer, go to Drupal and click on <Install now>.
    • Choose domain for website: www.kcshadow.net <Next Step>.
    • Click on <Install> for a brand new version.
    • Version: 7.22
    • Where would you like Drupal installed: http://www.kcshadow.net/hiking, http://www.kcshadow.net/mobile, http://www.kcshadow.net/cathy.
    • Set user name (admin) and password in the Advanced Options. Leave checked to automatically create a new database.
    • Click on <Complete> and wait for install to run.
    • View database created:

      • http://www.kcshadow.net/hiking = 1218369_fa30. Host: pdb3.your-hosting.net, Port: 3306, User: 1218369_fa30@, Tables: 74, Rows: 1,356.

      • http://www.kcshadow.net/mobile = 1218369_c42c. Host: pdb3.your-hosting.net, Port: 3306, User: 1218369_c42c@, Tables: 74, Rows: 1,380.

      • http://www.kcshadow.net/cathy = 1218369_a099. Host: pdb3.your-hosting.net, Port: 3306, User: 1218369_a099@, Tables: 74, Rows: 1,380.

  3. Post Zacky install modifications.
    • Go to database management and change the password on the database just created. Verify password change with phpMyAdmin.
    • Browse to site URL (kcshadow.net/xxxxx). Drupal screen displays with error: PDOException: SQLSTATE[28000] [1045] Access denied for user .
    • Change the password in Drupal settings.php file by going into <File Manager Advanced>. Open the settings file (kcshadow.net/xxxxx/sites/default/settings.php) and update the password. You may need to download, change, and upload to make the change. Be sure the permissions on the file are set to read-only for everyone once you are finished (0644).
    • Browse to site URL (kcshadow.net/xxxxx). Drupal screen displays with three similar errors: Notice: unserialize() [function.unserialize]: Error at offset 440 of 529 bytes in system_list() (line 167 of /srv/disk9/1218369/www/kcshadow.net/hiking/includes/module.inc).
    • Attempt to log in using admin and provided password causes error 404 - File Not Found. To get logged in, enter: kcshadow.net/xxxxx/?q=user/login in the browser address bar. This will bring up User Account screen. Log in as admin there with provided password. This will again result in error 404, but this time the url address will indicate: kcshadow.net/hiking/user/1. Enter in the address bar: kcshadow.net/xxxxx/ and you will see you are now logged in as admin.
    • You will still get a 404 error if you attempt to go to any link. The problem is the install configured for Clean URLs, but the server is not supporting Clean URLs. To turn Clean URLS off, go to a Drupal install that is not using clean URLs (localhost). Go to <Configuration><Clean URLs>. From the address bar, copy everything to the right of local host (/?q=node#overlay=%3Fq%3Dadmin%252Fconfig%252Fsearch%252Fclean-urls) . Go back to the new host install and paste this after the site URL. The address bar should look like this( kcshadow.net/xxxx/?q=node#overlay=%3Fq%3Dadmin%252Fconfig%252Fsearch%252Fclean-urls). Then press enter.
    • The Clean URLs screen should display with the message: Clean URLs are enabled, but the clean URL test failed. Uncheck the box below to disable clean URLs. Uncheck the Enable clean URLs check box and click on <Save configuration>. All the links should now work (no more 404 errors).
    • Go to the <People> link and change the admin password and local time setting. I used the same password as the database <Save>. Note: may need to visit home page first, then go to <People>.

  4. Run the Drupal Status report and check for messages
    • PHP memory limit 16M message - change php.ini to be 64M (memory_limit = 64M).

  5. Check Recent Log Messages for errors and warnings. Found several warnings about permission denied on /tmp directory, such as this one: Warning: rmdir(/tmp/update-extraction-609ec84e/entity/ctools/content_types) [function.rmdir]: Permission denied in drupal_rmdir() (line 2369 of /srv/disk9/1218369/www/kcshadow.net/one/includes/file.inc).
    This is caused because the default setting for the tmp directory is \tmp, which is shared by many users. Created local tmp directory(sites/tmp) and changed Drupal to use it. <Home><Administration><Configuration><Media - File System> changed Temporary directory to sites/tmp. Created this tmp directory with permissions 775.

  6. Then clear log messages and run Cron <Home><Administration><Configuration><Cron>. Check log message again. Only message should be Cron run successfully.
Module Configurations

Enable the following modules in the Drupal core:

  1. Aggregator
  2. Contact (hikingtrails@kcshadow.net,mobile@kcshadow.net,cathy@kcshadow.net)
  3. Tracker

Download, install, and enable the following non-core Drupal modules:

  1. To enable views in D7 you need to install the modules:
    Then enable the Views and Views UI modules. Select <Continue> to also enable the Chaos tools module required for the Views module. When finished there should now be a <Views> link in the <Structure> page.

  2. To bypass the PHP mail() function and send email directly to an SMTP server:
    • SMTP Authentication Support SMTP server = mail.kcshadow.net
      SMTP Port = 25
      Username = hikingtrails@kcshadow.net,mobile@kcshadow.net,cathy@kcshadow.net
      E-mail from address = hikingtrails@kcshadow.net,mobile@kcshadow.net,cathy@kcshadow.net

  3. To have meta tags for search engines, install, enable, and configure the module:
    Then enable the Extra Functionality and Meta Tags (quick) modules. There should now be a new <Search and Metadata> section under <Configuration>. Under >Meta tags (quick) settings, check all entries in both the Description and Keywords columns. Then <Attach> and <Submit>. Then under the <Auto Settings> tab, check all the Applicable content types. Note: may have to revisit this when new content types are added). Further down the page, check the fields: Tags, Autogenerate meta description, and Generate metatags from the node body (first option) Then <Submit>. Under the <Path-Based Metatags add a path that simply is "node", then <Create>. Note this entry is required for the front page. Then add the Keywords and Descriptions and <Submit>. Also create a path entry for any views that have been created. This may also need to be revisited after views are added.

  4. To created automated backup of the Drupal database, install, enable, and configure module:
    Before configuring this module you must set up a "Private File System Path " under <Configuration><Media><File System> ( path = sites/default/files/private/backups, create the directories if they do not exist setting permissions 755). Next run a quick backup to verify process. Then configure<Advanced Backup> -- change Compression=Zip. Under the <Advanced> section, change the two email addresses and check the two check boxes: "Send an email if backup fails" and "Take site offline". Next <Create a New Destination> for the backup. Create as Directory = Server Directory, Name=Backups and Location=sites/default/private/backups and Change File Mode = 0644. Then change the destination to <Backups>, check the box "Save these settings" (replacing the default profile) and <Backup Now>. Verify the backup.

  5. To created a sitemap for the website, install, enable, and module:
Note: If errors are received while trying to install modules, make sure you created the the sites/tmp director as described in #5 above.

Local Drupal Installation (7.22) localhost

Below is the procedure for installing a testing Drupal site on my local computer:

  1. Verify Software requirements, for Drupal Version: 7.22 (see file /includes/bootstrap.inc for version).

    • Database Requirement: MySQL5.0.15 or higher with PDO.
      (using: MySQL 5.5.24)
    • PHP Requirement: PHP 5.2.5 or higher, 5.3 recommended.
      (using: PHP 5.4.3)
    • Web Server Requirement: Apache 2.x, 1.3 will likely work.
      (using: Apache 2.2.22)

  2. Create the Drupal Database (using same name as host db: 1218369_e9e9).

    • Open phpMyAdmin. Go to <Databases>, then enter name an collation.
    • Name: 1218369_e9e9
    • Collation: leave set to Collation.
    • Click on <Create>.

  3. Download the Drupal project.

    • Go to drupal.org.
    • Go to <Download> page and click on the desired version to download (I used the current version which was 7.22 -> drupal-7.22.zip, 3,637,890 bytes).
    • Extract the Drupal zip file.

  4. Copy the Drupal files to server and test.

    • Go to c:\wamp\www\ directory. Rename index.php to index.php.OLD.
    • Copy entire contents of the extracted Drupal folder (files and directories) to the c:\wamp\www\ directory.
    • Enter "http://localhost" in a web browser and the Drupal install page should display:


  5. Run the Drupal Install program.

    • Choose profile: (Standard - Install with commonly used features pre-configured). Click on <Save and continue>.
    • Choose language: (English). Click on <Save and continue>.
    • Verify requirements: Goes to next screen if requirements were met.
    • Set up database ...
    • Database type: (MySQL, MariaDB, or equivalent).
    • Database name: 1218369_e9e9 (matching the db name on my host).
    • Database username: root (for wamp = root).
    • Database password: enter nothing (for wamp=no password).
    • Click on <Save and continue>. Just click once. Portion of Install runs.
    • Configure Site ...
    • Site Name: localhost
    • Site e-mail address: kcshadow@comcast.net
    • Maintenance Username: admin
    • Maintenance E-mail address: kcshadow@comcast.net
    • Maintenance Password: password
    • Server Settings ...
    • Default country: United States
    • Default time zone: America/Chicago
    • Update Notifications ...
    • Checked - Check for updates automatically.
    • Checked - Receive e-mail notifications.
    • Click on <Save and continue>.

  6. Fix Install Error: Fatal error: Call to undefined function field_attach_load() in C:\wamp\www\includes\entity.inc on line 321.

    From Drupal Support Web Site - 1366960:
  7. A quick search on your error message turned up the following post http://drupal.org/node/481758. A couple of suggestions there were:

    • Your PHP maximum script execution time is set too low for the installation to complete. Check your php.ini file and increase the max_execution_time parameter.
    • Your PHP memory_limit parameter may be set too low. Drupal 7 requires a minimum of 32MB PHP memory to run, but some installations may require 64MB or more. See http://drupal.org/requirements for details.

    My php.ini:

    ; Resource Limits
    ; Maximum execution time of each script, in seconds
    ; http://php.net/max-execution-time
    ; Note: This directive is hard coded to 0 for the CLI SAPI

    max_execution_time = 30
    ; Maximum amount of memory a script may consume (128MB)
    ; http://php.net/memory-limit
    memory_limit = 128M

    So in my php.ini I changed: max_execution_time = 30 to be max_execution_time = 240.
    Also changed memory_limit = 128M to memory_limit = 256M. Then:

    • Dropped the Drupal database and recreated (MUST DO).
    • Restarted all WAMP services.
    • Removed all contents from wamp www directory and copied the contents of the extracted Drupal folder again.
    • Started install program again, now using Chrome instead of IE.


      Visited New Site:

Top | Local Installs | Remote Installs