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 6364359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:09:12+00:00 2026-05-25T00:09:12+00:00

Iam suffering from Zend_validate ,when ever I write a form and try to add

  • 0

Iam suffering from Zend_validate ,when ever I write a form and try to add validators , the only thing that works for me if I submit the form with no values , it will show error msg , but if I submit good values it will stuck for sometime and then give fatal error msg saying Maximum execution time 30 seconds is exceeded in /Applications/MAMP/htdocs/MyApplicationFolderName/library/Zend/Validate/Hostname.php on line 608
Please help my controller action code is

public function createAction()
  {
    // action body

    $roleService=new User_Service_RoleService($this->em);



    $userForm=new User_Form_UserForm($roleService->listAllRoleNames());
    $userForm->startForm();

    $userForm->setAction('create');
    $userForm->setMethod('post');



    if($this->getRequest()->isPost() )
    {
        if($userForm->isValid($this->getRequest()->getPost()))
        {
        $this->userAccountService->createUser($this->getRequest()->getParams());
        $this->_forward('confirm');
        }

    }





    $this->view->form=$userForm;



}

and my form class code is

class User_Form_UserForm extends Zend_Form {
//put your code here

private $roles;

public function __construct($options = null) {
    parent::__construct($options);


    $this->roles=$options;


}


public function startForm()
{

    $idForm=new Zend_Form_Element_Hidden('id');
    $this->addElement($idForm);

     ///////////          
    $userEmailForm=new Zend_Form_Element_Text('email');
    $userEmailForm->setRequired(TRUE);
    $userEmailForm->setLabel('Email');

    $emailValidator=new Zend_Validate_EmailAddress();

   // $emailValidator->setOptions(array('domain' => FALSE));


    $userEmailForm->addValidator($emailValidator,false);

    $userEmailForm->setAttrib('size', 25);

    $userEmailForm->setFilters(array(new Zend_Filter_StringToLower(),
                                     new Zend_Filter_StringTrim())

                               );

    $this->addElement($userEmailForm);



}



 }

This is small part of my form its so simple but not working Iam using MAMP PHP 5.3.5 because of Doctrine2 and name spaces

Please any help will be really appreciated .

Note I also tried other validators like string length and the same error showed.

  • 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-25T00:09:13+00:00Added an answer on May 25, 2026 at 12:09 am

    “I actually just found the answer to this one:

    The version of PHP 5.3 that ships with MAMP has a bug in
    iconv_strlen() that causes a “do { … } while (false);” loop in the
    validator to run infinitely. I just switched my PHP version to 5.2, as
    it’s closer to production anyway, and it works. If you need the 5.3,
    though, you will have to upgrade your PHP installation in MAMP. I
    haven’t tried it, but the following link was highly recommended:

    http://www.davidgolding.net/cakephp/upgrading-php-in-mamp.html

    Hope that all helps.”

    Source: http://forum.mamp.info/viewtopic.php?f=2&t=12189

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

Sidebar

Related Questions

It would appear that I am suffering from a new bug in IE7, as
I am using codeigniter php framework. I am suffering from the problem that all
I'm debugging a bit of Javascript that was suffering from a little closure trouble
I seem to be suffering from some fundamental misunderstanding of the way that GWT
I have a thread that needs to write data from an in-memory buffer to
I am pretty sure I am suffering from memory leakage, but I havent 100%
Iam looking to write a C# application to alert the user when he gets
iam using a simple insert script function to pass the values from registration html
iam trying to get all object's xpath's from loaded page via selenium something similar
Iam trying to retrieve data from mysql database into stylesheet.php but it is not

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.