Can't get Perl to execute from Browser or Command Shell

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

Can't get Perl to execute from Browser or Command Shell

Postby CPcoder » 15. March 2006 05:03

I have the newest version of XAMPP for Windows and the newest Perl XAMPP Add-On. My test web documents are in a folder below the "htdocs" folder. I ran setup_xampp.bat as directed, twice and chose to use mod_perl when the choice came up on the 2nd run. I restarted Apache.

I can't get a simple "hiThere.pl" script to work from the browser nor the Windows Command Shell. For my shebang line, I have
Code: Select all
#!C:\xampp\perl\bin\perl.exe
(I've also tried perl5.8.7.exe) In the browser, it just shows all my code. From the Command Shell, it just opens the file in notepad!

Also, when I open the Command Shell, my working directory is C:\ Program Files\Windows Resource Kits\Tools. Is that the problem? I don't know how to change working directories in Windows. Besides, I am typing the FULL PATH to the script when I try to run it from the Command Shell.

Is there more setup to do that the ApacheFriends.org website does not tell you? Am I incorrect to try to access my hiThere.pl script directly in the browser? (For example, "http://localhost/mysite/hiThere.pl".) This is not a CGI script, I am simply trying to run a basic Perl script to test for proper installation.

I've read other similar posts here but it only has me more confused! Also, on perl.apache.org, there seem to be various ways to configure mod_perl. I don't know if I should do any of this at all. The ReadMe file from XAMPP says you only need to unzip to your xampp directory, run setup_xampp.bat twice, and go!

What is missing from the XAMPP docs?
WinXP Home SP2
XAMPP 1.5.1 in top-level directory
Unzipped directly from .zip file
no other severs running
CPcoder
 
Posts: 30
Joined: 16. February 2006 08:44

Postby WorldDrknss » 23. March 2006 11:03

change this
#!C:\xampp\perl\bin\perl.exe
to
#!C:/xampp/perl/bin/perl
or
#!/xampp/perl/bin/perl

http://xampptutorials.com
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 157 guests