dbillings Posted August 12, 2007 Share Posted August 12, 2007 Howdy, I'm trying to execute a script in a cgi-bin directory, and I'm not having any luck. I'm using wamp and my cgi-bin is located at c:/wamp/Apache2/cgi-bin I've never done this before and I'm not trying anything fancy just... #!C:\wamp\php\php-cgi ## ## printenv -- demo CGI program which just prints its environment ## print "Content-type: text/plain; charset=iso-8859-1\n\n"; <?php echo "Hello World!"; ?> No luck at all yet, any suggestions? Link to comment https://forums.phpfreaks.com/topic/64470-using-php-scripts-in-a-cgi-bin/ Share on other sites More sharing options...
dbillings Posted August 12, 2007 Author Share Posted August 12, 2007 Here's a few questions I'd like to throw out there. 1. Would my php files need to be named file.php or file.cgi to be executed out of a cgi-bin? 2. I've managed to get the php extension files to print in a browser but the Shebang line prints as text for some reason, why? 3. I assume I want the shebang line to point to c:\wamp\php\php-cgi there is also a php.exe and php-win.exe but I assume the php-cgi is the correct one *shrug*? Link to comment https://forums.phpfreaks.com/topic/64470-using-php-scripts-in-a-cgi-bin/#findComment-321660 Share on other sites More sharing options...
dbillings Posted August 12, 2007 Author Share Posted August 12, 2007 No one? Really. Link to comment https://forums.phpfreaks.com/topic/64470-using-php-scripts-in-a-cgi-bin/#findComment-321881 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.