<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: File size error message?</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: File size error message?</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 01:26:39 +0000</pubDate>

<item>
<title>Jackson on "File size error message?"</title>
<link>https://www.machform.com/forums/topic/file-size-error-message#post-6216</link>
<pubDate>Mon, 15 Jun 2009 13:49:11 +0000</pubDate>
<dc:creator>Jackson</dc:creator>
<guid isPermaLink="false">6216@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I figure it out at last.... I should NOT set the post_max_size in php.ini &#60;/p&#62;
&#60;p&#62;Just modify the config.php, common-validator.php, and post-function.php&#60;/p&#62;
&#60;p&#62;Thank you so much.
&#60;/p&#62;</description>
</item>
<item>
<title>Jackson on "File size error message?"</title>
<link>https://www.machform.com/forums/topic/file-size-error-message#post-6199</link>
<pubDate>Sat, 13 Jun 2009 10:13:45 +0000</pubDate>
<dc:creator>Jackson</dc:creator>
<guid isPermaLink="false">6199@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I must be missing something...  what I've done is:&#60;/p&#62;
&#60;p&#62;- insert into config.php&#60;br /&#62;
ini_set('post_max_size', '100000');&#60;br /&#62;
ini_set('upload_max_filesize', '100000'); &#60;/p&#62;
&#60;p&#62;- insert into php.ini&#60;br /&#62;
post_max_size = 100000&#60;br /&#62;
upload_max_filesize = 100000&#60;/p&#62;
&#60;p&#62;- edit the includes/common-validator&#60;br /&#62;
inserted the above code&#60;/p&#62;
&#60;p&#62;- edit includes/post-function.php&#60;br /&#62;
inserted the above code&#60;/p&#62;
&#60;p&#62;Yes the php.ini stops any files larger than 100kb from uploading, but still no error message.
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "File size error message?"</title>
<link>https://www.machform.com/forums/topic/file-size-error-message#post-6194</link>
<pubDate>Fri, 12 Jun 2009 19:34:16 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">6194@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hmmm .. you should put those code in &#34;config.php&#34; file
&#60;/p&#62;</description>
</item>
<item>
<title>Jackson on "File size error message?"</title>
<link>https://www.machform.com/forums/topic/file-size-error-message#post-6188</link>
<pubDate>Fri, 12 Jun 2009 09:58:08 +0000</pubDate>
<dc:creator>Jackson</dc:creator>
<guid isPermaLink="false">6188@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;May I ask where to find the settings.php so that I can insert the two lines of code?&#60;br /&#62;
ini_set('post_max_size', '100000');&#60;br /&#62;
ini_set('upload_max_filesize', '100000');
&#60;/p&#62;</description>
</item>
<item>
<title>NLA on "File size error message?"</title>
<link>https://www.machform.com/forums/topic/file-size-error-message#post-4097</link>
<pubDate>Mon, 29 Dec 2008 20:00:05 +0000</pubDate>
<dc:creator>NLA</dc:creator>
<guid isPermaLink="false">4097@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thank you very much.  That worked great.
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "File size error message?"</title>
<link>https://www.machform.com/forums/topic/file-size-error-message#post-4089</link>
<pubDate>Mon, 29 Dec 2008 13:27:34 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">4089@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;You can add another validation by editing some files, but you still need to set &#34;post_max_size&#34; value.&#60;br /&#62;
First Edit your &#34;includes/common-validator.php&#34; and add these code around line 29 :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//validation for required file
	function validate_max_file($value){
		$error_message = &#38;quot;You can not upload more that 2 Kb&#38;quot;;
		$element_file = $value[0];

		if($_FILES[$element_file][&#38;#39;size&#38;#39;] &#38;lt; 2000){
			return true;
		}else{
			return $error_message;
		}
	}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;after that, edit your &#34;includes/post-function.php&#34; and search around line 804, you will see these code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$rules[$element_name][&#38;#39;filetype&#38;#39;] 	= true;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62; exactly below that code , add this code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$rules[$element_name][&#38;#39;max_file&#38;#39;] 	= true;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>NLA on "File size error message?"</title>
<link>https://www.machform.com/forums/topic/file-size-error-message#post-4082</link>
<pubDate>Mon, 29 Dec 2008 04:20:25 +0000</pubDate>
<dc:creator>NLA</dc:creator>
<guid isPermaLink="false">4082@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I searched forum and found fix to limit file types in config.php.  I'm now looking for fix for max file size.  I tried several of the answers and was only able to get it to work by creating a php.ini file, and then uploading it to the root of install.  The file contains the following:&#60;/p&#62;
&#60;p&#62;-----------&#60;/p&#62;
&#60;p&#62;php.ini file:&#60;br /&#62;
post_max_size = 100000&#60;br /&#62;
upload_max_filesize = 100000&#60;/p&#62;
&#60;p&#62;settings.php:&#60;br /&#62;
ini_set('post_max_size', '100000');&#60;br /&#62;
ini_set('upload_max_filesize', '100000');&#60;/p&#62;
&#60;p&#62;-----------&#60;/p&#62;
&#60;p&#62;It stops larger files from uploading, but no error message is displayed like when wrong file type is used.  It just returns user back to the form with uploads field blank.  I don't have access to php.ini on server, and that is why I created one to put in Machform directory.&#60;/p&#62;
&#60;p&#62;Any ideas on how to return an error message to the user within the form?&#60;/p&#62;
&#60;p&#62;Otherwise the software works great and I am glad I found your site.  Thanks.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
