So, using the old and large PHP script, just to get it functioning, I had to bootstrap Drupal.
Place this at the beginning of OldLarge.php
$drupal_dir = getenv("DOCUMENT_ROOT");
$current_directory = getcwd();
chdir($drupal_dir);
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
...
Do my Drupal stuff here....db_query() and whatever so that I can get results back from weird tables.
...
Then at the end of OldLarge.php , add the final code....
chdir($current_directory);
Eventually...some day (which ends up being never) I will convert the OldLarge.php script to something more Drupalized.