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

  • SEARCH
  • Home
  • 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 720241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:44:09+00:00 2026-05-14T05:44:09+00:00

I have a Zend_Form with file element like this: ->addElement(‘file’, ‘image’, array( ‘required’ =>

  • 0

I have a Zend_Form with file element like this:

->addElement('file', 'image', array(
        'required' => false,
        'label' => 'Venue Image',
        'validators' => array(
            array('IsImage', false),
            array('Size', false, '2097152'),
            array('Upload', false),
        ),
    ))

And when I’m using localhost the image is uploaded successfully. But when I move to my hosting the validation error shows for image field. The mimetype of file ‘foto.jpg’ could not be detected. What can be the reason of 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-14T05:44:09+00:00Added an answer on May 14, 2026 at 5:44 am

    same thing happened to me, this was crazy stuff, more than 2 hours trying to figure out what’s wrong, here is how to fix it:

    install fileinfo extension on linux:

    pecl install fileinfo

    then you need to add to your php.ini this line:

    extension=fileinfo.so

    restart your apache and you are done!

    *if you server is freeBSD you have to do this:

    cd /usr/ports/sysutils/pecl-fileinfo/
    make install

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

Sidebar

Related Questions

I have a Form element: $Form=new Zend_Form; $Form->setAction($this->view->url(array('controller'=>'auth','action'=>'create'),null,true)) ->setMethod('post') ->setAttrib('id','auth-form') ->removeAttrib('enctype'); As can be
I have created a form like this: class Form_Login extends Zend_Form { public function
Hi I have problem with File element on my custom zend_form. Thats the code:
I have created this file at My/View/Helper/FormElement.php <?php abstract class My_View_Helper_FormElement extends Zend_View_Helper_FormElement {
I have the following element in my form: $attachment = new Zend_Form_Element_File('attachment'); $attachment->setLabel('Attach File
I have a form that contains and form of which code goes like this
I have a simple Zend-based form with reCaptcha element: $form = new Zend_Form(); $form->setName('forgotpassword')
I have the next element: $email = new Zend_Form_Element_Text('email'); $email->setAttribs(array('class' => 'input-text', 'id' =>
I have the following Zend_Form code to apply to form element decorators: $decorators =
I have been using normal file upload element to upload files and validate them.

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.