Closed Thread Icon

Topic awaiting preservation: Mojo Mail, Anyone? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12572" title="Pages that link to Topic awaiting preservation: Mojo Mail, Anyone? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Mojo Mail, Anyone? <span class="small">(Page 1 of 1)</span>\

 
Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 01-11-2003 05:30

Anyone here using Mojo Mail? I just upgraded to version 2.7.1, which works great, but I can't seem to get the backup extension to work. (I'll explain the problem in more detail if anyone is familiar with it.)

Anyone...? Anyone...?

genis
Paranoid (IV) Inmate

From: Dallas, TX
Insane since: Aug 2002

posted posted 01-11-2003 17:24

Sorry no.
But that looks impressive, plus it's written in Perl instead of Python(mailman).

I'll remember that.
Thanks.
sorry i'm of no help as usual.

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 01-14-2003 03:15

OK, well, lemme describe what's happening and maybe someone can give me a tip on how to make something happen.

I'm trying to run an extension script that comes with Mojo Mail that's used to back up the list files.

Here's what the script looks like. (I replaced my real account and domain names with "wesaccount" and "wesdomain.")

The only thing I'm not totally sure is set right are the paths to the Perl Libraries. However, I don't get any errors when running the script that it can't find something, so I think they're right. If I set them to something false, I do get an error. (I'm running on DreamHost, BTW, so if you know better, please tell me.)

I try running the script from a command line and I get nothing no errors, no messages, no backups, nothing. I use either the complete path to the script (/home/wesaccount/wesdomain/cgi-bin/mojo/extensions/mojo_backup.pl) or from that directory, I type ./mojo_backup.pl either way, nothing happens and it returns to the command line.

As I understand it, having my $echo_log set to 1 should at least tell me what's going on.

Anybody have any clues?


Piper
Paranoid (IV) Inmate

From: California
Insane since: Jun 2000

posted posted 01-14-2003 05:26

Hi Wes,

The script should be creating a log file: '/home/wesaccount/mojo_backups/mojo_backup.log'. Is the log being generated? If so, what does the log tell you. If not, check the permissions on the mojo_backups directory. Another thing, try commenting out the use lib qw... code. It's possible that you're using an old library. At a shell prompt type: perl -v and see what version of perl you are using. If it comes back with something like 5.6.1 then you know you are using the wrong lib. Other than that, it's a very well coded script.

~Charlie

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 01-14-2003 09:32

Hi, Piper.

Like I said, I'm getting nothing. Not even the log file (actually, _backup.log). The permissions on the backup directory are correct and the Perl directories I defined exist.

This is why I'm totally lost.

If nobody can think of anything, I'll just have to ask DreamHost to help out, but I'm avoiding that for now because they're busy at the moment cleaning up some major screw-ups on their end.

Piper
Paranoid (IV) Inmate

From: California
Insane since: Jun 2000

posted posted 01-14-2003 16:19

I went through the code again and I still can't see why it wouldn't at least give you some sort of error message. I added some debug print statements to the code: http://www.dev-null.net/mojo_backup.txt . If you want, you can give that a try. That should give you some idea of where it craps out. Good luck!

~Charlie

genis
Paranoid (IV) Inmate

From: Dallas, TX
Insane since: Aug 2002

posted posted 01-14-2003 20:30

umm.... I'm sure you've done this, but just to make sure...

have you chmod'd it to be executable.

i mean, when you ./whatever.pl and it's not executable, it'll just bring you back to the prompt.

soo, just checkin.

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 01-15-2003 01:59

If the script isn't executable, it tells me "permission denied."

I tried your changes, Piper, and I still get nothing. It should at least be giving me some messages when I run it.

This is baffling. I'm going to have to send in a trouble ticket to DreamHost and have them take a look.

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 01-16-2003 01:44

Okay, I got two replies. They may clear things up for you (although I'm going to have to do some fumbling to really get what's going on).

quote:
Please keep in mind that it's outside the scope of our support to debug
scripts we haven't written. That being said, I took a brief look at your script. Here's some output from the perl debugger:

root $perl -d mojo_backup.pl
Loading DB routines from perl5db.pl version 1.0402 Emacs support available.
Enter h or `h h' for help.
Global symbol "$PROGRAM" requires explicit package name at mojo_backup.pl
line 183. Debugged program terminated. Use q to quit or R to restart, use O inhibit_exit to avoid stopping after program termination, h q, h R or h O to get additional info.

I will say that, from the perspective of a perl programmer, having a use
lib line at the top that specifies paths to things that should be in @INC
already seems odd at the very least.

Regardless, there is nothing specific to our setup that would caues the
script to fail. Please see the author(s) for support.



A little friendlier...

quote:
Hi Wesley,
Thanks for writing!

I took a look, and it's not clear what the problem is.

First, I ran your script, and got the same behavior you mentioned (no
output). So, I copied the file to 'mojo_backup_test.pl' and added a
simple print statement to the very top - which also didn't work. Upon
deleting everything _below_ the print statement, though, I was able to
get it to print the line. This would indicate that it's something within
the code, and not with our server installation.

As for the specific problem, though, it's tough to say. Your coder may wish to check for incorrect line-ending characters (sometimes Perl can choke on them, without error), and re-upload the script.

Other than that, traditional debugging techniques such placing print
statements through the code and removing other parts piece by piece until
it works - basically a process of elimination - is your best bet.

I'm sorry we couldn't help further, but if you have any other questions,
please let us know.

Jeff





[This message has been edited by Wes (edited 01-16-2003).]

Piper
Paranoid (IV) Inmate

From: California
Insane since: Jun 2000

posted posted 01-16-2003 04:16

This problem is very odd, Wes. Usually you can get perl to tell you what's screwed up. Try this one: http://www.dev-null.net/mojo_backup.txt I removed all the pod docs and added use CGI::Carp. That *might* give you a (better) error message. I also removed the first use lib ... That will end up pointing you to the wrong libs if perl is upgraded. You might want to toss in a few print statements if you still don't get any output. Let me know what happens.

~Charlie

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 01-16-2003 04:53

Perl Debugger? I am sure there has to be a free one out there somewhere?
http://world.std.com/~aep/ptkdb/ <-- quick search, there might be better, I haven't used any.

If you are not comfortable with using a debugger, I would really sugest you stat putting print statements in your code. When I am doing small things I simply add print "bang 1", print "bang 2", etc to the code, down the flow of exectution. The problem is always somewhere around the last bang. Don't put the bang's in a loop until you know that the loop is your problem. If the loop is your problem most times either the 0th 1st 2nd or (big number)th iteration will be the problem. I normally check 0, 1, 2 and 1000 or 10,000 depending on the size of the input. If you are not getting errors there, well then you have some hefty debugging on your hands. You can place the bangs in your loop to find out exactly where the errors are occucing, make sure you use increment your bang counter through the loop so you can know exactly when it is happening.

I am sorry to not offer more concrete advice. I just don't have the time to look into the code, which if Piper has looked at it and sees nothing, I know it would take me more than the limited time I have to isolate the problem.

Good luck,

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 01-16-2003 14:13

Thanks, Piper. I'll give this a shot when I get home.

Lost me there, WarMage. I'm basically an idiot when it comes to this stuff. I can install a script and give it the variables it needs, and even sometimes figure out enough to customize some output, but if it isn't working right, I'm lost. Guess it mostly has to do with the fact that I don't know Perl.

I'll mess with it a little more, then head over to the Mojo Mail forum and see if the author will respond.

Thanks, all. I'll let you know if anything pans out.

« BackwardsOnwards »

Show Forum Drop Down Menu