View Full Version : Gmail Downloader


WeLoveWriters
01-08-2005, 04:36 AM
There is 2 versions of gmail.cgi in the zip download...

I haven't been able to get it to work so far.. with either version and thought I would ask which version was best, or of it matters?


I had my host support install these modules

HTTP::Cookies
LWP::UserAgent
HTTP::Request


And am still getting this message:
unable to login 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket"

Any chance there is a syntax problem in the script my server doesnt like?

hosting it here http://www.welovewriters.com/cgi-bin/files/gmail.cgi

Jafo
01-08-2005, 03:08 PM
Your right, there are two, there should only be one and it is the one that unzips to no specific directory. I have fixed the current distro and re-uploaded it.

Sounds like a problem with your LWP module.

WeLoveWriters
01-08-2005, 05:21 PM
Thanks for the fast reply Jafo!

The modules were freshly installed from cpan so not sure where to start looking for a problem there :\

Before I give up... I might try and explain what I've done in case you or anyone else spots something obvious I've missed...

Right now I'm guessing it is breaking down about here..
my $obj = WWW::GMail->new(
username => $username,
password => $password,
);


mainly because the error says unable to login 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket" and that appears to be trying to create a new object at about the same point its trying to login to gmail.

I hope this doesn't sound exceptionally dumb... but am I supposed to have installed the WWW::GMail module in a similar manner as the LWP::UserAgent and other 2 modules where installed?


Here's what I did do.

Copied everything to www.domain.com/cgi-bin/files/ (not to a dir named gmail as suggested)

set this stuff in gmail.cgi
$basepath = "/unx/path/domain.com/cgi-bin/files";
$username = "blahblah";
$password = "blahblah";
$label = "LabelName";

Changed permissions of gmail.cgi to 755 and /tmp folder to 777

Logged into my gmail account and set a label "LabelName" and a rule to set that label for incoming messages with the right subject

Emailled myself the gmail_downloader.zip file, which gmail labelled correctly.


When i went to gmail.cgi in my browser.. I got an error message something like this
Software error:
Can't locate IO/Wrap.pm in @INC (@INC contains: /nix/path/domain/cgi-bin/files /usr/lib/perl5/etc etc .) at /nix/path/domain/cgi-bin/files/MIME/Parser.pm line 134.
BEGIN failed--compilation aborted at /nix/path/domain/cgi-bin/files/MIME/Parser.pm line 134.
Compilation failed in require at /nix/path/domain/cgi-bin/files/gmail.cgi line 34.
BEGIN failed--compilation aborted at /nix/path/domain/cgi-bin/files/gmail.cgi line 34.

For help, please send mail to the webmaster (), giving this error message and the time and date of the error.


I asked my host to install the 3 modules you refer to in the setup instructions;
HTTP::Cookies
LWP::UserAgent
HTTP::Request

That's when the current error message started occurring..

I tried uncommenting this line in gmail.cgi and setting it
#$the_main_path = "/unx/path/domain.com/cgi-bin/files";

I have tried re-uploading everything several times.

I have tried it on a second server.

If anyone comes up with a brainstorm about what else I might have wrong... please shoot me an email at webmaster at welovewriters com ;-)

Regards,

Brad

Jafo
01-10-2005, 01:34 AM
Hmm, I always thought the IO module what standard with Perl, but perhaps your host is running an older version? Anyway, you will need to install IO and probably IO::Wrap.

WeLoveWriters
01-10-2005, 01:22 PM
Thanks again Jafo... but host says all normal IO modules are already installed.

IO
IO::AtomicFile
IO::Dir
IO::File
IO::Handle
IO::InnerFile
IO::Lines
IO::Pipe
IO::Poll
IO::Scalar
IO::ScalarArray
IO::Seekable
IO::Select
IO::Socket
IO::Socket::INET
IO::Socket::UNIX
IO::Stringy
IO::Wrap
IO::WrapTie


Server is running Perl version 5.008005 with freebsd

Jafo
01-10-2005, 01:25 PM
Well, then perhaps you should show them this error you are getting:

Can't locate IO/Wrap.pm in @INC (@INC contains: /nix/path/domain/cgi-bin/files /usr/lib/perl5/etc etc .) at /nix/path/domain/cgi-bin/files/MIME/Parser.pm line 134.

WeLoveWriters
01-10-2005, 06:31 PM
Well, then perhaps you should show them this error you are getting:

Can't locate IO/Wrap.pm in @INC (@INC contains: /nix/path/domain/cgi-bin/files /usr/lib/perl5/etc etc .) at /nix/path/domain/cgi-bin/files/MIME/Parser.pm line 134.

I have shown my tech... My host tech would likely come here and work with you directly if that's what you would like. But I don't expect support on a free script.. so please dont feel obliged to help further. I only posted the long explanation in case someone came across the same issue later and might forward me a solution.



I am not getting that error you quoted btw. It was resolved by installing the 3 modules suggested in your install instructions.



I only get this error

unable to login 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket"

Thanks again for the help though Jafo ;)

Jafo
01-11-2005, 04:35 AM
Ok, my guess is that your host hasn't installed LWP to handle SSL transactions. No biggy, just have them install this module:

Crypt::SSLeay

That will probably take care of this for you.

RLVAlleman
01-11-2005, 05:02 PM
I too am having one of the errors listed above but the host said everything is installed correctly..... error as follows
Can't locate WWW/GMail.pm in @INC (@INC contains: /home/virtual/site59/fst/var/www/cgi-bin/gmail /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux /usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .) at gmail.cgi line 33.
BEGIN failed--compilation aborted at gmail.cgi line 33.

Jafo
01-11-2005, 05:19 PM
Did you upload the WWW folder, along with the GMail.pm file and is the case correct?

RLVAlleman
01-12-2005, 12:27 AM
This may sound dumb but I have no idea about the "WWW" folder

RLVAlleman
01-12-2005, 12:59 AM
I have now(knew nothing about it) here is the new error about "header.pm" ?
Can't locate Mail/Header.pm in @INC (@INC contains: /home/virtual/site59/fst/var/www/cgi-bin/gmail /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux /usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/site_perl/5.6.1/MIME/Head.pm line 119.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.6.1/MIME/Head.pm line 119.
Compilation failed in require at /usr/lib/perl5/site_perl/5.6.1/MIME/Parser.pm line 147.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.6.1/MIME/Parser.pm line 147.
Compilation failed in require at gmail.cgi line 34.
BEGIN failed--compilation aborted at gmail.cgi line 34.

Jafo
01-12-2005, 03:05 AM
When you extract the Gmaildonwload.zip file, it should create folders (i.e. WWW, MAIL), etc. You have to upload ALL of those folders and their contents to the gmail directory.

RLVAlleman
01-12-2005, 11:44 AM
No folders in the .zip file at all. I will try another mail system... not sure what is going on.....does anyone have a working .zip file that I could try?

RLVAlleman
01-12-2005, 11:52 AM
I have 27 files in the .zip, some of them are duplicated but no folders????
This is the 5th dl to diferent email addys on diff. servers?????

Jafo
01-12-2005, 01:25 PM
When you extract the files, you must extract them, you have to make sure you keep the option checked to use folder names (Winzip). If you just dump a bunch of files into one folder, than it is incorrect.

RLVAlleman
01-12-2005, 01:52 PM
ok I see... well I did that but an error is as follows
Can't locate Mail/Header.pm in @INC (@INC contains: /home/virtual/site59/fst/var/www/cgi-bin/gmail /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux /usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .) at /home/virtual/site59/fst/var/www/cgi-bin/gmail/MIME/Head.pm line 119.
BEGIN failed--compilation aborted at /home/virtual/site59/fst/var/www/cgi-bin/gmail/MIME/Head.pm line 119.
Compilation failed in require at /home/virtual/site59/fst/var/www/cgi-bin/gmail/MIME/Parser.pm line 147.
BEGIN failed--compilation aborted at /home/virtual/site59/fst/var/www/cgi-bin/gmail/MIME/Parser.pm line 147.
Compilation failed in require at gmail.cgi line 34.
BEGIN failed--compilation aborted at gmail.cgi line 34.

RLVAlleman
01-12-2005, 02:17 PM
ADDITION TO LAST POST: There is no folder "Mail" and no file "Header.pm" or will that be elsewhere?

Jafo
01-12-2005, 03:34 PM
Here is the module zip for the Messenger which contains the same modules used in Gmail. You can upload these.

RLVAlleman
01-12-2005, 04:18 PM
That was a big help. It is getting simple now but my mind is over taxed. host informed me that all is loaded on the server side but here is the latest.
unable to login 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket" (perhaps you forgot to load "LWP::Protocol::https::Socket"?)

RLVAlleman
01-12-2005, 04:35 PM
and I quote" that is not part of the LWP bundle, it is an additional module which must be installed seperately and you will have to install it yourself" end quote

BACK TO THE COFFEE POT

Jafo
01-12-2005, 04:42 PM
You cannot install LWP SSL support by just uploading a file. It has to be installed on the server by installing the Crypt::SSLeay module so LWP can handle SSL transactions.

PromaneX
02-13-2005, 08:53 PM
nevermind

ooyhooy
02-20-2005, 04:12 AM
Hi,

I have checked Gmail Downloader, but I got this error.

Software error:
MIME::Parser: couldn't open /home/123.com/cgi-bin/gmail/tmp/1108888600.txt: No such file or directory

For help, please send mail to the webmaster (webmaster@123.com), giving this error message and the time and date of the error.

I have chmoded "tmp" folder to 777 but still got this problem

Jafo
02-20-2005, 11:58 PM
I would guess then that the path is incorrect.

ooyhooy
02-21-2005, 12:40 PM
path is acurate. because file list shows. but when I click on any file it gave that error.?

ooyhooy
02-23-2005, 12:28 PM
no support anymore?

grfamp
04-17-2005, 05:31 AM
hi..yea I'm getting the same problem as you ooyhooy..i see he list of files, but clicking on it shows that message. I've chmod'd the tmp directory and my base path is correct..but it still gives this error? Is there anyone who can help?

jackenloper
05-13-2005, 01:58 AM
Hi,

First of all, the gmail downloader ROCKS!!!! Thank you so much for creating it.

I only have one problem, I try to upload some home videos to gmail, so i naturally break them up into 9.5 megabyte chunk Winrar archives and upload them. They upload successfully. When log into my gmail account (without the script), i am able to download the files. When i run the gmail.cgi script, i see all the file names, but when i click on them, a page pops up and says "file not found!".

With the small picture files or rar files that i upload (less than 2 megs), they download with the gmail.cgi script successfully, but the big files under 10 megs, don't.

Is it the gmail script problem, or is gmail using some weird countermeasures.

I am sorry to be taking up your valuable time, but thank you for helping me.

Here is my cgi script with the compressed picture files
http://gaicccp.coconia.net/guitarsite/Gmail_downloader/gmail.cgi
(i just renamed them to .jpg , but they are really rar archives)

The Ts Bs Pictures** files do not work, because they are 9.5 megs, but the bottom files such as lab3.xls does work because it is small.

Thanks again.

Lafie
05-22-2005, 05:34 AM
Hi,

First of all, the gmail downloader ROCKS!!!! Thank you so much for creating it.

I only have one problem, I try to upload some home videos to gmail, so i naturally break them up into 9.5 megabyte chunk Winrar archives and upload them. They upload successfully. When log into my gmail account (without the script), i am able to download the files. When i run the gmail.cgi script, i see all the file names, but when i click on them, a page pops up and says "file not found!".

With the small picture files or rar files that i upload (less than 2 megs), they download with the gmail.cgi script successfully, but the big files under 10 megs, don't.

Is it the gmail script problem, or is gmail using some weird countermeasures.

I am sorry to be taking up your valuable time, but thank you for helping me.

Here is my cgi script with the compressed picture files
http://gaicccp.coconia.net/guitarsite/Gmail_downloader/gmail.cgi
(i just renamed them to .jpg , but they are really rar archives)

The Ts Bs Pictures** files do not work, because they are 9.5 megs, but the bottom files such as lab3.xls does work because it is small.

Thanks again.

I think I know what's your problem: the host (and not the script).
100webspace.com somehow limits the files to a max of 8mb, any file bigger then that gives you that error. So either switch to another host, or make your files 8mb or lower.
try http://www.5gigs.com
has no forced ads, and has a lot of nice features (allthough is a little slow)

Hope this helps

codemanz234
06-03-2005, 10:18 AM
no one has solution to ooyhooy's problem?