Indigo Rose Software

Go Back   Indigo Rose Software Forums > Old Versions > TrueUpdate 2.0

 
 
Thread Tools Display Modes
  #1  
Old 04-19-2005
Elleah Elleah is offline
Forum Member
 
Join Date: Apr 2005
Posts: 54
Maximum Length of String/Text TU2 can Pass/Submit

Hi! I am ninj colleague.

I am having some tests in uploading files into our web server using the TU2 and CGI scripts as well. I am trying to figure out what is the maximum length of string or the maximum character a TU2 can pass and write into my log file.
After having some tests, I have noticed that as it reaches 8191 ramaining characters was not copied. How true is it? Because I do believe with regards to CGI there is no limitation in handling data, right? it depends on the memory capacity.

Thanks,
Elleah
  #2  
Old 04-19-2005
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
Hi Elleah,

What version of TrueUpdate 2.0 are you using? There were some problems with the HTTP.Submit() action in version 2.0.0.0 of TrueUdpate 2.0 that have since been loved in version 2.0.1.0.

Are you using SUBMITWEB_GET or SUBMITWEB_POST to send your information to your server? I have been able to send over 23,000 characters to a PHP script using SUBMITWEB_POST.
__________________
MSI Factory The Next Generation Intelligent Setup Builder
  #3  
Old 04-19-2005
Elleah Elleah is offline
Forum Member
 
Join Date: Apr 2005
Posts: 54
Maximum Length of String/Text TU2 can Pass/Submit

I am using the TrueUpdate latest version 2.0.1.0 and I am using SUBMITWEB_POST in my script. I am also using CGI script in Perl.

I also noticed that at the first carriage return the line was already cut and it doesn't get the remaining text at all. Does your text also include carriage return?
  #4  
Old 04-19-2005
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
Hi Elleah,

Actually my text includes many carriage returns, I tested it by reading in a lengthy text file and then passing it to my script. Perhaps your script has difficulty dealing with carriage returns? Try sending it some lengthy text without any carriage returns; does all of the text make it to the logfile?
__________________
MSI Factory The Next Generation Intelligent Setup Builder
  #5  
Old 04-19-2005
Elleah Elleah is offline
Forum Member
 
Join Date: Apr 2005
Posts: 54
Maximum Length of String/Text TU2 can Pass/Submit

Hello Mark,

I've tried passing a lengthy text without carriege return as well and I was not able to get the remaining text after a carriege return. What was the reason behind?

And as I pass a lengthy text, I was only able to pass maximum of 8191 characters, not more than that.

My script for Logging to file is as below:

sub LogToFile{
$logtime = localtime(time);
chdir("$filesdir");
open(LOGFILE, ">>$logfile");
flock(LOGFILE, 2);
seek(LOGFILE, 0, 2);
print LOGFILE "$Operation, $logtime, $filename, $Text\n";
close(LOGFILE);
}

wherein $text is the lengthy text I am passing.

Thanks,
Elleah
  #6  
Old 04-20-2005
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
Hi Elleah,

I'm slightly confused by your first sentence, you say that you passed some text without a carriage return, but you were unable to write the text past the carriage return?

Either way I have been able write over 23,000 characters to a log file using the following php code:

PHP Code:
<?php

$filedata 
$_REQUEST['filedata'] ;
$filename $_REQUEST['filename'] ;

if (!(
$writefilestream fopen($filename'w')))
{
   echo 
"Could not open file\r\n";
   return;
}

if (
fwrite($writefilestream$filedata) === FALSE
{
   echo 
"Cannot write to file ($filename)";
   
fclose($writefilestream);
   return;
}
  
   echo 
"Success, wrote ($filedata) to file ($filename)";
   
fclose($writefilestream);

?>
I am by no means a PHP expert so the above code may not be the best way to accomplish a file write. The flock() function was also mentioned on a previous thread as a way to lock the file so that other processes cannot write to it.

I attempted the upload using your code, however my server kept returning a parsing error on the PRINT line.
__________________
MSI Factory The Next Generation Intelligent Setup Builder

Last edited by Mark; 04-20-2005 at 09:03 AM.
  #7  
Old 04-21-2005
Ninj Ninj is offline
Forum Member
 
Join Date: Jul 2004
Posts: 13
Hi Mark,

What Elleah means is that when she tries to pass a series of text with carriage returns in between, only the text until the first CR is submitted to the cgi script.

For a series of text without a CR, she noticed that the maximum length of string that can be passed is 8191 characters.

The code that she has forwarded is just a snippet of the whole script. This may be the reason why you are getting an error message on the print line.

Ninj
  #8  
Old 04-21-2005
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
Hi Ninj,

Thanks for the clarification, now I understand what she meant.

I did know that the code that she posted was just a snippet so I edited it to try to get it to work, but no matter what I did I always got a parsing error on the print line.

Have you tried the code that I posted? Were you able to write out more characters using it?
__________________
MSI Factory The Next Generation Intelligent Setup Builder
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
maximum string length Option_Explicit AutoPlay Media Studio 4.0 3 03-16-2003 11:02 PM


All times are GMT -6. The time now is 03:19 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software