|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
Apache beginner - I need help
Hi my name is Jenny,
I'm a very new beginner to Apache. I downloaded Apache 1.3.19 on my computer so I could practice inserting very simple CGI scripts on my website. I've got some problems. I'm running Apache from a console window (I'm using Windows 98). Apache is up and running and I can see my successful http://localhost/ page. But now what do I do? How can I learn to insert CGI scripts? I've been looking all over the Apache .pdf help files, but I haven't been able to find assistance. Thanks for reading, Jenny |
|
#2
|
|||
|
|||
|
CGI is a broad term. You can write CGI scripts in numerous languages (Perl, PHP, Shell/batch files, etc.) In order to run those CGIs, you need their script processors (perl scripts (typically end in .pl or .cgi) require you to have Perl installed, PHP CGIs require you to install php, etc.) There's a few settings in your conf\httpd.conf file for Apache's CGI-BIN directory, so you might want to go over those.
__________________
To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson |
|
#3
|
|||
|
|||
|
Tricky Windoze
Apache can´t use all its features under windows. Thats a pity but a fact. There is some perl Binary for Win32s
http://www.perl.com/CPAN/ports/win32/Standard/x86/ Install it and READ the Manual of perl. There you´ll find HOW to install it. With Perl you can use cgi-bin more or less good. Remember, that most ready made perl scripts are written for unix systems, so that you have to change pathnames / = \ ... After all PHP is also possible with Win32s Binary on php.net Have Phun |
|
#4
|
|||
|
|||
|
Hi all,
So even if I have Apache running on my computer I still need Perl to run CGI scipts? Chronoton, Is this the file I should be downloading? DB_File-1.54-bin-v3-x86-mswin32-bc.zip I don’t understand why I this file? Thanks for the replies Chronoton and cka. Jenny |
|
#5
|
|||
|
|||
|
Nope Jenny :
This is your file : http://www.perl.com/CPAN-local/port...indist04-bc.zip And yes, you NEED Perl to run cgi-bin. Apache won´t handle that alone, still mod_perl needs perl in Backend *smile |
|
#6
|
|||
|
|||
|
Hi,
Ok, so this... http://www.perl.com/CPAN-local/port...indist04-bc.zip ...is Perl? Or is it a piece of the puzzle to make Perl work? When Perl is on my PC does Apache find it on its own? How does Apache know where Perl is? Thanks, Jenny |
|
#7
|
|||
|
|||
|
*smile
-- snip -- Ok, so this... http://www.perl.com/CPAN-local/port...indist04-bc.zip ...is Perl? Or is it a piece of the puzzle to make Perl work? -- snap -- No Jenny, this is perl, normally you won´t need anything more than that binary. Unzip and then Setup it... Thats all.. |
|
#8
|
|||
|
|||
|
Hi,
Alright, so I’ll download that and give it a shot! Thanks chronoton, your help is really appreciated. Jenny |
|
#9
|
|||
|
|||
|
It's me again!
How can I insert CGI scripts into Perl and test them? I have Perl installed and I have Apache 1.3.19 running in a console window (Windows 98) on my computer. I have no idea where to start. I’ve looked through the Perl .html help docs, but I can’t find any info. for beginners, like myself, who know very little about Perl. Thanks, Jenny |
|
#10
|
|||
|
|||
|
Well...
I´m not really fimilar with Win32s Installations of Apache. But usually you should have a so called document root. There you´ll find a directory called cgi-bin Put some very very easy cgi script into that path. You´ll find tons of scripts on www.hotscripts.com After that, open your webbrowser and try the following : http://localhost/cgi-bin/nameofyoutestscript.cgi Look , what will happen ? |
|
#11
|
|||
|
|||
|
Hiee,
I know where my CGI-bin is within my Apache folder. When I save or create my CGI scripts, do I do so through Notepad (or another text editing application)? What extensions do I give the scripts? I know I need Apache running, but do I need Perl running when I check these scripts on the http://locahost ? Thanks, Jenny |
|
#12
|
|||
|
|||
|
Hey Jenny,
may I repeat myself... but you NEED apache AND PERL running, because apache gives the request perl to handle it. The File extension is .cgi |
|
#13
|
|||
|
|||
|
Hiee chrono,
Yes, I know Apache needs to be running. But how do I make Perl run? I heard Perl doesn’t run, it is just called upon when a .cgi script requests it. I put the following .cgi script in the Apache/cgi-bin folder. I tested the following script in my IE browser (http://127.0.0.1/cgi-bin/simple.cgi), but was unsuccessful. The script is called simple.cgi #!perl print "Content-type: text/html\n\n"; print "Not Hello, again!\n"; Is the #!perl line the problem? Should that line display the exact path to perl.exe like this... #!c:/program files/perl/bin/perl Do you know what could be wrongy? Thanks, Jenny |
|
#14
|
|||
|
|||
|
lol, JennyW, I think you are going to drive them mad. After Apache and Perl have been installed successfully, when a .cgi, .pl, or any other script file is called, Perl will answer and do its thing(anyone correct me if im wrong). In *nix servers, you need to tell Apache where the script interpreter is located, such as /usr/bin/perl or something. But in Windows, the path is automatically given. I am not a perl person yet but the way that 2 line code looks, it looks fine and nothing is wrong.(again, anyone correct if im wrong)
__________________
z-lite was here |
|
#15
|
|||
|
|||
|
Here, open up notepad then copy and paste the below code:
print "Content-type: text/html\n\n"; print "Hello World!"; save it as hello.pl into the cgi-bin folder and open up IE and type the path to the hello.pl, such as http://127.0.0.1/cgi-bin/hello.pl and see if 'Hello World!' shows up. If not, Apache is not configured to use Perl for scripting OR there was an unsuccessful installation. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Apache beginner - I need help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|