Jump to content

[SOLVED] Large text Post, please help me set it up. [Php/VB] please help


shlomikalfa

Recommended Posts

hey there, i am trying to set up a large text upload [31578+ chars].

 

I have a program to make the text send, it uses http1.1 tcp send method however i don't know how to set it correct to work with a corresponding PHP script.

 

-> A. the program is forming the data into a proper http entity, [iE. < or &#60;]

-> that data is then sends to a php page using different headers to mark each content.

** The TCPSend method is used once to send the entire content. [is that how it should be done ?!]

 

-> Php page should receive and analyze the contents accordingly [this works well i assume].

 

Headers:

.- Post method.

.- Content type: application/x-www-form-urlencoded

.- Connection: close

 

Now... what's the issue right ?!

=>>> the thing is, it works perfectly for small sizes of text [1000 chars] but when i'm using large text [31000+ chars] it seems to fail and stuck...

 

any idea ?!

Link to comment
Share on other sites

i have ran into this while looking for ppl with the same error but couldn't understand anything:

I found a solution for the "500 error" problem. At least it worked on my webspace. Delete this information from the .htaccess file:

[code]<IfModule !mod_rewrite.c>
# ugly ugly hack to detect missing mod_rewrite
# RedirectMatch must be to an absolute destination, so forces 500 error...
ErrorDocument 500 "Elgg error: Apache does not have mod_rewrite loaded. Please check your apache setup."
RedirectMatch 302 .* index.php
</IfModule>

<Files "htaccess-dist">
order allow,deny
deny from all
</Files>



# Default handler
DirectoryIndex index.php

# php 4, apache 1.x
<IfModule mod_php4.c>
# default memory limit to 16Mb
php_value memory_limit 16777216
# to make sure register global is off
php_value register_globals 0
# max post size to 8Mb
php_value post_max_size 8388608
# upload size limit to 5Mb
php_value upload_max_filesize 5242880
# hide errors, enable only if debug enabled
php_value display_errors 0
</IfModule>

# php 4, apache 2
<IfModule sapi_apache2.c>
# default memory limit to 16Mb
php_value memory_limit 16777216
# to make sure register global is off
php_value register_globals 0
# max post size to 8Mb
php_value post_max_size 8388608
# upload size limit to 5Mb
php_value upload_max_filesize 5242880
# hide errors, enable only if debug enabled
php_value display_errors 0
</IfModule>

# php 5, apache 1 and 2
<IfModule mod_php5.c>
# default memory limit to 16Mb
php_value memory_limit 16777216
# to make sure register global is off
php_value register_globals 0
# max post size to 8Mb
php_value post_max_size 8388608
# upload size limit to 5Mb
php_value upload_max_filesize 5242880
# hide errors, enable only if debug enabled
php_value display_errors 0
</IfModule>

 

Make sure, that you're mod_rewrite is ON and your register_globals and safe_mode ware OFF. Then you have to set "data" to CHMOD 777.

 

I hope it works, have fun :)

[/code]

 

bah !!!

Link to comment
Share on other sites

That was instructions on how to edit the internal server .htaccess file, although it does raise the doubt that maybe your file is over the default 5MB in size?

 

Also this could be a problem with your HTTPD file although I'm not too wise on that one.

 

But its true I didnt think of mod_rewrite try doing some reasearch into it I'll have a quick look I had a similar problem on an FTP program I made with PHP it turned out to be the servers memory and file size limits being too small. As so I contacted the help!

 

hehe good luck mate

Link to comment
Share on other sites

are you posting it to a database or to a file?

 

----EDIT----

If its a database you'll find theres a character limit on it and you'll have to store it as a file, PDF or something using the PDF_write stuff again not too wise on that subject as my server doesnt support it  :P

 

And if its a file check your code in every aspect even the slightest thing could be making your server reject the new found file or anything at all

------------

Link to comment
Share on other sites

i did thought of a possible reason as to why does the script gets stuck... maybe it's because i'm trying to send 300K+ chars in one line ?!

 

--> i've just splitted it to many lines and it seems like it wasn't 30K chars... it's about 300K.... resulting in a file of 304Kb text.

 

is there a limit for the HTTP1.1 headers line length ?! if so how should i split the text into lines without harming it's integrity ?!

 

 

about my DB, it should be ok... i don't even get to that part of getting the error....

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.