Book: Drupal 7 Module Development (directions caused weirdness) I'm reading a book, Drupal 7 Module Development, and I'm hitting some very weird outputs.

I created a folder:

mysite/sites/default/module/first


Inside this folder I created two files.

first.info

;$Id$

name = First
description = A first module
package = Drupal 7 Development
core = 7.x
files[] = first.module

;dependencies[] = autoload
;php = 5.2


first.module

&lt;?php

// $Id$

/**
 * @file
 * A module exmplifying Drupal coding practices and API's.
 *
 * This module provides a block that lists all of the 
 * installed modules. It illustrates coding standards,
 * practices, and API use for Drupal 7.
 */

/**
 * Implements hook_help().
 */
function first_help($path, $arg) {
    if ($path == 'admin/help#first') {
        return t('A demonstration module.');
    }
}


But when I activate the module, I get the contents of the first.module file spashed across the top of my page? Can someone advise me on what I am doing wrong?

This is my very first module for Drupal.
You just have to follow the steps which I am writing below to create a module.


Go to folder SITES/ALL/MODULES
Create a folder for module, suppose mymodule
Inside that folder create a file name mymodule.info
Write these lines in there:

name = My Custom Module

core = 7.x

description = Custom module created for testing.
Create another file named mymodule.module
Just open the PHP tag like &lt;?php and save the created .module file
Visit your module list &amp; you will find this module in the list over there. If not then clear the cache for once.


Problem with your process which I saw is with the path which you followed for creating the folder for your module which SITES/DEFAULT/MODULES, which is not correct.