Previous Thread
Next Thread
Print Thread
Hop To
#22306 04/01/2002 1:21 AM
Anonymous
Unregistered
Anonymous
Unregistered
I am attempting to get the subscriptions.pl script to run on my system.

I am familiar with setting up cron jobs. My problem is that I cannot get the script to run in the first place.

Here's what I did:

· Installed the appropriate Perl Modules as per instructions
· Edited w3tvars.pm as instructed
· Edited the unshift lines in subscriptions.pl and doexpire.pl

When I issue ./subscriptions.pl, here's the output:

</font><blockquote><font size="1" face="">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">ksh: ./subscriptions.pl: No such file or directory[/code]</blockquote><font size="" face="">I then alter the header to #!/usr/bin/perl -w, and this is the output:

</font><blockquote><font size="1" face="">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">"my" variable $query masks earlier declaration in same scope at ./subscriptions.pl line 63.
"my" variable $query masks earlier declaration in same scope at ./subscriptions.pl line 110.
Use of uninitialized value in multiplication (*) at /var/www/htdocs/ubbthreads/cron/w3t.pm line 65.
Use of uninitialized value in string eq at ./subscriptions.pl line 91.
Use of uninitialized value in substitution (s///) at /var/www/htdocs/ubbthreads/cron/Mailer.pm line 291.
Use of uninitialized value in substitution (s///) at /var/www/htdocs/ubbthreads/cron/Mailer.pm line 292.
Use of uninitialized value in substitution (s///) at /var/www/htdocs/ubbthreads/cron/Mailer.pm line 293.
Use of uninitialized value in substitution (s///) at /var/www/htdocs/ubbthreads/cron/Mailer.pm line 291.
Use of uninitialized value in substitution (s///) at /var/www/htdocs/ubbthreads/cron/Mailer.pm line 292.
Use of uninitialized value in substitution (s///) at /var/www/htdocs/ubbthreads/cron/Mailer.pm line 293.
Use of uninitialized value in substitution (s///) at /var/www/htdocs/ubbthreads/cron/Mailer.pm line 291.
Use of uninitialized value in substitution (s///) at /var/www/htdocs/ubbthreads/cron/Mailer.pm line 292.
Use of uninitialized value in substitution (s///) at /var/www/htdocs/ubbthreads/cron/Mailer.pm line 293.[/code]</blockquote><font size="" face="">and so on. Any ideas? I'm no Perl monk.

FWIW, I'm running OpenBSD 3.0, Perl 5.6.1.

#22307 04/01/2002 3:10 PM
Anonymous
Unregistered
Anonymous
Unregistered
Here is just about everything that we know about CRON on this product.

https://www.ubbcentral.com/resources/cron.html

Read over that and let me know here if you have more questions.

Regards,

Brett Harris
Infopop Corporation

#22308 04/01/2002 10:13 PM
Anonymous
Unregistered
Anonymous
Unregistered
Thank you for taking the time to respond.

I don't mean to sound snippy, but I do intend to be brusquely honest.

Maybe next time you could /read/ a post before responding to it... I know how to 'man 5 crontab'. And I believe I made this perfectly clear. To quote myself:

</font><blockquote><font size="1" face="">quote:</font><hr /><font size="" face="">I am familiar with setting up cron jobs. My problem is that I cannot get the script to run in the first place.
</font><hr /></blockquote><font size="" face="">Again, I usually avoid curtness at all costs, as I find it to be a distasteful quality. I certainly don't troll, or start flamefests. However, I must call you out on this one - I am aware of the "it's just a clueless newbie - send him off to RTFM and he'll go away" tactic. I've pulled that one myself. <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" /> But never when it's blatantly obvious from the CONTEXT of the post in question that this isn't an applicable strategy, and that the problem isn't one of not properly reading the documentation.

I even illustrated that I DID read the documentation in my original post!

</font><blockquote><font size="1" face="">quote:</font><hr /><font size="" face="">
Here's what I did:

· Installed the appropriate Perl Modules as per instructions
· Edited w3tvars.pm as instructed
· Edited the unshift lines in subscriptions.pl and doexpire.pl
</font><hr /></blockquote><font size="" face="">tsk tsk. <img border="0" title="" alt="[Wink]" src="images/icons/wink.gif" />

I hope that didn't come out too jerkified.

#22309 04/03/2002 11:08 AM
Anonymous
Unregistered
Anonymous
Unregistered
Thank you - You indicated that you read the documentation in your post - however, you did not indicate where or how old that documentation was.

A condensed version of that documentation exists as comments in older versions of the scripts - so I pointed you to the most recent version of it.

If you would please be patient I would greatly appreciate it - CRON tasks vary from host to host - having set up only a couple of them and having to esclate them to the hosts own 'wonks' who promptly fixed them by setting them up in a way completley opposite the documentation on the website - I can say that they are sticky at best.

So - if you could let me know who your host is, and make me aware of any documentation that they may have, that would help me to better understand the error message that you have provided to me.

Those lines look like this:

$address =~ s/^\s+//g; # Remove leading spaces.
$address =~ s/\s+$//g; # Remove trailing spaces.
$address =~ s/,,/,/g; # Remove double commas.
return $address;

and they die 3 times so I presume that 3 people tried to subscribe to the posts in that forum and it failed all 3.

What version of Perl are you running on that server? Are you certain that your Perl modules were moved up in ASCII and not Binary? What FTP client are you using?

Thank you.

#22310 04/04/2002 4:29 AM
Anonymous
Unregistered
Anonymous
Unregistered
Give this staff here credit for timely accurate responses.

As a board admin... the emails and PMs I get on a daily basis can be too much. sometimes you miss something in an attempt to answer everyone.

In general, Rick and everyone here does an outstanding job. <img border="0" title="" alt="[Big Grin]" src="images/icons/grin.gif" />

#22311 04/03/2002 5:19 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Those warnings you are seeing is because of the -w switch. That basically prints out general info warnings, but the scripts will behave properly. If you pull the -w out of the #!/usr/bin/perl line it should work as planned.

-------------------
Rick Baker
UBBThreads developer

#22312 04/04/2002 2:17 PM
Anonymous
Unregistered
Anonymous
Unregistered
Again, I apologise for my rudeness. FWIW, I had just finished a massive project - transferring ubb 5 to UNIX (and getting it to run), upgrading ubb 5 to ubb 6 (40,000+ posts), and then immediately upgrading ubb 6 to threads (5 wouldn't upgrade to threads directly). I was tired and cranky - it was quite a chore to pull off! It does work, however, sans this one thing, so all in all things are alright. <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />

</font><blockquote><font size="1" face="">quote:</font><hr /><font size="" face="">So - if you could let me know who your host is, and make me aware of any documentation that they may have, that would help me to better understand the error message that you have provided to me.</font><hr /></blockquote><font size="" face="">If I understand the question correctly, then the answer is simple - I am the host. It's my machine, on a leased connection.

Only available documentation is 'man cron'. <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />

</font><blockquote><font size="1" face="">quote:</font><hr /><font size="" face="">What version of Perl are you running on that server? Are you certain that your Perl modules were moved up in ASCII and not Binary? What FTP client are you using?</font><hr /></blockquote><font size="" face="">Perl 5.6.1
OpenBSD 3.0
NcFTP 3.0.3
Qmail 1.0.3 (tried this w/ Postfix as well - error is exactly the same)
Perl modules built from ports tree (except Data-Dump, which was installed manually)

Thank you again.

#22313 04/04/2002 7:34 PM
Anonymous
Unregistered
Anonymous
Unregistered
try this

user@machine shell: perl subscriptions.pl


no -w. Should run just fine.

Honor The Victims

#22314 04/04/2002 11:00 PM
Anonymous
Unregistered
Anonymous
Unregistered
</font><blockquote><font size="1" face="">quote:</font><hr /><font size="" face="">
try this

user@machine shell: perl subscriptions.pl
</font><hr /></blockquote><font size="" face="">Interesting. 'perl subscriptions.pl' works fine. './subscriptions.pl' does not. I don't get it. The perl pathname in the header is correct.

Oh, well. I'll just put 'perl /foo/bar/subscriptions.pl' in cron and be done with it!

Thank you.

#22315 04/06/2002 3:00 AM
Anonymous
Unregistered
Anonymous
Unregistered
Ok, here's the answer!

subscriptions.pl had DOS line termination characters on each line. ksh could not understand the header #!/usr/bin/perl because it saw it as #!/usr/bin/perl^M - thus, the "no such file or directory" message when attempting to execute the script directly. The perl interpreter itself had no problem with these DOS terminators, so "perl subscriptions.pl" worked fine.

Oddly enough, so did the header #!/usr/bin/perl -w (really #!/usr/bin/perl -w^M). I guess moving that ^M over prevented the shell from trying to call the literal program "perl^M", which, of course, doesn't exist! Goofy.

I use vim 6.0 as my default text editor, and vim also does not show these DOS terminators, therefore my puzzlement as to why it didn't work! So, I opened up subscriptions.pl in plain ol' OpenBSD default vi, and voila! - a pretty little ^M at the end of every line.

Run dos2unix, strip out the ^Ms, and everything works as designed.

Nutty, eh? <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />

Thanks, guys, for neat software that can really take a pounding! <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />

#22316 04/06/2002 11:17 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
ksh??

ksh???

(bows)

wow, you use ksh???

I hadn't noticed that above.

What's odd about this is that Rick codes with vi though he uses bash if that makes any difference.

hmm, I'll have to go look.

Honor The Victims

#22317 04/08/2002 1:03 PM
Anonymous
Unregistered
Anonymous
Unregistered
</font><blockquote><font size="1" face="">quote:</font><hr /><font size="" face="">wow, you use ksh???</font><hr /></blockquote><font size="" face="">Well, not out of some elitist preference, mind you. <img border="0" title="" alt="[Wink]" src="images/icons/wink.gif" />

Actually, as any joeuser I use good ol' bash, tab completion and all. <img border="0" title="" alt="[Cool]" src="images/icons/cool.gif" /> However, OpenBSD sets up ksh as default for root, and since I put /usr/local on its own partition, I thought it wise to only use a shell for root that is accessible directly from /bin (in case of emergency repair). OpenBSD ports puts bash, zsh, and friends in /usr/local/bin.

So, that's the story, and I'm stickin' to it. Thanks again!


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
0 members (), 686 guests, and 131 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)