Search code examples
phpzend-frameworkzend-formfatal-errorzend-form-sub-form

Class 'Zend_Form_Subform' not found


What could be the possible reason for getting

Fatal error: Class 'Zend_Form_Subform' not found 
in /path/application/forms/formName.php on line 2

on a remote server when things are working fine locally. The problem is only with Zend_Form_Subform and rest all other forms (without any subform) and views are working fine.

Am i missing something under application.ini for subforms?


Solution

  • This is most likely a case-ing error. Please update your class name to Zend_Form_SubForm (notice the capital F).

    It probably works on localhost because you are running Windows (?) which is case-insensitive, but when you deploy, you are probably deploying on UNIX (?) which is case-sensitive.