The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Could someone please tell me what I need to set up and how to do it in order for it to work. I have been throught the apache config files and told it to run all CGI scripts from c:htdocscgi-bin, yet it won't even recognise they are there, let alone give me a compiling error!
I would also be grateful if someone could send me a CGI file to test it - just a "Hello World" one. I haven't learnt CGI yet, so I don't know if the script I got from the internet has an error...
However, when I run a .pl file (such as the example file they include with ActivePerl) from Internet Explorer, it simply asks me if i would like to download the program, and then open or save it. if i select open, it runs it using the command line, and if i save it, it just saves the file on my HDD. how do i make it execute the file rather than download?
please help...
> OK, I've just done a search of my hard drive, and i dont have perl.exe
> anywhere! i would hazard a guess this has something to do with it.
> where can i download it from?
>
> btw, i looked in the error logs, and this is the error i got:
>
> [Wed Jun 12 17:39:28 2002] [error] [client 192.168.0.2] couldn't spawn
> child process: c:/htdocs/cgi-bin/printenv.cgi
Yeah, something to remember, CGI isn't a language. Its just a standard for interfacing with external applications like Perl, you can equally run PHP with CGI too if you wish or any program you want for that matter.
For windows, I guess you want to download ActivePerl (don't really know of any other perl implementations for windows sorry). You can get that from activestate.com. Download and install Perl, and then in the top line of your CGI script just put the path to the perl executable (might be you need to change something in the apache config too, depends if you've set up anything telling it what to spawn with certain extensions).
-G
btw, i looked in the error logs, and this is the error i got:
[Wed Jun 12 17:39:28 2002] [error] [client 192.168.0.2] couldn't spawn child process: c:/htdocs/cgi-bin/printenv.cgi
Btw, just noticed from your first post, you won't get compile errors shown in your browser like you are used to in PHP, if the script execution fails (due to syntax errors or whatever) apache usually just returns an internal server error. You can change it, but I think the default setting is as I said.
-G
-------
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
-------------------------
Apache/1.3.20 Server at matthew Port 80
-------
file contents:
______________
#!c:/program files/perl/perl
##
## printenv -- demo CGI program which just prints its environment
##
print "Content-type: text/plain\n\n";
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}
______________
> I know PWS only works on the PRO version of XP, because M$ thought
> that only "pro" users would want to run a local web server.
> I know it is a long shot, but are you sure the Apache version you are
> using works with XP? I've never used Apache on Windows, so can't be
> much more help than that.
Apache definately works on XP Pro as I run it at work, but there is a big difference between Pro and Home with these things. hence why IIS only comes on XP Pro.
> I have installed Apache 1.3.20 on Windows XP Home Edition, including
> PHP 4.2.1. The directory in which I store web sites is c:htdocs but I
> can't seem to get CGI working at all - I have tried running .cgi and
> .pl files from c:htdocscgi-bin c:Program FilesApache
> GroupApachecgi-bin and c:cgi-bin but it doesn't work!
>
Define "it doesn't work". :)
Is your browser returning an error or is it just serving up the files without processing them. Also what does the apache log say to these requests?
-G