Re: Re: File upload problems still!

2001-08-24 Thread Ryan Davis

Sorry! I meant my population, as in the users of this program.  This is only
for members of a student group on campus.  It will be open on the web, but
anyone not in our member roster will be tossed out.  My college career
centers require word resumes for various resume book compilation, so
everyone who needs to be on the CD has a word resume.  I did not mean to
imply that 100% of the world had their resumes in Word format!  My mistake.
:)


Ryan

- Original Message -
From: Dennis Waller [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Roger C Haslock
[EMAIL PROTECTED]
Cc: Ryan Davis [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 9:37 PM
Subject: Re: Re: File upload problems still!



   In the end, they are going to put on a resume CD, with a VB front end,
 and Word
   is used to do keyword searches, and about 100% of the population
involved
 have
   their resumes in word anyway.
   ---


 You are being pompous when you say that: No we don't .





 ___
 Send a cool gift with your E-Card
 http://www.bluemountain.com/giftcenter/




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: File upload problems still!

2001-08-23 Thread fliptop

Roger C Haslock wrote:
 
 Just an aside, but what is the point of  format = 'Application/msword' ?
 
 Anyone can rename their file to look like '*.doc', and you can only
 determine the file content when you have uploaded it ( at which point you
 SHOULD check).

not to mention you may offend those non-micro$oft users whose resumes
are plain text.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Re: File upload problems still!

2001-08-23 Thread ryepup



Roger C Haslock wrote:
 
 Just an aside, but what is the point of  format = 'Application/msword' ?
 
 Anyone can rename their file to look like '*.doc', and you can only
 determine the file content when you have uploaded it ( at which point you
 SHOULD check).

not to mention you may offend those non-micro$oft users whose resumes
are plain text.


In the end, they are going to put on a resume CD, with a VB front end, and Word 
is used to do keyword searches, and about 100% of the population involved have 
their resumes in word anyway.  
---

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Re: File upload problems still!

2001-08-23 Thread ryepup




Roger C Haslock wrote:
 
 Just an aside, but what is the point of  format = 'Application/msword' ?
 
 Anyone can rename their file to look like '*.doc', and you can only
 determine the file content when you have uploaded it ( at which point you
 SHOULD check).

not to mention you may offend those non-micro$oft users whose resumes
are plain text.


In the end, they are going to put on a resume CD, with a VB front end, and Word 
is used to do keyword searches, and about 100% of the population involved have 
their resumes in word anyway.  

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: File upload problems still!

2001-08-23 Thread Curtis Poe

--- Ryan Davis [EMAIL PROTECTED] wrote:
 Curtis+List,
 
 I checked out the CGI::Safe.pm module, and so far, I'm having the same
 problem.  The script goes to Just about to get your resume!; then quits.
 I don't have access to server logs, so I don't know what is going on.  I
 think my server is running Apache, and I've been snooping to try and find
 the config files (I got a find / -name httpd.conf going right now)
 
 Is there anything perlish wrong here?  It works on Activestate/Apache/Win98,
 so I think it must be a server thing, but I dunno.

What do you mean by then quits?  Does it silently fail?  Does it hang?  Does it 
return an error
message?

Wild guess:  Recently (like, two days ago), I had a problem with a script that worked 
fine on a
Windows box but then mysteriously 'hung' on a Linux box.  It was caused by the same 
problem that I
had for my recent question about my script dying when I turned off warnings:  Windows 
and Unix
have different line endings.  Since you mentioned that you had successfully run this 
on a Win98
box, I'm wondering if this is the problem.

Windows recognizes \12\15 as the end of line characters (\r\n).  Unix is looking for a 
\15 (\n). 
If you have shell access to your server, enter the following:

cat -vet script.cgi | more

This will display the end of line characters as a dollar sign.  If you see a ^M before 
the dollar
sign, then you know you have DOS line endings.  Here's an example:

#!/usr/bin/perl -wT^M$

If you see that ^M, (ctrl-M, a.k.a. ASCII 12, a.k.a. \r), you can eliminate it with 
the following
in-place edit:

perl -pi -e 's/\r//g' script.cgi

Just make sure to back up your script, first.

To prevent this in the future, make sure you FTP your scripts to the server in ASCII 
mode, not
binary.  ASCII mode will fix the line endings for you.

If this doesn't resolve the problem, let us know.

Cheers,
Curtis Poe

=
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
Ovid on http://www.perlmonks.org/

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Re: File upload problems still!

2001-08-23 Thread ryepup



cat -vet script.cgi | more


^M's galore.  The 'auto' setting on WS_ftp must not do much.


in-place edit:

perl -pi -e 's/\r//g' script.cgi

Just make sure to back up your script, first.

worked like a charm, eliminating all the ^M's

When I tried it out, the program still crashed.  It executes most of the code, 
up to the (paraphrased)

$file = $cgi-get_upload(blah)

then stops executing.  

I think maybe I can do something with .htaccess files to adjust the limit on 
PUT, but that is a bit too OT for here, I think.

Thanks,
Ryan


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Re: File upload problems still!

2001-08-23 Thread Mo Holkar / UKG

At 17:31 23/08/01, Ryan wrote:
^M's galore.  The 'auto' setting on WS_ftp must not do much.


By default WS_ftp will only be expecting files with certain extensions (eg. 
.txt, .htm) to be ASCII. So 'auto' will upload your .cgi or .pl files as 
binary. You can change these defaults on the Options button, Extensions tab.

(I thought it was worth posting this response to the list, because I've had 
a few people puzzled by this in the past.)

best,

Mo




Mo Holkar
Undying King Games
[EMAIL PROTECTED]
http://www.ukg.co.uk


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




File upload problems still!

2001-08-22 Thread Ryan Davis

Curtis+List,

I checked out the CGI::Safe.pm module, and so far, I'm having the same
problem.  The script goes to Just about to get your resume!; then quits.
I don't have access to server logs, so I don't know what is going on.  I
think my server is running Apache, and I've been snooping to try and find
the config files (I got a find / -name httpd.conf going right now)

Is there anything perlish wrong here?  It works on Activestate/Apache/Win98,
so I think it must be a server thing, but I dunno.

Here are the relevant snippets:

code
use CGI::Safe;
my $cgi = CGI::Safe-new( DISABLE_UPLOADS = 0,
POST_MAX = 100 * 1024 );
...
 print $cgi-filefield('resume','starting value',40,180);
...
 print Just about to get your resume!;
 # only allow Word docs
my $file = $cgi-get_upload( file_name = 'resume', format =
'Application/msword' );

if ( $file-{ error } ) {
   print Your file was not uploaded.  Sorry.
}
 print Just got your resume!;
/code

This is getting a little OT, but my find was successful, and I think this
applies to me:

Directory /home/*/public_html
Options Includes Indexes FollowSymLinks ExecCGI
AllowOverride AuthConfig Limit FileInfo
/Directory

Ok, after looking at Apache docs for 20mins, I can do an .htaccess file to
control that directory, but I'm going to send this, just in case anyone can
make any sense of it.

Any help would be much appreciated!

Thanks,
Ryan

Sorry this is so rambling, it was written over the course of about an hour.
I'll be better about my future questions!


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]