I'm trying to embed the perl functionality of my old site into my new drupal site. I have this working fine:
<?php
global $user;
$function = 'http://mysite.com/AdminFunctions/myfunction.cgi?User=';
$send = $function . $user->name;
include $send;
?>
My problem lies in that I need for access to these files to be limited by access levels/roles within drupal. If I put it behind any other kind of access, drupal can't include it. If I leave it web accessible, it's not limited/secure. If I try this code.
<?php
global $user;
$function = '/full/system/path/AdminFunctions/myfunction.cgi?User=';
$send = $function . $user->name;
include $send;
?>
I get:
warning: Unknown: failed to open stream: No such file or directory in /var/www/html/drupal/includes/common.inc(1816) : eval()'d code on line 6.
warning: Unknown: Failed opening 'full/system/path/AdminFunctions/myfunction.cgi?User=anne.ramey' for inclusion (include_path='.:/php/includes:/usr/share/php:/phpincludes') in /var/www/html/drupal/includes/common.inc(1816) : eval()'d code on line 6.
It appears that this is a php path problem, but is there any way to work around it? My ideal is to have the cgi files in a folder that is not web browsable, then drupal can completely control access to the functionality. I'm sorry if this is an ignorant question. I've done some research and all the php include reference are either for files in the same dir or urls.