Perl Hello world CGI in xampp server

(Last Updated On: [post_updated])

Download Xampp from

http://www.apachefriends.org/en/xampp-windows.html

Step 1: Create a file named javadomain.cgi and paste the below code,

#!"C:\xampp\perl\bin\perl.exe"
print "Content-type: text/html\n\n";
print "<H1>Hello World</H1>\n";

#!”C:\xampp\perl\bin\perl.exe” is the location of perl.exe.

Step 2: Save this file in C:\xampp\htdocs

Step 3: Open the xampp control panel. which is in c:\xampp.

Step 4: Start the servers,

 

Step 5: Check whether the server is on and working fine by typing localhost in the browsers,

if you didn’t get the above window, then once again open the xampp control panel and restart the server and try again.

Step 6: Type localhost/javadomain.cgi in the browser to get the perl cgi output.

 

Thanks for reading this post…………!!!

1,186 total views, 0 views today

10 comments

  • S.Sakthivel

    Hi Naveen I tried this with Apache 2 but I didnt get the expected result. Is there any specific reason for that?..

    • Naveen

      If you are using apache you have to configure httpd.conf file like below.
      C:\xampp\apache\conf\httpd.conf
      and search for “Options Indexes FollowSymLinks” (about line 190) when you find it add “ExecCGI” to the end so it looks like “Options Indexes FollowSymLinks ExecCGI”

  • Hοwdy! I κnοω thiѕ iѕ kіnԁa off topic but I
    ωas wоndегing if you knеw wheге I could locate a captcha plugin foг mу cοmment foгm?
    I’m using the same blog platform as yours and I’m having difficultу
    finding one? Тhanκѕ а lоt!

    • Naveen

      Hi welcome to javadomain.in, contact form 7 is by default come with captcha. but we have to install it, it will not come by default.
      go to plugin -> add new -> search for contact form 7 then you can use it for your blog.
      Thanks.

  • Viele denken fast immer nur an das Eine.

  • I’ve been browsing online more than three hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. Personally, if all webmasters and bloggers made good content as you did, the internet will be much more useful than ever before.|
    I could not resist commenting. Well written!|

  • S.Sakthivel

    Its working… thanks… It will be better if you create a direcrtory named cgi-bin inside htdocs and put your .cgi file inside that ,open browser and then type
    http://localhost/cgi-bin/new1.cgi.
    now it will work perfectly.

  • Thanks for sharing superb informations. Your web site is very cool. I am impressed by the details that you¡¦ve on this site. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for more articles. You, my friend, ROCK! I found just the information I already searched everywhere and just couldn’t come across. What a great site.

  • Pingback: Rena Shack

  • Sridhar Kesari

    Thank You Very Much, we missed to start tomcat, after going through your blog, i was success in executing my cgi script.

Leave a Reply

Your email address will not be published. Required fields are marked *