www.uburst.com www.uburst.com

"Problems with image upload"

Go back to the LobbyClick here to Go Back to Main ListingClick here to see helpClick here to Search the Forum

Configuration Questions
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"Problems with image upload"
Posted by Jeffrey Knodel on Nov-12-02 at 10:03 PM (EST)
I am having problems with a new install of Ustorekeeper on an NT server. The images directory seems to be correctly configured - as it properly propigates the contents of the directory, and allows the deletion of image files, however, when the owner of the site attempts to upload an image, the site simply returns to the password prompt without an error, and the image is not uploaded.

thanks
jk

Click to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents

 Table of Contents

RE: Problems with image upload, Bill Weiner, Nov-13-02, (1)
"RE: Problems with image uploa..., Jeffrey H. Knodel, Nov-13-02, (2)
"RE: Problems with image uploa..., Mark Colasante, Nov-13-02, (3)
RE: Problems with image upload, Bill Weiner, Nov-14-02, (4)
"RE: Problems with image uploa..., Mark Colasante, Nov-18-02, (5)
RE: Problems with image upload, Bill Weiner, Nov-18-02, (6)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "RE: Problems with image upload"
Posted by Bill Weiner on Nov-13-02 at 06:41 AM (EST)
Hmmmmm... So the Image Manager form comes up ok, and the "Delete Image From Server" option works ok, but yet the "Upload Image To Server" option is just returning the storeowner to uStorekeeper Login Prompt?

That indicates to me that the script is most likely configured correctly and that the directory paths and permissions are also most likely configured correctly.

What it sounds like the to me is that there may be a timing out problem.

As a test, try uploading a small image (1 - 2 Kbytes) and let me know the results.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
2 . ""RE: Problems with image upload""
Posted by Jeffrey H. Knodel on Nov-13-02 at 09:02 PM (EST)
Your understanding is correct. I can ftp images into the images directory and delete them through the image manager interface.

The only files that I have tried to upload are < 1 kb. The webserver comes immediatly back with the password screen.

The ISP has informed me that the webserver is IIS on Win2K. I seem to remember that Apache needs to be configured to allow file uploads. Is there an equivalant configuration for IIS?

jk

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
3 . ""RE: Problems with image upload""
Posted by Mark Colasante on Nov-13-02 at 09:40 PM (EST)
I am the network administrator for the site where Jeff Knodel uses your application. I have looked at the Perl scripts that are processing the image upload function, as well as looked at the configuration settings and path directives. I cannot see any misconfigurations, but, I am not exactly sure if I am looking to the right potential solutions. I have also been looking at directory permissions, which appear to be correct. The anonynous IIS user has the appropriate access to the images directory.

Can you explain to me how your application goes about writing the file and saving it to the server? Is it via an ftp process or something else?

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
4 . "RE: Problems with image upload"
Posted by Bill Weiner on Nov-14-02 at 05:30 AM (EST)
The Image Manager's "Upload" Feature uses a standard HTML "FILE" type form element to allow the user to select the image that is to be uploaded and POSTs that data with an ENCTYPE of "multipart/form-data" to the CGI script. The HTML is similar to this:

< FORM ACTION="https://www.yourdomain.com/cgi-bin/ustorekeeper-manager.pl" ENCTYPE="multipart/form-data" METHOD="POST" >
< INPUT TYPE="hidden" NAME="password" VALUE="yourpassword" >
< INPUT TYPE="hidden" NAME="command" VALUE="upload_image" >
< INPUT TYPE=FILE NAME=UPLOAD_DATA SIZE=30 >
< INPUT TYPE="SUBMIT" VALUE="Upload Image To Server" >
< /FORM >

(NOTE the ENCTYPE="multipart/form-data" .... as that might be related to the problem.)

Once that data is POSTed to the CGI script, the "parse_form_data" subroutine in the ustorekeeper-lib.pl file detects the "CONTENT_TYPE" as "multipart/form-data", reads the data from stdin, and saves it to a file.

The fact that the storeowner is getting the uStorekeeper Login Screen when trying to upload an image, indicates that the "password" field (and probably the others form fields) are not being detected/received properly from stdin. (The uStorekeeper Script will show the login-screen whenever data is POSTed to it with an invalid or missing "password").

The fact that no file at all is being written to the server, indicates that not even the file data is being detected/received properly from stdin.

So perhaps it is all related to the web server's ability to handle "multipart/form-data".

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
5 . ""RE: Problems with image upload""
Posted by Mark Colasante on Nov-18-02 at 01:01 AM (EST)
You are correct in saying that ISS cannot handle multipart/form-data, at least not without a 3rd party object to do this. However, your code would have to instantiate that object in order to make an upload process work. This issue must have come up previously for you. What is your suggestion for a workaround?
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
6 . "RE: Problems with image upload"
Posted by Bill Weiner on Nov-18-02 at 06:23 AM (EST)
I remember a similar problem that someone was having with an Apache server, but it turned out to be their mod_apache library. I don't think that will help you.

For a different product, I remember someone running into a problem where an Internet Explorer browser didn't (or did, I can't remember) include the full file directory path in the file name that get's past to the script with multipart/form-data.... which is really not an issue with uStorekeeper, but you may want to try using a different browser to upload images. Maybe Netscape will work.

Otherwise, it is strange to hear that IIS doesn't handle multipart/form-data and/or that it can be resolved on the script side of things. Really all the script does when it detects CONTENT_TYPE of mutlipart/form-data is read the data from STDIN and parse it accordingly. If the multipart/form-data is not being passed, then it seems like that would have to be handled external to the script (ie. Browser/Server communication). It would also be interesting to see what actually is being passed to the script via something like this in the parse_form_data subroutine:

$content_type = $ENV{'CONTENT_TYPE'};
if ($content_type =~ /^multipart\/form-data/)
{
# Read in all data.
read(STDIN, $query_string, $ENV{'CONTENT_LENGTH'});

print "Content-type: text/html\n\n";
print "< HTML >< HEAD >< TITLE > Test < /TITLE >< /HEAD >";
print "< BODY >"
print "< PRE >";
print "The data received is:< BR >";
print $query_string;
print "< /PRE >";
print "< /BODY >< /HTML >";
exit;
}

But again, you may first want to try the upload with a different browser (maybe Netscape) and see if that makes a difference.

Or if you want to really see/verify what data get's passed from the HTML form/Browser to the server's STDIN, then you could try adding the above test code to the ustorekeeper-lib.pl parse_form_data subroutine.

Otherwise, for whatever "object" that you mention needs to be implemented by the script, then you could try adding it to the ustorekeeper-manager.pl "create_image_file_form" or "upload" subroutines... depending on what the object actually does.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents


Archive This Thread: Admin and Moderator OnlyRemove This Thread: Admin and Moderator Only
Click here to goto Click here to goto the Lobby

 

 

 

 

 

 

 

 

 

 

 

 
Questions or problems regarding this bulletin board should be directed to Webmaster
©1997-1999 by DCScripts. All rights reserved.