in reply to Re: Sorry.. Same problem but some progress!
in thread Sorry.. Same problem but some progress!

Sorry... This has been an on-going problem for the past week. There are many threads below. I started a new one because I was getting confused. Very frustrated right now.
  • Comment on Re^2: Sorry.. Same problem but some progress!

Replies are listed 'Best First'.
Re^3: Sorry.. Same problem but some progress!
by haukex (Archbishop) on Jun 23, 2019 at 22:35 UTC
    Sorry... This has been an on-going problem for the past week. There are many threads below. I started a new one because I was getting confused. Very frustrated right now.

    I fully second marto's post - I think we've all been in these frustrating situations where nothing seems to work and you spend some time banging your head against the wall :-) Taking a step back can be very helpful. I went through your posts so far and gather that you are on Windows 10, using Strawberry Perl, Apache, mod_perl, and Image::Magick. If you could take the time to gather the following information, it'd be helpful to us in helping you:

    • What version of Perl (perl -v)? What version of Apache? What version of mod_perl, and since there seems to be multiple places to get binaries, where did you get it? Are you using any database server, and if so, which one?
    • Do you have multiple versions of any of the above installed on this machine?
    • Could you share the full output of echo %PATH%, echo %PERL5LIB%, and perl -V (that's a capital V)?
    • Is this a software you wrote yourself and are migrating to a newer version of Windows/Perl/Apache? If so, what was the previous set up? (Versions of Windows, Perl, Apache, mod_perl, etc., and any paths) Or, is this a third-party software you're trying to get going, and if so, can you share what it is?
    • What other modules is your Perl code using, and have you tried to install those?

    As for ImageMagick, although I haven't used it in a while, I remember that installing it from source on Windows was a gigantic pain, and so getting one of the precompiled versions was usually much better. The ImageMagick Windows installer actually includes PerlMagick for ActiveState, but I haven't yet tried that on Strawberry Perl. You definitely need to install ImageMagick first, and did you try syphilis's advice from here?

    If you have trouble, remember the advice in How do I post a question effectively? and SSCCE: short, self-contained pieces of information are usually best. If you're trying things on the command line, copy & paste that into <code> tags. If you're trying things in a GUI, describe exactly what you're doing and what messages you're getting, and so on. Consider what you'd have to describe to someone else so that they can reproduce the problem on their end.

      Hi... Thanks very much for your reply. Glad to hear you comment that getting image::Magick is a pain to install. It is!!! To answer your questions, hopefully it is OK in the text:

      What version of Perl (perl -v)? This is perl 5, version 30, subversion 0 (v5.30.0) built for MSWin32-x64-multi-thread

      What version of Apache? Apache HTTP Server 2.4 Limited OpenSSL Distribution. (I have been running this for quite a while)

      What version of mod_perl, and since there seems to be multiple places to get binaries, where did you get it? mod_perl-2.0.10/ I can't remember specifically where I downloaded this from, but it was compressed. I had to manually zip it open which may not have been proper.

      Are you using any database server, and if so, which one? mysql workbench 8.0 which I am using localhost on this laptop.

      Do you have multiple versions of any of the above installed on this machine? No, not that I'm aware of.

      Could you share the full output of echo %PATH%, echo %PERL5LIB%, and perl -V (that's a capital V)?

      Is this a software you wrote yourself and are migrating to a newer version of Windows/Perl/Apache? If so, what was the previous set up? (Versions of Windows, Perl, Apache, mod_perl, etc., and any paths) Or, is this a third-party software you're trying to get going, and if so, can you share what it is? This is software that I purchased probably around 2001. Old perl, but it runs fine on a lynx server. An example of this software can be found at https://www.choochooauctions.com. It is called ultimate auction. I've been nursing it for years! I am just trying to get it to run localhost on my local machine.

      What other modules is your Perl code using, and have you tried to install those? I'm not that familiar with modules. My first error when I first tried this was that UltimateAuction.pm was missing. I found that modual on lynx and was able to ftp it back and put it in perl/site/lib in strawberry and that error went away. I'm not sure what other modules are intact right now just because I am not that familiar with them. I believe that most of my problem seems to be related to modules though.

      Appreciate any help!

      2019-07-01 Athanasius added code tags and linkified link

        http://www.ultimateauction.net/ currently displays a "Hello World", a quick look back via the way back machine shows few changes. A cautionary note, security wise there are some CVEs which should warrant some investigation. It's closed source and there seems to be no documentation detailing dependencies that I can find. Perhaps the suggestions I made earlier would help make that part of the task easier.

        Another way to look at is that your $300 investment in 2001 seems to have served you well until now, perhaps it's worth while looking at alternatives?

        Could you share the full output of ... perl -V (that's a capital V)?
        C:\Users\USER>perl -V Summary of my perl5 ... (dense wadge of text) ... C:/Strawberry/perl/lib

        Your answers to haukex's questions are laudably detailed, but were you able to read this section of your reply when you previewed it? Code, data and input/output should be enclosed in  <code> ... </code> tags. Please see Writeup Formatting Tips, Markup in the Monastery and How do I change/delete my post? Please, please help us to help you.

        Update: Please see this recent node for an example of similar output usefully presented.  <code> tags to the rescue!


        Give a man a fish:  <%-{-{-{-<

        Thank you very much for the information! If you could edit your node to put the command-line output inside <code> tags, that would help a lot with readability. I don't think you included the output of the echo %PATH% and echo %PERL5LIB% commands?

        The next step would be to try and show us the steps you're taking, for example what cpan commands you're using on the command line that aren't working and exactly what the output is. One-liners like the one I showed here are pretty useful diagnostic tools.

      As a reminder I am trying to run a perl program on my local computer (localhost). It is up and running on unix well.

      I have had several problems involving missing modules which so far seem to be cleaned up. The last one was Image::Magick.

      So now I have a new problem. (I am a novice at perl so please excuse my ignorance in this description of what is happening.)

      I am now getting this error in apache error logs:

      [Mon Jun 24 22:30:17.799951 2019] [cgi:error] [pid 18036:tid 1832] [cl +ient ::1:53447] End of script output before headers: main.pl [Mon Jun 24 22:30:17.801947 2019] [cgi:error] [pid 18036:tid 1832] [cl +ient ::1:53447] AH01215: Can't locate variables/variables.cgi in @INC + (@INC contains: C:/strawberry/perl/site/lib/MSWin32-x64-multi-thread + C:/strawberry/perl/site/lib C:/strawberry/perl/vendor/lib C:/strawbe +rry/perl/lib) at C:/strawberry/perl/site/lib/UltimateAuction.pm line +44.\r: C:/Apache24/htdocs/choo/cgi-bin/ua/main.pl [Mon Jun 24 22:30:17.801947 2019] [cgi:error] [pid 18036:tid 1832] [cl +ient ::1:53447] AH01215: Compilation failed in require at C:/Apache24 +/htdocs/choo/cgi-bin/ua/main.pl line 20.\r: C:/Apache24/htdocs/choo/c +gi-bin/ua/main.pl [Mon Jun 24 22:30:17.803027 2019] [cgi:error] [pid 18036:tid 1832] [cl +ient ::1:53447] AH01215: BEGIN failed--compilation aborted at C:/Apac +he24/htdocs/choo/cgi-bin/ua/main.pl line 20.\r: C:/Apache24/htdocs/ch +oo/cgi-bin/ua/main.pl
      I know that path variables/variables.cgi is valid as the structure of the directories is the same as what is on unix.

      This is what I think this is referring to, but I could be wrong This is located in the main.pl script: require "variables/variables.cgi";

      I did google this type of error and although I didn't understand it, it could be related to a permission issue??

      I'm thinking it is also possible that it is related to my running perl (on strawberry) in a different directory position than on the lynx. But other than those possibilities, I have no clue. Hopefully this will be obvious to someone with experience in perl.

      Please let me know if you need more info. Thanks very much!

      2019-07-01 Athanasius added code tags

        Can't locate variables/variables.cgi in @INC (@INC contains: C:/strawberry/perl/site/lib/MSWin32-x64-multi-thread C:/strawberry/perl/site/lib C:/strawberry/perl/vendor/lib C:/strawberry/perl/lib)

        Perl 5.26 removed having the current working directory in @INC as a security measure. Your Linux site works because it has an older perl. The quick fix is to use an absolute path which I guess is

        require 'C:/Apache24/htdocs/choo/cgi-bin/ua/variables/variables.cgi';

        The correct fix depends on how easily portable you want the code between your windows localhost and the Linux site and how many scripts you would need to edit.

        poj
        I have to thank everyone who helped me get through this. I've learned so much and was successful in getting my localhost site up and running well. Today I took an extra step and actually re-did some perl script on my live site. And unbelievably it worked very well. I've had this site now for some 18 years and didn't have a clue how to improve the perl script myself. First time the UAA.pm module has been changed since 2003! Thanks again. I really, really appreciate your help!!!
Re^3: Sorry.. Same problem but some progress!
by marto (Cardinal) on Jun 23, 2019 at 21:03 UTC

    Please, take a step back. We're happy to help, but it gets confusing in such cases. Take a moment to describe the situation, I'd guess you're migrating something to a new instance of Strawberry Perl, and having some issues. Even if it seems like a large frustrating problem, taking the time to describe what is going on can be fruitful. You don't have to post your whole application, however if you are moving something with a list of dependencies then you're going to have to satisfy those. You may want to take a look at Module::ScanDeps, which ships with the program scandeps.pl which you can use to try and determine dependencies.