sasori Posted June 17, 2010 Share Posted June 17, 2010 here's the screenshot of the error here's the function where the Elements.php file was suposed to be called via require() private function getUpdateForm() { //create form $form = new Zend_Form(); $form->setAction('update'); $form->setMethod('post'); $form->setAttrib('sitename','loudbite'); //load elements class require "Form/Elements.php"; $LoudbiteElements = new Elements(); //Create username field $form->addElement($LoudbiteElements->getUsernameTextField()); //create email field $form->addElement($LoudbiteElements->getEmailTextField()); //create password field $form->addElement($LoudbiteElements->getPasswordTextField()); //create textarea for about me $textAreaElement = new Zend_Form_Element_TextArea('aboutme'); $textAreaElement->setLabel('About Me'); $textAreaElement->setAttribs(array('cols'=>15,'rows'=>5)); $form->addElement($textAreaElement); //create submit button $form->addElement('submit','submit'); $submitElement = $form->getElement('submit'); $submitElement->setLabel('Update My Account'); return $form; } here's the directory structure screen shot as you can see the directory is correct but I dunno what's preventing the php file to get recognized Quote Link to comment https://forums.phpfreaks.com/topic/205026-undetected-file-again-help/ Share on other sites More sharing options...
trq Posted June 17, 2010 Share Posted June 17, 2010 The models directory is not on your include path. Quote Link to comment https://forums.phpfreaks.com/topic/205026-undetected-file-again-help/#findComment-1073343 Share on other sites More sharing options...
sasori Posted June 17, 2010 Author Share Posted June 17, 2010 The models directory is not on your include path. even if I place it inside the index.php file, it doesn't help at all, // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( realpath(APPLICATION_PATH . '/../library'), realpath(APPLICATION_PATH. '/models/'), get_include_path(), ))); here's the new error when I placed it on the include_path and refreshed the same page Quote Link to comment https://forums.phpfreaks.com/topic/205026-undetected-file-again-help/#findComment-1073348 Share on other sites More sharing options...
trq Posted June 17, 2010 Share Posted June 17, 2010 The best thing to do with Zend (or any framework really) is to create your own directory for your libraries and keep everything in there, using the same conventions as Zend. The easiest place to put this is probably within the library directory right next to the Zend directory. Quote Link to comment https://forums.phpfreaks.com/topic/205026-undetected-file-again-help/#findComment-1073353 Share on other sites More sharing options...
sasori Posted June 17, 2010 Author Share Posted June 17, 2010 The best thing to do with Zend (or any framework really) is to create your own directory for your libraries and keep everything in there, using the same conventions as Zend. The easiest place to put this is probably within the library directory right next to the Zend directory. am sorry but it didn't really work 1) I place the Form directory inside the library directory 2) I tried placing the Elements.php file alone beside the Zend folder within the library ..based from your tip, this should have work but i still get the same error as posted on the screenshot Quote Link to comment https://forums.phpfreaks.com/topic/205026-undetected-file-again-help/#findComment-1073390 Share on other sites More sharing options...
Cagecrawler Posted June 23, 2010 Share Posted June 23, 2010 It's looking for application-error/index.phtml, while your directory structure looks to be applicationerror/index.phtml. Check for a typo. Quote Link to comment https://forums.phpfreaks.com/topic/205026-undetected-file-again-help/#findComment-1076210 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.