Re: [PHP] Issues with long SQL inserts
Jason Wong wrote: > On Monday 01 April 2002 07:22, Chris Snyder wrote: > > > >>I altered the add.php script to print the query to screen instead of >>sending it to MySQL to try this. It still acted the same, regardless of >>whether it was sending it to the MySQL server or printing it. In fact, >>it even had the same reaction when I commented out the print command as >>well. This appears to be something in the form-handling of PHP. Any >>ideas now? Thanks for all your help. > > > Are you using POST or GET for your form? Both have a limit on how much data > you can send with GET having a lower limit than POST. So if you were using > GET then try using POST. Both limits are, I think, browser dependent. > > I tried VNCing over to my WinNT server and using IE on there - it worked fine. This must be a Mozilla issue. Now I get to have fun over with their support channels. Thanks for all your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issues with long SQL inserts
Jason Wong wrote: > On Monday 01 April 2002 07:22, Chris Snyder wrote: > > > >>I altered the add.php script to print the query to screen instead of >>sending it to MySQL to try this. It still acted the same, regardless of >>whether it was sending it to the MySQL server or printing it. In fact, >>it even had the same reaction when I commented out the print command as >>well. This appears to be something in the form-handling of PHP. Any >>ideas now? Thanks for all your help. > > > Are you using POST or GET for your form? Both have a limit on how much data > you can send with GET having a lower limit than POST. So if you were using > GET then try using POST. Both limits are, I think, browser dependent. > > I'm using POST. I'm using Mozilla 0.9.9 - maybe it has a low limit or something? I'll search their bug database and see if anything turns up. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issues with long SQL inserts
On Monday 01 April 2002 07:22, Chris Snyder wrote: > I altered the add.php script to print the query to screen instead of > sending it to MySQL to try this. It still acted the same, regardless of > whether it was sending it to the MySQL server or printing it. In fact, > it even had the same reaction when I commented out the print command as > well. This appears to be something in the form-handling of PHP. Any > ideas now? Thanks for all your help. Are you using POST or GET for your form? Both have a limit on how much data you can send with GET having a lower limit than POST. So if you were using GET then try using POST. Both limits are, I think, browser dependent. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* What's another word for "thesaurus"? -- Steven Wright */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Issues with long SQL inserts
Wow! Nope, I'm stumped now. It does seem to be a problem with PHP handing large blocked of text but as I've personally posted 8k of test from a form into a text field I'll be dogged if I know what's happening. Any possibility that it's a quotes problem? If you view the source, is there a PHP error masked by an HTML tag in there? (grasping at straws here) =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Chris Snyder [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 31, 2002 5:22 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Issues with long SQL inserts Cal Evans wrote: >Sorry, I've reached the end of my tech-support flow-chart. You might want >to try 2 things: > >1: Fire up the MySQL client of choice and do the insert manually. If it >works there. If it does then at least you've isolated the problem to PHP or >your script. If not then you've eliminated your script and PHP form the >list. > I altered the add.php script to print the query to screen instead of sending it to MySQL to try this. It still acted the same, regardless of whether it was sending it to the MySQL server or printing it. In fact, it even had the same reaction when I commented out the print command as well. This appears to be something in the form-handling of PHP. Any ideas now? Thanks for all your help. > >2: post the question, along with the results from the above experiment and >any other relevant information to the mysql list. (www.mysql.com if you are >not a member, there;s info on joining there) My guess is that it's a MySQL >problem and there are people there who could help you better than I. > Well, I guess I won't do that now - MySQL seems to not be the culprit. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issues with long SQL inserts
Cal Evans wrote: >Sorry, I've reached the end of my tech-support flow-chart. You might want >to try 2 things: > >1: Fire up the MySQL client of choice and do the insert manually. If it >works there. If it does then at least you've isolated the problem to PHP or >your script. If not then you've eliminated your script and PHP form the >list. > I altered the add.php script to print the query to screen instead of sending it to MySQL to try this. It still acted the same, regardless of whether it was sending it to the MySQL server or printing it. In fact, it even had the same reaction when I commented out the print command as well. This appears to be something in the form-handling of PHP. Any ideas now? Thanks for all your help. > >2: post the question, along with the results from the above experiment and >any other relevant information to the mysql list. (www.mysql.com if you are >not a member, there;s info on joining there) My guess is that it's a MySQL >problem and there are people there who could help you better than I. > Well, I guess I won't do that now - MySQL seems to not be the culprit. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Issues with long SQL inserts
Sorry, I've reached the end of my tech-support flow-chart. You might want to try 2 things: 1: Fire up the MySQL client of choice and do the insert manually. If it works there. If it does then at least you've isolated the problem to PHP or your script. If not then you've eliminated your script and PHP form the list. 2: post the question, along with the results from the above experiment and any other relevant information to the mysql list. (www.mysql.com if you are not a member, there;s info on joining there) My guess is that it's a MySQL problem and there are people there who could help you better than I. Sorry I wasn't more help, =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Chris Snyder [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 31, 2002 5:06 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Issues with long SQL inserts Cal Evans wrote: >I'm not up on the exact spec on MySQL but if it has an 'unlimited' text type >then it is a rarity among SQL engines. M$SQL's limit is (used to be?) 8MB >in a single text field. > >FoxPro/dBase had an unlimited text field but that's not so must a SQL engine >as a file format. > >My guess is that you are banging your head against the upper limit. I did >notice that it has a BIGTEXT type. Maybe try that. It still won't solve >the problem but it may give you more room. > Well, not strictly unlimited, but it basically is for my purpose - according to the manual, it's 65535 chars - I'm at around 8000-9000 right now, much lower than the limit. I tried going to mediumtext - limit of 16777215, and it acts the same. Both are quite a bit above what I'm trying to do. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issues with long SQL inserts
Cal Evans wrote: >I'm not up on the exact spec on MySQL but if it has an 'unlimited' text type >then it is a rarity among SQL engines. M$SQL's limit is (used to be?) 8MB >in a single text field. > >FoxPro/dBase had an unlimited text field but that's not so must a SQL engine >as a file format. > >My guess is that you are banging your head against the upper limit. I did >notice that it has a BIGTEXT type. Maybe try that. It still won't solve >the problem but it may give you more room. > Well, not strictly unlimited, but it basically is for my purpose - according to the manual, it's 65535 chars - I'm at around 8000-9000 right now, much lower than the limit. I tried going to mediumtext - limit of 16777215, and it acts the same. Both are quite a bit above what I'm trying to do. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issues with long SQL inserts
Cal Evans wrote: >Have you tried shaving the article off a couple of chrs before the last one >and seeing if the insert works? Also, what is the size limit on a MySQL TEXT >field? > >http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#BLO >B > >May give a hint. > I tried shaving off the article to the size that it truncated it to on its own, and the add worked fine. It seems to be a concrete limit of about 8-9K. >-Original Message- >From: Chris Snyder [mailto:[EMAIL PROTECTED]] >Sent: Sunday, March 31, 2002 3:43 PM >To: [EMAIL PROTECTED] >Subject: [PHP] Issues with long SQL inserts > > >Server is running PHP 4.1.2, APC 1.1.0pl1, MySQL 3.23.47, Apache 1.3.23 >on a built-from-scratch Linux system with kernel 2.4.17, glibc 2.2.5, >and gcc 3.0.4. > >I'm using a fairly simple script to take input from a form, and add it >to a database. The database has the following structure: >ID - mediumint(8), primary key, auto_increment >Added - date >Modified - timestamp(8) >Title - varchar(60) >Text - text > >What's happening is whenever I try to add an article that has text with >a size of over around 9 KB, the browser never finishes loading, and the >article doesn't appear in the list. When I hit the stop button on the >browser, the article will then appear in the article list, but >incomplete - it is always cut off at the same spot. > >This sounds like some kind of buffer issue, but I've looked through all >of the applicable settings that I could find in both my PHP and MySQL >configuration files, and have found nothing. Any ideas? Thanks in >advance. To see the source code for this script, go to >http://test.mvpsoft.com/add.txt . Thanks in advance for any help! > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Issues with long SQL inserts
I'm not up on the exact spec on MySQL but if it has an 'unlimited' text type then it is a rarity among SQL engines. M$SQL's limit is (used to be?) 8MB in a single text field. FoxPro/dBase had an unlimited text field but that's not so must a SQL engine as a file format. My guess is that you are banging your head against the upper limit. I did notice that it has a BIGTEXT type. Maybe try that. It still won't solve the problem but it may give you more room. HTH, =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Chris Snyder [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 31, 2002 4:45 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Issues with long SQL inserts Cal Evans wrote: >Have you tried shaving the article off a couple of chrs before the last one >and seeing if the insert works? Also, what is the size limit on a MySQL TEXT >field? > >http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#BL O >B > Thanks for the quick response. I looked at the MySQL doc, and it didn't seem to offer any explanation. The column type is text, with no limit, which theoretically should give me around 8 meg - I'm getting around 8-9K. The docs say that memory might be a problem, but the server has 512 meg, with 40 meg free, and around 450 meg of swap - shouldn't be a problem. >-Original Message- >From: Chris Snyder [mailto:[EMAIL PROTECTED]] >Sent: Sunday, March 31, 2002 3:43 PM >To: [EMAIL PROTECTED] >Subject: [PHP] Issues with long SQL inserts > > >Server is running PHP 4.1.2, APC 1.1.0pl1, MySQL 3.23.47, Apache 1.3.23 >on a built-from-scratch Linux system with kernel 2.4.17, glibc 2.2.5, >and gcc 3.0.4. > >I'm using a fairly simple script to take input from a form, and add it >to a database. The database has the following structure: >ID - mediumint(8), primary key, auto_increment >Added - date >Modified - timestamp(8) >Title - varchar(60) >Text - text > >What's happening is whenever I try to add an article that has text with >a size of over around 9 KB, the browser never finishes loading, and the >article doesn't appear in the list. When I hit the stop button on the >browser, the article will then appear in the article list, but >incomplete - it is always cut off at the same spot. > >This sounds like some kind of buffer issue, but I've looked through all >of the applicable settings that I could find in both my PHP and MySQL >configuration files, and have found nothing. Any ideas? Thanks in >advance. To see the source code for this script, go to >http://test.mvpsoft.com/add.txt . Thanks in advance for any help! > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issues with long SQL inserts
Cal Evans wrote: >Have you tried shaving the article off a couple of chrs before the last one >and seeing if the insert works? Also, what is the size limit on a MySQL TEXT >field? > >http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#BLO >B > Thanks for the quick response. I looked at the MySQL doc, and it didn't seem to offer any explanation. The column type is text, with no limit, which theoretically should give me around 8 meg - I'm getting around 8-9K. The docs say that memory might be a problem, but the server has 512 meg, with 40 meg free, and around 450 meg of swap - shouldn't be a problem. >-Original Message- >From: Chris Snyder [mailto:[EMAIL PROTECTED]] >Sent: Sunday, March 31, 2002 3:43 PM >To: [EMAIL PROTECTED] >Subject: [PHP] Issues with long SQL inserts > > >Server is running PHP 4.1.2, APC 1.1.0pl1, MySQL 3.23.47, Apache 1.3.23 >on a built-from-scratch Linux system with kernel 2.4.17, glibc 2.2.5, >and gcc 3.0.4. > >I'm using a fairly simple script to take input from a form, and add it >to a database. The database has the following structure: >ID - mediumint(8), primary key, auto_increment >Added - date >Modified - timestamp(8) >Title - varchar(60) >Text - text > >What's happening is whenever I try to add an article that has text with >a size of over around 9 KB, the browser never finishes loading, and the >article doesn't appear in the list. When I hit the stop button on the >browser, the article will then appear in the article list, but >incomplete - it is always cut off at the same spot. > >This sounds like some kind of buffer issue, but I've looked through all >of the applicable settings that I could find in both my PHP and MySQL >configuration files, and have found nothing. Any ideas? Thanks in >advance. To see the source code for this script, go to >http://test.mvpsoft.com/add.txt . Thanks in advance for any help! > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Issues with long SQL inserts
Have you tried shaving the article off a couple of chrs before the last one and seeing if the insert works? Also, what is the size limit on a MySQL TEXT field? http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#BLO B May give a hint. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Chris Snyder [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 31, 2002 3:43 PM To: [EMAIL PROTECTED] Subject: [PHP] Issues with long SQL inserts Server is running PHP 4.1.2, APC 1.1.0pl1, MySQL 3.23.47, Apache 1.3.23 on a built-from-scratch Linux system with kernel 2.4.17, glibc 2.2.5, and gcc 3.0.4. I'm using a fairly simple script to take input from a form, and add it to a database. The database has the following structure: ID - mediumint(8), primary key, auto_increment Added - date Modified - timestamp(8) Title - varchar(60) Text - text What's happening is whenever I try to add an article that has text with a size of over around 9 KB, the browser never finishes loading, and the article doesn't appear in the list. When I hit the stop button on the browser, the article will then appear in the article list, but incomplete - it is always cut off at the same spot. This sounds like some kind of buffer issue, but I've looked through all of the applicable settings that I could find in both my PHP and MySQL configuration files, and have found nothing. Any ideas? Thanks in advance. To see the source code for this script, go to http://test.mvpsoft.com/add.txt . Thanks in advance for any help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php