Perl and Vista

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Perl and Vista

Postby locpicker » 03. May 2009 02:47

I am using Vista and I am having trouble with Perl. What is the correct address to use to go to Perl?

I have tried using the Perl page from the control panel but none of the links work. I get server errors for them.

Any ideas?

I am assuming Perl programs go into the cgi-bin folder like on a normal server?

I also would like to know where I need to put my websites and things to use on the server. Does it matter?

Is there an interface you can use like Cpanel for this server?
locpicker
 
Posts: 2
Joined: 03. May 2009 02:40

Re: Perl and Vista

Postby Sharley » 03. May 2009 07:49

locpicker wrote:I am using Vista and I am having trouble with Perl. What is the correct address to use to go to Perl?
Make sure you are logged in as an Administrator or a Super Administrator and that you have UAC disabled.

What version of XAMPP have you installed?
Did you install the Perl Addon for that version of XAMPP?

In a default installation of XAMPP 1.7.1 these scripts, found in the xampp\cgi-bin folder, are included.
http://localhost/cgi-bin/cgi.cgi
http://localhost/cgi-bin/perltest.cgi
http://localhost/cgi-bin/printenv.pl

The shebang (first line of a cgi script) in a default XAMPP installation is:
#!"C:\xampp\perl\bin\perl.exe"
Open any of the above *.cgi scripts in your text editor to see this shebang.

locpicker wrote:I have tried using the Perl page from the control panel but none of the links work. I get server errors for them.
What control panel are you referring to?
What links?
Server errors are best investigated using the xampp\apache\logs\error.log file.

locpicker wrote:I am assuming Perl programs go into the cgi-bin folder like on a normal server?
Apache in XAMPP is a normal server, so yes you can put cgi scripts in the xampp\cgi-bin folder and run them, but also the way that XAMPP's Apache is configured in the httpd.conf file, you can also put your cgi scripts in the xampp\htdocs folder (DocumentRoot) and it's sub folders, if you prefer.

locpicker wrote:I also would like to know where I need to put my websites and things to use on the server. Does it matter?
Yes it absolutely matters as Apache needs to know where to look for your web site files when it gets a request from a browser for the pages to send back:
http://www.apachefriends.org/en/xampp-windows.html#1168
A good idea is to read the whole of the above web page and this FAQ:
http://www.apachefriends.org/en/faq-xampp-windows.html

In the Perl Addon section in the XAMPP for Windows Home Page above there is a readme file and a file that contains all the included perl modules that is also worth a read:
http://www.apachefriends.org/winxampp/r ... n-perl.txt

Just an aside here, unless your scripts specifically require mod_perl then it is best not to install this feature when you install the perl addon - if at some later stage you find your scripts require mod-perl then you would simply run setup_xampp.bat file again and select to install mod-perl.

locpicker wrote:Is there an interface you can use like Cpanel for this server?
Google would be your best bet for finding one of those for the Apache server in XAMPP - AFAIK, there are one or two scripts around the net that are used in hosting situations - the simple XAMPP Control Panel (xampp\xampp-control.exe) is usually used by most to control the XAMPP components.

The Apache documentation can be found here:
http://httpd.apache.org/docs/2.2/

This link to an Apache cgi tutorial may help:
http://httpd.apache.org/docs/trunk/howt ... oubleshoot

There is a plethora of information about cgi that can be found using Google and of course an advanced search of this XAMPP for Windows forum may also provide some relevant information.


BTW you can open a command console in the xampp\perl\bin folder (cd to this folder) and run perl.exe -help for a list of switches that can be used, you are also able to run a cgi script from a command console.

I hope this post will be of help to clear the fog a little. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Perl and Vista

Postby locpicker » 03. May 2009 23:44

Ok. I can now use Perl thanks to all of this information.

It turns out that I did not have the administrator box checked for runnning the program. That fixed my problem with the links not working on the Apache page.

I also had a programming error that I did not know about. I did not have a header and it was giving me an error.

I will look for my other solutions later. I really needed the Perl fixed because I am taking a small course for Perl.

Thanks for the help. Will make a donation to the project when I actually get some money ahead again.
locpicker
 
Posts: 2
Joined: 03. May 2009 02:40


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 57 guests