Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6169103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:47:58+00:00 2026-05-23T22:47:58+00:00

I am using fancy box iframe to display my page which has the file

  • 0

I am using fancy box iframe to display my page which has the file upload button. when i click form submit i got the “File exceeds the defined ini size”. i checked some of links under google and stackoverflow. But not able to find. I have enctype="multipart/form-data" in my form. Following is my code

public function createForm($data = array())
    {
        $this->setMethod(Zend_Form::METHOD_POST);
        $this->setEncType(Zend_Form::ENCTYPE_MULTIPART);
                $this->setAttrib('id', 'createsub');
            $this->setAction(
              $this->getView()->getHelper('url')->url(array(
                'controller' => 'test',
                'action'     => 'create'
              ))
            );  

        $this->setDecorators(array(
              'Description',
              'FormElements',
              'Form'
        ));

        $fnameNotEmpty = new Zend_Validate_NotEmpty();
        $fnameNotEmpty->setMessage('Name cannot be empty.');
        $fnameStrlen = new Zend_Validate_StringLength(1, 20);

        $name = new Zend_Form_Element_Text('name', array(
          'label' => 'Name:',
          'value' => '',
          'class' => 'text-size text',
          'tabindex' => '1',
          'required' => true,
          'validators' => array(
                array($fnameNotEmpty, true),
                array($fnameStrlen, true)
          ),
      'decorators' => $this->requiredElementDecorators,
      'description' => '<img src="../../'.$baseurl.'/images/star.png" alt="required" />',
          'filters' => array('StringTrim')
        ));
        $this->addElement($name);

....         .....           .....

        $brochure = new Zend_Form_Element_File('brochure', array(
          'label' => 'Brochure:*',
          'value'   => '',
          'class' => 'text-size text',
          'tabindex' => '3',
          'required' => true,
          'filters' => array('StringTrim')
        ));
        $this->addElement($brochure);




            $submit = $this->createElement('button','addtbtn',array('class'=>'Test','label'=>'Create'));
            $submit->setIgnore(true);
    $this->addElement($submit);
        return $this;
    }

Also if i did not use iframe, I can able to upload my image…Very Strange.

I make the validation using Ajax by following code ,

<script type="text/javascript">
var Path="<?php echo $this->eurl; ?>"
$(function()
{
    vReg=0
    $("#addtbtn").click(function()
    {
        if(vReg == 1)
        {
            return true;
        }
        else{
        var url = 'validateform';
        var data = {};
        $("input").each(function()
        {
            data[$(this).attr('name')] = $(this).val();
        });
        $("select").each(function()
        {
            data[$(this).attr('name')] = $(this).val();
        });
        $("textarea").each(function()
        {
            data[$(this).attr('name')] = $(this).val();
        });
                $.post(url,data,function(resp)
        {
            vError=""
            for(id in resp){
                oResp=resp[id];
                for(key in oResp){
                    vError +=oResp[key]+"\n"
                }
            }
            if(vError == ''){
                vReg=1
                                 $("#createform").attr('target','_top');
                 $("#createform").submit();
                                return true;
            }
            else{
                                $("#createform").attr('target','_self');
                alert(vError)
                                return false;
                            }
        },'json');

        }
    });
});

</script>

Also Has the following function in my controller

    public function validateformAction()
{
    $this->_helper->viewRenderer->setNoRender();
    $this->_helper->getHelper('layout')->disableLayout();

        $p      = new Admin_Model_DbTable_Test();
        $p      = $p->getData();

        foreach($p AS $k => $v)
        {
            $p[$v['catid']] = $v['name'];
        }

        $form = new Admin_Model_Form_SubTest();
        $f = $form->createForm(array('parents' => $p));
    $f->isValid($this->_getAllParams());
    $json = $f->getMessages();
    echo Zend_Json::encode($json);
}

So this will call the function which i gave on the top of the post and do the validation and return the error.But here i always getting "File exceeds the defined ini size " What I done wrong this code.

Kindly help me on this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:47:59+00:00Added an answer on May 23, 2026 at 10:47 pm

    Check the upload_max_filesize setting in your .ini file(s). That’s where this error comes from.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using fancybox to show Iframe within it like this.. $(document).ready(function() { $(#button).click(function()
I have a page, with a form, and I'd like to display a fancybox
Has anyone got EclipseLink MOXy (I'm using eclipselink 2.1.0) to work with Java 5?
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
Using C#, I need a class called User that has a username, password, active
I need to embed an iframe on different domain, that when click opens a
I am using fancybox to open submitted form like this: <form name=form id=myForm action={$smarty.server.PHP_SELF}?action=abc
I'm using fancybox 1.2.1 to open an iframe. My problem is my width, height

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.