Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-15-2008, 07:08 AM
Member
 
Join Date: Jun 2007
Posts: 33
Default Zend_Form issue that makes no senese

Here's my include path: set_include_path('.' . PATH_SEPARATOR . './library/' . PATH_SEPARATOR . './application/forms/' . PATH_SEPARATOR . './application/models/' . PATH_SEPARATOR . get_include_path());

I've verified that the Forms.php file in in the Zend folder locally and on the server.

Here is the error I get: Fatal error: Class 'Zend_Form_Element_Text' not found in /home/tplgame/public_html/application/forms/RegisterForm.php on line 11

This makes absolutely no sense to me. I'm including the file but for some reason it isn't seeing it or something. If anyone can help it would be greatly appreciated.

Here's my form:
PHP Code:

Zend_Loader
::loadClass('Zend_Form');

class 
RegisterForm extends Zend_Form
{
    public function 
__construct($options null)
    {
        
parent::__construct($options);
        
$this->setName('register');
        
        
$username = new Zend_Form_Element_Text('username');
        
$username->setLabel('Username')
            ->
setRequired(true)
            ->
setValidators('NotEmpty');
            
        
$username = new Zend_Form_Element_Text('email');
        
$username->setLabel('Email Address')
            ->
setRequired(true)
            ->
setValidators('NotEmpty');
            
        
$password = new Zend_Form_Element_Password('password');
        
$password->setLabel('Password')
            ->
setRequired(true)
            ->
setValidators('NotEmpty');
            
        
$confirm_password = new Zend_Form_Element_Password('confirm_password');
        
$confirm_password->setLabel('Confirm Password')
            ->
setRequired(true)
            ->
setValidators('NotEmpty');
            
        
$submit = new Zend_Form_Element_Submit('submit');
        
$submit->setLabel('Register');
        
        
$this->addElements(array($username$email$password$confirm_password$submit));
    }

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 10:08 PM
Junior Member
 
Join Date: Mar 2008
Posts: 7
Default

Just a quick comment. are you sure the server has permissions to that file? You problem looks very much like a permission problem.
I usually set the group to www-data (the server) and grant full rights to owner and group
Code:
sudo chgrp -R www-data <folder name>
sudo chmod -R 774 <folder name>
Just be ware: '-R' means recursive, that is rights are ganted to all subfolders and files as well.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-15-2008, 11:30 PM
Member
 
Join Date: Jun 2007
Posts: 33
Default

If it was a permissions problem I wouldn't be able to load any of those files, and the site wouldn't run since 5 or so of those classes are loaded on the index page. I know what you're saying though, there doesn't appear to be any issues with syntax or anything.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:46 AM.