Integrating a local php script into drupal block
Sounds like your script is expecting to run index.php from the website root directory which is already used by Drupal.  You will need to re-write the script to use a different root url or set the root url for that script.