Why Can't I Call Drupal Function From .inc File? I have an inc file which I am including in my module using module_load_include. It contains the following function:

function _get_vid($vocabulary_name) {
    $vocabs = taxonomy_get_vocabularies();
    foreach ($vocabs as $vocab_object) {
        if ($vocab_object-&gt;name == $vocabulary_name) {
           return $vocab_object-&gt;vid;
        }
    }
    return NULL;
}


But PHP keeps complaining that taxonomy_get_vocabularies is an undefined function. Why? I know I've used Drupal functions in .inc files before with no issues.
I think your module must have weight higher than the taxonomy module so that I can call any functions that are defined in taxonomy. 

You can make sure your module is the heaviest one in order to run last by implementing hook_install().
You would create a file yourmodule.install in your module folder which may contain the following code:

/**
 * Implementation of hook_install()
 */
function yourmodule_install(){
    # Fetch max module weight from "system" table.
    $max_weight = db_query("SELECT MAX(weight) FROM {system} WHERE type = 'module'")-&gt;fetchField();
    # Make sure this module is the heaviest one in order to run last
    db_update('system')
        -&gt;fields(array('weight' =&gt; $max_weight+1))
        -&gt;condition('name', 'yourmodule')
        -&gt;execute();
}

/**
 * Implementation of hook_uninstall()
 */
function yourmodule_uninstall(){
    db_delete('system')
        -&gt;condition('name', 'yourmodule')
        -&gt;execute();    
}