I need help with my Apache HTTP Server

Viewing forum thread.
Back to Technology chat.
Back to Forum List.

Deleted User
(IP Logged)
10:42 Fri 29 Jun 07 (BST)  [Link]  
I hope someone can help me here,

I am trying to learn Perl Programming (And other CGI scripts) and recently installed Apache HTTP Server to check that the scripts work.

i have successfully configured it to view HTML files, but can't seem to get the CGI files to work, I keep getting errors like:

Post method not allowed (when using ASP)

and when i check the error log it says something about not being able to load the Child, or something like that.

i have added the "AddHandler" for the CGI scripts but, other than that im not sure what else i can do to get it working.
Deleted User
(IP Logged)
12:01 Fri 29 Jun 07 (BST)  [Link]  
Put your cgi scripts in the cgi-bin directory. If you are running Apache on your local machine, then type http://localhost/cgi-bin/yourscript.cgi in the address bar of your browser.

if this doesn't work , then on command prompt use 'perl yourscript.cgi' command from the directory containing yourscript.cgi to diagnose any programming errors.
Deleted User
(IP Logged)
16:10 Fri 29 Jun 07 (BST)  [Link]  
oh i'll try that.

when i access the server i use the IP address 12x.x.x.x.

im assuming you mean to go to http://12x.x.x.x/cgi-bin/script.cgi, i have been trying that and thats where i get the problems.

i'll get back to u if that doesn't work

Edited to protect your privacy and hard work!

Edited by forum moderator spinner, at 22:38 Fri 29/06/07 (BST)
Deleted User
(IP Logged)
10:07 Mon 2 Jul 07 (BST)  [Link]  
ok heres how ive progressed since friday evening

i can view files with the extension .pl but the browser outputs the source code:
Posted Image

when i run the script in my browser it should look like this:
Posted Image

Also, When executing .cgi files the browser displays error message;

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request


Error log reads: {Sun Jul 01 13:01:49 2007} {error} {client localhost} couldn't spawn child process:
c:/program files/apache group/apache/cgi-bin/server_info.cgi

i have added "AddHandler CGIscript .cgi .pl" and "Options ExecCGI" to the HTTPD Configuration File, but that then means that the files that were viewable before are now returning the Internal Server Error message.

Edited at 15:22 Mon 2/07/07 (BST)
Deleted User
(IP Logged)
10:49 Mon 2 Jul 07 (BST)  [Link]  
what's the very first line of your source code ?
I think it is incorrect (could be seen in the snap too)
does it point to the correct path of perl.exe on your system. ??
it must be something like
#!c:/perl/bin/perl . change it to wherever your perl.exe is located.

I have 99% confidence that this will help you.

Edited at 18:02 Mon 2/07/07 (BST)
Deleted User
(IP Logged)
10:19 Mon 9 Jul 07 (BST)  [Link]  
Is "perl.exe" the name of the actual perl file (i.e "myscript.pl") or do i need to download a file called "perl.exe"?

i tried to search for the perl.exe using windows search but i couldn't seem to find one that looked like the file that was to be used.
Deleted User
(IP Logged)
10:26 Mon 9 Jul 07 (BST)  [Link]  
perl.exe is the exe of language in which your script. ie. myscript.pl is written (pl stands for perl). Without perl you can't run any of pl or cgi scripts. As a rule, in each of our cgi scripts we have to mention where our perl language exe is installed. If you haven't installed perl.exe yet, read the following link
http://www.perl.com/download.csp
Unable to post
Reason:You must log in before you can post

I need help with my Apache HTTP Server

Back to Top of this Page
Back to Technology chat.
Back to Forum List.