Local testing

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

09-Sep-03 21:57
Hello,

Does anyone know of any software that I can install on my machine so that I can test CGI scripts locally, any related info would be a great help.

Regards

Jason..

[Edited by jason on 09-Sep-03 16:12]
10-Sep-03 10:15
Hi Jason,

Sure, there are 2 pieces of software you need:

- A web server
- Perl

Perl runs the CGI scripts; the web server displays the resulting pages in your browser.

I'd recommend using Apache for the web server because it's free to download and is the most popular server on the Internet:

http://httpd.apache.org/

For Perl - if you're using Linux, FreeBSD or MacOS X then it will probably already be installed. If not you can grab it from: http://cpan.org/ports/

If you're using Windows then the easiest way to get Perl is to download ActiveState's ActivePerl, from:

http://activestate.com/Products/ActivePerl/

Once you have Apache and Perl installed and running, you can create a test site with a cgi-bin folder (set the cgi-bin folder to run CGI scripts with the "ScriptAlias" directive in Apache's httpd.conf), and put your scripts for testing in there. To test the scripts via the web server, you would just point your browser to the script on your local server, e.g.:

http://localhost/cgi-bin/myscript.cgi

Hope that helps If you need any more info just let me know.

Cheers,
Matt
ELATED : )





--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/
10-Sep-03 19:17
Thanks Matt.

Imformative as ever. I installed apache and perl and it all works well except typing http://localhost returns a server not found error, however, typing the ip address 127.0.0.1 works and the apache test page is displayed, thatnks again for the info matt..

Regards

Jason.
10-Sep-03 20:05
It's probably the computer "name" thats causing the problem. Try going into Control Panel > Network and then go to the Identification tab. You can change the computer name here.

It's normally "localhost", but some manufacturers change it for whatever reason. I have a Packard Bell PC here which has been named "PBN_Computer." My other one was "OEMComputer."
11-Sep-03 23:40
localhost may not work if you don't have a network card installed because the 'hosts' file will not be there. This file can handle the resolution of hostnames to IP in a network with no DNS server.
If you have no N.I.C. and no need to fit one you can install the MS Loopback Adaptor (in network adaptors) to simulate a N.I.C.


Chris.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/
22-Jan-10 15:26
Hi Good People,

I've gotten 3 replies to my inquiry, but so far, none have worked. Perhaps I stated my question wrong and failed to include all the important information. First, I have 6 systems I'm trying to set up a local test server. I'm using ASP ABScript, and I do have Microsoft's IIS installed on all computers, and Adobe Master Collection CS4 package. My Web editor is Dreamweaver CS4. The desktops all have Windows 7 (recently upgraded). I've installed Windows Vista (Ultimate) on my laptop for better security reason. I may have been wrong there, but I still think I can get all systems working properly. Back to the errors, I'm now getting ERROR 502.4 "Bad Gateway" "No Appropriate server could be found to route the request."
Chris has suggested that I download WAMP with PHP and MySql. I tried that, but got the message that it could not complete the installation because the file wampmanager.exe could not be found. I tried finding the file on line, but found many unrelated file that I didn't want nor needed. At best, I've reached the zenith of my frustration. Any assistance will be greatly appreciated. Thanks loads, Joe Dardard

Using the suggestions I've gotten from my three responders, I've been able to change the error from ERROR 404.O

--
Joseph Dardard
25-Jan-10 02:51
Hi Joe,

I think you posted this in the wrong topic/forum. You'll get more of a response if you post in your original topic:

http://www.elated.com/forums/topic/4855/

Here's an explanation of error 502:

http://www.checkupdown.com/status/E502.html

Are you trying to access the site from the same computer that's running the Web server, or a different computer?

What's the URL that you're using?

Cheers,
Matt

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/

 
New posts
Old posts

Follow Elated