SWD Posted April 20, 2009 Share Posted April 20, 2009 HI All, I've got a sneaking suspicion my problem is either impossible to solve or so simple I'll be embarrassed by the solution. Our web server, like most, has the cgi-bin folder sitting below the document root. You can however access cgi scripts using /cgi-bin/<script name> on the browser address line. My problem is that I need to get the full path to a cgi script so it can be run using exec. At present when the call is made to file_exists I get file not found. When I log into FTP I can see that the file exists. Does anyone know how to get round this problem? To clarify further.... my cgi script is physically located at '/var/www/vhosts/myserver.com/cgi-bin/test.cgi'. To access on the command like I go http://www.myserver.com/cgi-bin/test.cgi and that works fine. If I look at $_SERVER [ DOCUMENT_ROOT ] it returns /var/www/vhosts/myserver.com/httpdocs/. It's almost as though you cannot physically access the cgi-bin folder with a full path. Any help would be hugely appreciated. Thanks Lost Programmer Link to comment https://forums.phpfreaks.com/topic/154960-accessing-cgi-bin-folder-with-file_exists/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.