Module code not firing I have a custom D7 module that I have placed in sites/all/modules/custom/mymodule folder. It appears on the modules page, and when I enable it, there are no errors.

The only code inside of it is:

function mymodule_init() {
  exit;
}

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  var_dump($form_id);exit;
}


Yet, neither of these cause an exit. If I place an exit outside of these functions, it definitely exits.

What is the issue?

Edit: Info file contents:

name = My Module
description = Form modifications for user forms (register, login).
core = 7.x
version = 7.x-1.0
dependencies[] = html5_tools
dependencies[] = elements
Your version string is wrong, and shouldn't be manually included anyway, but that wouldn't cause this issue.

Drupal searches recursively for modules. I just recreated the same set-up that you had, and after a cache clear (do this by visiting admin/config/development/performance and clicking "Clear all caches").