473,486 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Memory Limit for for HTML pages??

Hello,

I have a php program that is building a grid (HTML table) from a MySQL
database. The problems started when I added a dropdown menu to the grid and
when I did the form buttons would not work when there were a few values in
the drop-down. If I removed the values so it was an empty drop-down menu the
form buttons would work. I thought there was a problem with my drop-down
which is a quite simple menu.

However, what I discovered is that it has to do with the size of the table
that I am building. I changed the query so that it would only pick up about
1/2 the records (134 vs 248) which is where it works (the 135th record
causes the buttons to quit working. It is not a data problem because I then
tested with a different set of data and it would also fail but at a
different spot.

I must be running into some kind of memory limit but I have no idea what it
is! Can someone help?

Vic

Dec 9 '05 #1
10 1870
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vic Spainhower wrote:
I must be running into some kind of memory limit but I have no idea what
it is! Can someone help?


You may be hitting PHP's 8 MB memory limit. That value is a default, so if
you really *need* to run a script which consumes more memory than that,
edit your php.ini file in order to change the memory limit value...

- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

Me acuerdo de que hace años un DECman tenía que actualizar el microcódigo de
un VAX 8250 y le mandaron un floppy por mensajero. El floppy resultó
ilegible, y el decman lo devolvió con una nota en la que se podía leer:

%BADFLOPPY-F-VESPINOISNOTALLOWED; This diskette has been demagnetised. The
compatibility of this hardware with a Vespino's Magneto has not been
certified. Please use a Taxi.
--Jordi Guillaumes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDmh7M3jcQ2mg3Pc8RAnbFAJ4jPa6FzDCvqE7yVbTXWO enzZmR6ACeNhMc
UTC6KxItaT3cJIiDtiS57Q4=
=Dtsg
-----END PGP SIGNATURE-----
Dec 10 '05 #2
Ivan,

I don't think it's the 8meg limit because the HTML is being built correctly.
I can take the generated html and create another page and it fails in the
same way.

Vic
"Iván Sánchez Ortega" <i.***************@rroba--mirame.punto.net> wrote in
message news:nf************@blackspark.escomposlinux.org.. .
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vic Spainhower wrote:
I must be running into some kind of memory limit but I have no idea what
it is! Can someone help?


You may be hitting PHP's 8 MB memory limit. That value is a default, so if
you really *need* to run a script which consumes more memory than that,
edit your php.ini file in order to change the memory limit value...

- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

Me acuerdo de que hace años un DECman tenía que actualizar el microcódigo
de
un VAX 8250 y le mandaron un floppy por mensajero. El floppy resultó
ilegible, y el decman lo devolvió con una nota en la que se podía leer:

%BADFLOPPY-F-VESPINOISNOTALLOWED; This diskette has been demagnetised. The
compatibility of this hardware with a Vespino's Magneto has not been
certified. Please use a Taxi.
--Jordi Guillaumes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDmh7M3jcQ2mg3Pc8RAnbFAJ4jPa6FzDCvqE7yVbTXWO enzZmR6ACeNhMc
UTC6KxItaT3cJIiDtiS57Q4=
=Dtsg
-----END PGP SIGNATURE-----

Dec 10 '05 #3
Vic Spainhower wrote:
I have a php program that is building a grid (HTML table) from a MySQL
database. The problems started when I added a dropdown menu to the grid and
when I did the form buttons would not work when there were a few values in
the drop-down. ...

However, what I discovered is that it has to do with the size of the table
that I am building. I changed the query so that it would only pick up about
1/2 the records (134 vs 248) which is where it works (the 135th record
causes the buttons to quit working. It is not a data problem because I then
tested with a different set of data and it would also fail but at a
different spot.


Are you sure it is not a data problem?
Can you try the dropdown with just the 135th record?

Dec 10 '05 #4
Maraguida,

I changed the query so that it would only pick up records starting with the
135th record. With this set of records it is ok the button works. So I
believe this indicates that it is not a data problem.

Vic

<ma*******@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
Vic Spainhower wrote:
I have a php program that is building a grid (HTML table) from a MySQL
database. The problems started when I added a dropdown menu to the grid
and
when I did the form buttons would not work when there were a few values
in
the drop-down. ...

However, what I discovered is that it has to do with the size of the
table
that I am building. I changed the query so that it would only pick up
about
1/2 the records (134 vs 248) which is where it works (the 135th record
causes the buttons to quit working. It is not a data problem because I
then
tested with a different set of data and it would also fail but at a
different spot.


Are you sure it is not a data problem?
Can you try the dropdown with just the 135th record?

Dec 10 '05 #5
Vic Spainhower said the following on 09/12/2005 23:30:
Hello,

I have a php program that is building a grid (HTML table) from a MySQL
database. The problems started when I added a dropdown menu to the grid and
when I did the form buttons would not work when there were a few values in
the drop-down. If I removed the values so it was an empty drop-down menu the
form buttons would work. I thought there was a problem with my drop-down
which is a quite simple menu.

However, what I discovered is that it has to do with the size of the table
that I am building. I changed the query so that it would only pick up about
1/2 the records (134 vs 248) which is where it works (the 135th record
causes the buttons to quit working. It is not a data problem because I then
tested with a different set of data and it would also fail but at a
different spot.


Can you post a URL to the site so we can take a look at the HTML?

Can you confirm that the HTML is valid?
http://validator.w3.org
--
Oli
Dec 10 '05 #6
Vic Spainhower wrote:
I changed the query so that it would only pick up records starting with the
135th record. With this set of records it is ok the button works. So I
believe this indicates that it is not a data problem.


I'm still not convinced.
Try this:

Instead of putting the value from the database in the select put a
count of options and try all the records (or just the subset from
record 1 to record 135)

// ...
$option_count = 0;
while ($row = mysql_fetch_row()) {
### echo '<option>', $row[2], '</option>';
echo '<option>', ++$option_count, '</option>';
}
// ...

Dec 10 '05 #7
*** Solved ***

It appears the problem is there is some sort of limit when using method=GET
in the HTML FORM statement and this limit was being exceeded. I changed the
form statement to method=POST and it is now working correctly. I don't know
know what the limit is for using GET and I suppose it's possible that POST
varaibles also have a limit but obviously more then GET.

I want to thank everyone for taking the time to reply to my post as it
really did help getting to the bottom of this problem.

Vic


Dec 10 '05 #8
Vic Spainhower wrote:
*** Solved ***
Good :)
It appears the problem is there is some sort of limit when using method=GET
in the HTML FORM statement and this limit was being exceeded. I changed the
form statement to method=POST and it is now working correctly.

<snip>

<quote src="rfc2616">
The HTTP protocol does not place any a priori limit on the length of
a URI. Servers MUST be able to handle the URI of any resource they
serve, and SHOULD be able to handle URIs of unbounded length if they
provide GET-based forms that could generate such URIs. A server
SHOULD return 414 (Request-URI Too Long) status if a URI is longer
than the server can handle (see section 10.4.15).

Note: Servers ought to be cautious about depending on URI lengths
above 255 bytes, because some older client or proxy
implementations might not properly support these lengths.
</quote>
Let me just add that your initial post led us all thinking about a
problem you didn't have.
The problems started when I added a dropdown menu to the grid
and when I did the form buttons would not work when there were
a few values in the drop-down.


The form buttons have been working all the time, with 134 records or
248!
The form would be submitted -- that's what the buttons are for.

Dec 10 '05 #9
>The form buttons have been working all the time, with 134 records or 248!
The form would be submitted -- that's what the buttons are for.
Mara,

The problem that I originally stated was "is there a memory limit for HTML
pages?" The form buttons did stop working when I added a dropdown menu to
the table (which was part of the form). Why do you say they were not working
Mara? I press the submit button and nothing happens! That to me is not
working. I thought there may have been a memory limit of some sort because
if was definitely related to the size of the table being constructed. If the
server was supposed to return a 414 it did not. I appologise if I anyone was
misslead as to how I stated the problem. I only stated in the best way I
could and what I was seeing.

Vic

"Mara Guida" <ma*******@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com... Vic Spainhower wrote:
*** Solved ***


Good :)
It appears the problem is there is some sort of limit when using
method=GET
in the HTML FORM statement and this limit was being exceeded. I changed
the
form statement to method=POST and it is now working correctly.

<snip>

<quote src="rfc2616">
The HTTP protocol does not place any a priori limit on the length of
a URI. Servers MUST be able to handle the URI of any resource they
serve, and SHOULD be able to handle URIs of unbounded length if they
provide GET-based forms that could generate such URIs. A server
SHOULD return 414 (Request-URI Too Long) status if a URI is longer
than the server can handle (see section 10.4.15).

Note: Servers ought to be cautious about depending on URI lengths
above 255 bytes, because some older client or proxy
implementations might not properly support these lengths.
</quote>
Let me just add that your initial post led us all thinking about a
problem you didn't have.
The problems started when I added a dropdown menu to the grid
and when I did the form buttons would not work when there were
a few values in the drop-down.


The form buttons have been working all the time, with 134 records or
248!
The form would be submitted -- that's what the buttons are for.

Dec 10 '05 #10
Vic Spainhower wrote:
The form buttons have been working all the time, with 134 records or 248!
The form would be submitted -- that's what the buttons are for.
Mara,

The problem that I originally stated was "is there a memory limit for HTML
pages?"


No, for pratical purposes, there isn't.
So your problem must be something else.
The form buttons did stop working when I added a dropdown menu to
the table (which was part of the form).
No, they didn't -- and that's my point!
If the buttons had stopped working, changing the method from POST to
GET wouldn't accomplish anything.
Why do you say they were not working
Mara?
See above.
I press the submit button and nothing happens!
Nothing?
The address in the address bar doesn't get crowded?
The server log doesn't show a new request at the time you pressed the
button?
Doesn't the browser get a new page (with the same content)?
That to me is not working.


The way I read your problem it seemed something like

This works
<form action="whatever">
<input type="submit">
</form>

When I add a select it wil not work
<form action="whatever">
<select>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<!-- This is just an example -->
<!-- I'm sure adding a select does not change the input type
-->
<input type="button" value="Submit Query">
</form>
<snip>

Dec 11 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
12994
by: Frank Esser | last post by:
I am using SQL 8 Personal edition with sp2 applied. I set the max server memory to 32MB and leave the min server memory at 0. When my application starts hitting the database hard the memory usage...
16
2845
by: Justin Lazanowski | last post by:
Cross posting this question on the recommendation of an I have a .NET application that I am developing in C# I am loading information in from a dataset, and then pushing the dataset to a grid,...
6
3666
by: Ganesan selvaraj | last post by:
I using C# .net. i want to split the text files based of the some condition. my source text file size may be 4 kb to 4 gb. some time when i split the i got the "out of memory exception. when i...
10
2767
by: p175 | last post by:
Hi folks, I'm after some guidelines on general memory allocations for DB2 8.2.2 ESE on Win2k Server FP4 with 4gb physical memory. Seeing as everything is 32bit and win2k server does not...
0
1836
by: Tomas | last post by:
I have two questions: (1) How (if possible) can you, with ASP.NET (and with the IIS 5 included with win2000) specify an maximum limit of the memory that a web application may consume, as an...
21
2905
by: matvdl | last post by:
I have a system that was originally developed in asp - the pages are saved in SQL (there are over 10,000 pages) and saved to a temp directory in the server when requested by a client. I have...
11
9311
by: noleander | last post by:
Ive got a time-critical application that runs on Windows XP and Unix. I've got some timing issues that Ive traced to virtual memory getting paged in and out. I think I can solve the problem if...
3
5602
by: ningjun.wang | last post by:
I set outputcache to 30 minutes for all .aspx pages on my asp.net 2.0 websites. If a search engine (such as Google) crawl my site, it can hit thousands of pages within a few minutes and thus...
8
1456
by: Just D. | last post by:
I see in many Internet sources that all 32-bit systems are having limitations and can't address above 2 GB limit for the user application reserving 2 GB more for the system. There are some tricks...
0
7100
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6842
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7330
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5434
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4865
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.