Perl script won't resolve in XAMPP 1.7.3

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

Perl script won't resolve in XAMPP 1.7.3

Postby GrahamS » 29. October 2012 19:03

I am developing a Perl script which takes a text area input, processes it, and prints output to screen. I was developing it with little more than one or two lines of input and it resolved fine in XAMPP 1.7.3's Perl. However, when I tested it with a much larger bunch if text, it failed to resolve in XAMPP. I have used both Warnings and Strict and the script resolves fine in the Perl debugger when run with a good chunk of text input. Also, when run over over the web using my ISP's Perl and a good chunk of text input, it resolves fine too. So the problem would appear to be XAMPP 1.7.3's Perl. Any ideas what it is and how I can correct it?
GrahamS
 
Posts: 4
Joined: 28. October 2012 17:41
Operating System: Windows WP

Re: Perl script won't resolve in XAMPP 1.7.3

Postby JonB » 30. October 2012 00:18

what exactly do you mean by 'resolve'?

"prints output"?

Is of the output, a graphic? or transformed text

You probably better explain what your script does more clearly -

Good Luck
:)

ytsfr
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Perl script won't resolve in XAMPP 1.7.3

Postby GrahamS » 31. October 2012 12:38

The script takes text input, processes it and prints output in the form of both transformed text and .png graphic images (lots of them). It's music related and each image is either a musical note in space, a note on a line, or a line only, coupled with 'b' (flat) and '#' (sharp) symbols where necessary. As things stand the base images are all currently size 222 x 97px high, but displayed at 'height="8px"' (which is a bit silly I must admit and I should and will reduce the size of the base images).

'Resolve' (to me) means that the script runs from start to finish and completes. As I say, the script resolves fine over the web, i.e. produces the expected output whatever the input. Not resolving (which is what is happening under XAMPP 1.7.3) means that the script fails to produce output and hangs.
GrahamS
 
Posts: 4
Joined: 28. October 2012 17:41
Operating System: Windows WP

Re: Perl script won't resolve in XAMPP 1.7.3

Postby GrahamS » 31. October 2012 13:39

I've now reduced all the images to 37 x 16px high but it makes no difference - the script still hangs in XAMPP 1.7.3 although it fully resolves over the web.

Another point, a lot of the output is displayed in HTML tables, with the note images being displayed in table cells.

Is it likely that if I upgrade XAMPP it will cure the problem (and if so why?). Or is it possibly to upgrade the Perl in XAMPP 1.7.3 (or is that a silly question?).

I just need a point in the right direction.
GrahamS
 
Posts: 4
Joined: 28. October 2012 17:41
Operating System: Windows WP

Re: Perl script won't resolve in XAMPP 1.7.3

Postby JonB » 31. October 2012 15:36

A. Just for future reference - the term is 'execute' or 'run' - for programs or webapps.
For programming/webapps - 'resolve' has an entirely different meaning -- you 'resolve' a DNS entry or URL - it is specifically the process of turning a URI/URL into an IPv4 or IPv6 address.

B. The problem is likely a missing or 'broken' Perl Mod. Some Perl mods are not well maintained, and some require re-compilation to run on Windows. (guessing that 'over the web' means "the script executes properly on a remote Linux/Unix server".

C. Have you run http://localhost/xampp/perlinfo.pl ???

It will give you a run-down of all the installed Perl Mods.

I think CPAN and/or ppm.bat run right on 1.7.3.

D. Provided you do not want to use mod_perl, you can install ActiveStates or Strawberry Perl and just change the shebang line. The scripts will probably still need to go in cgi-bin for the ScriptAlias.

E. If you don't know much about Perl, it is very difficult to debug. Do you know what errors are occuring?

Here's a tip:
http://www.yabbforum.com/codex/YaBB.pl?num=1217258635

If you are not getting ISE 500's look at the second suggestion.

F. Have you contacted the author of the script (presuming it is not yourself).

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Perl script won't resolve in XAMPP 1.7.3

Postby GrahamS » 01. November 2012 17:59

I commented out the various Perl modules (not mods - mod Perl is something else again) and, hey presto, 'Warnings' was the fly in the ointment. Ironic really, a module that is intended to help your code execute (not resolve - point taken) is actually preventing it from executing. I'll have a go at upgrading it sometime, but for now simply not calling Warnings will do.

As for the script itself, its a 1500 line program I've written myself and as, I said previously, no errors are occurring and it all executes fine via the Perl debugger, via a remote Linux/Unix server, and now via XAMPP 1.7.3. So many thanks and I'm a happy bunny.
GrahamS
 
Posts: 4
Joined: 28. October 2012 17:41
Operating System: Windows WP


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 160 guests