474,047 Members | 9,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can one set post_max_size in form?

I dont have access to my php.ini file so I am trying the following
which doesn't seem to work:

<input type=hidden name=post_max_s ize value=100000>

I know it can be done for file uploads, but can it be done for posting
data?

Sep 17 '06 #1
1 4336
If you're using Apache, you can try setting LimitRequestBod y to the
desired limit in bytes. For example: "LimitRequestBo dy 100000". This is
available in .htaccess as well as the global configuration. See
http://httpd.apache.org/docs/1.3/mod...mitrequestbody

You can also try setting PHP's post_max_size directive in apache if
php.ini is off-limits. For example: "php_value post_max_size 100000".
See http://us3.php.net/manual/en/ini.cor....post-max-size

Another option is to use client-side browser validation. You can set
the maxlength attribute on a text field or use javascript to check the
length of a textarea before submitting. These limits could be bypassed
by a user determined to do so however. An example of client-side input
length checking:

<script type="text/javascript">
<!--
// Don't allow more than length chars
function checkTextareaLe n(textarea, length)
{
if (textarea.value .length length) {
textarea.value = textarea.value. substring(0, length)
}
}
//-->
</script>

<form method=post>

<input name=text1 maxlength=5 <!-- Browser should limit text1 to 5
chars -->

<textarea name=text2
onKeyDown="chec kTextareaLen(th is, 20)"
onKeyUp="checkT extareaLen(this , 20)"
onChange="check TextareaLen(thi s, 20)"
></textarea>
<input type=submit>

</form>

See here for a more advanced script that allows you to set maxlength on
textarea elements: http://www.quirksmode.org/dom/maxlength.html

Best Regards,

John Peters

ve*****@yahoo.c om wrote:
I dont have access to my php.ini file so I am trying the following
which doesn't seem to work:

<input type=hidden name=post_max_s ize value=100000>

I know it can be done for file uploads, but can it be done for posting
data?
Sep 17 '06 #2

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

Similar topics

2
6204
by: Ken | last post by:
How can I recover from total files uploaded is greater than post_max_size? 8M When total file size uploaded is greater that the post_max_size, sessionid() is lost. Sessionid does not carry through to the called page. This happens wether I upload 2 x 4.7M files or 6 x 1.6M files. Is there a way around this?
3
5671
by: John | last post by:
Dear all, It been more than 3 days I am trying to debug this program, I interpret it using activePerl and it is giving (perl -wc code_process.pl) no error syntax but when I put it online, change to the appropriate mode and test the html form it gave me an 500 internel server error. I really need it to be done soon, I would not post here before I test it as much as I can,
5
6111
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the Internet. Specifically, marking up a document that will contain multiple related form controls (intended exclusively for client-side scripting) that would never be intended to be submitted. I realise that that concept is a non-starter in an Internet...
4
2154
by: Targa | last post by:
Trying to total some price fields in a form but doesnt work when all the referenced form fields dont exisit. This is for an invoice - pulled prom a database and the form doesnt always contain the same amount of Line Items. If I have all 20 Line Items, it works great. var sub1 = form.Line_Item_Subtotal1.value var sub2 = form.Line_Item_Subtotal2.value var sub3 = form.Line_Item_Subtotal3.value var sub4 = form.Line_Item_Subtotal4.value
25
10321
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
19
3627
by: Raposa Velha | last post by:
Hello to all! Does any of you want to comment the approach I implement for instantiating a form? A description and an example follow. Cheers, RV jmclopesAThotmail.com replace the AT with the thing you know ;-) After discovering that access 2000 support form properties (I'm a
11
18871
by: Jozef | last post by:
I have some old code that I use from the Access 95 Developers handbook. The code works very well, with the exception that it doesn't seem to recognize wide screens, and sizes tab controls so that they are too big and wind up covering up some of the fields on the main form. Is there any good code out there that works in a similar fashion that will also either a) stretch the form width wise on widescreens or b), rely on height rather than...
2
7099
by: MagicMyth | last post by:
Hi all, I’m creating a site that allows file uploads to registered users. I’ve got a system in place where if the user uploads a overly large file that it would automatically warn them off the offence and keep a record of it, if it was way over the file size limit I allow for (naturally the file is destroyed as well). If they continued to try to upload large files they would receive a temp ban. This relies on the system being able to determine...
1
2403
by: jamesm6162 | last post by:
Hi Suppose for a moment that you do NOT have access to the php.ini file.... Okay, now, I have a form to upload images and it does contain the MAX_FILE_SIZE hidden input field, and it does appear before the file upload input field. It sets the max upload size to roughly 3MB The current value of the php directive post_max_size is only 2M. If I try to upload a file of about 6MB, it gives me the error:
0
10550
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10350
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
12038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
11145
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10317
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7876
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6842
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5423
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 we have to send another system
3
3976
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.