PDA

View Full Version : Database output too long?



Tascha
9 Oct 2009, 5:21 AM
Hello,

One question:

Could it be, that a database- output is too long, for sending it via $_POST?

I have a column in a table with over 2 million characters.

The column should be hidden in a grid by expander row and has to be expanded to show its content. But it's empty.
Fiebrug shows only an empty POST!

It works with columns which have ca 1 million characters.


Could that be? Or do I have to search on another position?

greetings

Tascha

Jack_S
9 Oct 2009, 5:31 AM
What backend are you using MSSQL, MySQL or Oracle?

Tascha
9 Oct 2009, 5:32 AM
MySQL

mschwartz
9 Oct 2009, 5:54 AM
Check max_allowed_packet in your my.cnf or my.ini (config file for mysql). If it's smaller than 2MB, you will get a mysql error. You may not be checking for those errors.

You might also check your php.ini to see that:
memory_limit is sufficient
post_max_size is sufficient
upload_max_filesize is sufficient

If you change my.cnf, restart mysql
If you change php.ini, restart apache

9 Oct 2009, 6:10 AM
1 million characters? How is that managable by humans?

Tascha
12 Oct 2009, 2:56 AM
Thanks a lot!

I changed it and it works!

grettings

Tascha

Mike Robinson
12 Oct 2009, 9:27 AM
If you have a 2-million-character field, "what can I say? You are treading upon dangerous ground." Sooner or later (and you might no longer be working there at the time, so it's okay... ;) ... unless this is the reason why you are "no longer working there" /:)) something's gonna get too large. Something's gonna blow.

A "2-million-byte whatever-it-is" really is "a database table unto itself," even if for legacy reasons it wasn't defined that way. I'd suggest that you ought to define your own API on the client and server side to "properly" deal with the data, so that you are not attempting to shuttle 2 megabytes of data back-and-forth all at once. Send it in reasonably-sized chunks. Put the burden more on the server than on the client, on the presumption that the server is better able to handle "large, potentially constipating things" better than the client is.

mschwartz
12 Oct 2009, 9:29 AM
xtype: 'fileupload'

and upload a 2+MB movie file.

Now, why you need a 2MB field in the client, I'm not sure, but I don't know the poster's needs.