Hi there,

yesterday I tried a very basic cgi program, which comes with xampp 1.7.1 in cgi-bin directory.
but my browser said:
"You don't have permission to access the requested object. It is either read-protected or not readable by the server."
The perl code is :

#!"C:\xampp\perl\bin\perl.exe"

print "Content-type: text/html\n\n";
print '<html>';
print '<head>';
print '<meta name="author" content="Kay Vogelgesang">';
print '<link href="/xampp/xampp.css" rel="stylesheet" type="text/css">';
print '</head>';
print "<body>&nbsp;<p><h1>GCI with MiniPerl</h1>";
print  "CGI with MiniPerl is ready ...</body></html>";

The file name is "perltest.cgi" and I executed it by typing
"http://localhost/C:/xampp/cgi-bin/perltest.cgi" in my browser.

please help!

regards

I don't know but you could start by finding your httpd.conf file and having a look at this post in case the solution to that person's problem throws light on yours.

so here are the steps:

1. Download " XAMPP" from http://www.apachefriends.org/en/xampp-windows.html ( Do not download XAMPP Add-Ons)

2. After installation look for a folder naming "XAMPP" in C:

3. Create a folder (say "perl" in which u will place all ur .cgi files) in htdocs of it.

4. Now create ur ".cgi" file and give the path to perl (like #!"C:\xampp\perl\bin\perl.exe" in shebang line of ur program)

5. Save ur file with ".cgi" extension in previously created "perl" folder.

6. Now open ur web browser.

7. Type "localhost/"

8. If Apache is running on ur system then it shows "It's working!". If it's not then go to the shortcut on ur desktop and just double click on xampp icon. This will start ur all services associated with xampp.

9. If ur apache is in running state then again open browser and type "localhost/perl/filename.cgi", press enter.

10. DANCE AROUND THE FLOOR.... WOOOHOOO!!! Finally u somehow managed to run a cgi script. :D

commented: Congratulations and thanks for posting the solution. +8

how will it work for fedora? Plz help

It works! just make sure you set your shebang line correctly. Make the reference in your html file..for eg.. in the form >> action ="yourcgifilw.cgi" and you are good to go! can u imagine the stress i went through but after seeing this...thanks really! whoosh

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.