Re^4: Sorry.. Same problem but some progress!
by traincity (Sexton) on Jun 24, 2019 at 08:09 UTC
|
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
| [reply] [d/l] [select] |
|
|
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?
| [reply] |
|
|
No issues with the live site on lynx. I am trying to migrate the perl script, etc. to localhost on my laptop only at this time. That's my only issue right now. At this point with the constant problems I have had I'm not certain I will be successful, but theoretically I should be able to do it. Just not sure if I have the time to finish this project.
| [reply] |
|
|
|
|
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: <%-{-{-{-<
| [reply] [d/l] [select] |
|
|
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.
| [reply] [d/l] [select] |
Re^4: Sorry.. Same problem but some progress!
by traincity (Sexton) on Jun 25, 2019 at 12:47 UTC
|
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
| [reply] [d/l] [select] |
|
|
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
| [reply] [d/l] |
|
|
OK thanks very much for that. Good to know. We did update the unix server 2 years ago with a new perl version and did not run into this problem so possibly this was a recent change?
So I need no communication between this localhost site and the unix site. I'm only going to use this local site to test new code or other things before I implement them on the unix site. I'm hoping to learn more perl this way and learn to understand how my auction site works so that I can improve it.
There are many .pl scripts and I'd rather avoid having to manually change them all. Is there a way I can go to accomplish that?
Thanks again!!
| [reply] |
|
|
|
|
|
|
|
|
|
|
OK I tried using the full path and it I get the exact same error as before:
Wed Jun 26 07:15:20.700622 2019] [cgi:error] [pid 14444:tid 1836] [cli
+ent ::1:56842] AH01215: BEGIN failed--compilation aborted at C:/Apach
+e24/htdocs/choo/cgi-bin/ua/main.pl line 20.\r: C:/Apache24/htdocs/cho
+o/cgi-bin/ua/main.pl
[Wed Jun 26 07:16:13.581363 2019] [cgi:error] [pid 14444:tid 1832] [cl
+ient ::1:56852] End of script output before headers: main.pl
[Wed Jun 26 07:16:13.581363 2019] [cgi:error] [pid 14444:tid 1832] [cl
+ient ::1:56852] 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
[Wed Jun 26 07:16:13.581363 2019] [cgi:error] [pid 14444:tid 1832] [cl
+ient ::1:56852] 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
[Wed Jun 26 07:16:13.581363 2019] [cgi:error] [pid 14444:tid 1832] [cl
+ient ::1:56852] 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
No matter what I change the path to, it comes back in the error as variables/variables.cgi. The error doesn't change. Could this be some sort of a compilation problem? I don't have a clue how to compile script in perl and it looks like that should happen automatically in this case?
Thanks again for any help in resolving this.
One other question. I'm not that familiar with perlmonk. Once you go off the first page in the question section should you just continue to ask questions within that thread or should you start another new topic of the same question to be seen?
2019-07-01 Athanasius added code tags
| [reply] [d/l] |
|
|
|
|
|
|
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!!!
| [reply] |
|
|
"First time the UAA.pm module has been changed since 2003! "
If this is the case you should really review the CVEs I mentioned in a previous reply, as well as have someone review the security of this thing.
| [reply] |