Problems posting large amount with php into mySQL

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
miquito
Forum Newbie
Posts: 5
Joined: Thu Aug 31, 2006 10:19 am
Location: Stockholm, Sweden

Problems posting large amount with php into mySQL

Post by miquito »

Hi,

I have a page with a number of <textarea>:s and it works fine to post this form into my mySQL DB.
But when the number of characters gets too large it won't save.

The funny thing is that if I take all the text in all the text areas that wouldn't save and put all the text in to one of the textareas it will save fine.

I have tried to increase my max post size in php.ini to 20M but still same problem.

I'm running php 5.1.2 with IIS and mySQL.

my clients have called me about 500 times today and I really need to get this sorted.
Anyone has a solution for this?

Thanks
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

This may seem a bit far out there... but I had this problem a long time ago. In my case, it was due to REALLY bad coding.

#1. I wasn't using POST for the form action, so it was being sent through $_GET.
#2. I was accessing the variable through $var, instead of $_POST['var'].
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
miquito
Forum Newbie
Posts: 5
Joined: Thu Aug 31, 2006 10:19 am
Location: Stockholm, Sweden

Post by miquito »

I see what you mean.
But there is no such thing here.

I'm using $_POST
miquito
Forum Newbie
Posts: 5
Joined: Thu Aug 31, 2006 10:19 am
Location: Stockholm, Sweden

Post by miquito »

The error message I get is:
Got error 139 from storage engine
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Seems like a strange error. Perhaps these links will help you. Got this from a quick google of the error message.

http://bugs.mysql.com/bug.php?id=10035
http://www.issociate.de/board/post/2555 ... ngine.html
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

What are your database field types? Are they all set to LONGTEXT?
miquito
Forum Newbie
Posts: 5
Joined: Thu Aug 31, 2006 10:19 am
Location: Stockholm, Sweden

Post by miquito »

yes except from the id = int
miquito
Forum Newbie
Posts: 5
Joined: Thu Aug 31, 2006 10:19 am
Location: Stockholm, Sweden

Post by miquito »

:twisted:
I sorted it out.

The problem was that I had too manny columns in my table and when posting too much info to it it just didn't work.
Think I read somewhere that if you have more than 15 columns in a table you might run in to trouble.
My solution took a few hours to fix but now it works like a baby.

I split my table up into 3 tables wich I now post into.

Thankyou and goodnight, may this thread help someone in the future </internalStress>
Post Reply