zend的问题,调用未定义的函数libxml


Problems with zend, call to undefined function libxml

我开始使用zend框架并试图提交一个表单,我得到这个错误消息:致命错误:调用未定义函数libxml_disable_entity_loader()在/usr/local/zendframework/library/Zend/Xml/Security.php第85行

谁能帮助我,请提前谢谢你。:)

Controller.php

public function addAction()
{
    $this->view->title = "Agregar album";
    $this->view->headTitle($this->view->title);
    $form = new Application_Form_Album ();
    $form->submit->setLabel('Agregar Album');
    $this->view->form = $form;
    if ($this->getRequest()->isPost())
    {
        $formData = $this->getRequest()->getPost();
        if ($form->isValid($formData))
        {
            $artista_id = $form->getValue('artista_id');
            $nombre = $form->getValue('nombre');
            $fecha = $form->getValue('fecha');
            $descripcion = $form->getValue('descripcion');
            $fecha = $this->fechaMysql($fecha);
            $albums = new Application_Model_DbTable_Album ();
            $albums->agregar($artista_id, $nombre, $fecha, $descripcion);
            $this->_helper->redirector('index');
        }
        else
        {
            $form->populate($formData);
        }
    }
}

Form.php

<?php
class Application_Form_Album extends Zend_Form
{
    public function init()
    {
        $this->setName('albums');
        $id = new Zend_Form_Element_Hidden('id');
        $id->addFilter('Int');
        $nombre = new Zend_Form_Element_Text('nombre');
        $nombre->setLabel('Nombre del album:')->setRequired(true)->
            addFilter('StripTags')->addFilter('StringTrim')->
            addValidator('NotEmpty');
        $artista = new Zend_Form_Element_Select('artista_id');
        $artista->setLabel('Seleccione artista:')->setRequired(true);
        $table = new Application_Model_DbTable_Artista();
        foreach ($table->listar() as $c)
        {
            $artista->addMultiOption($c->id, $c->nombre);
        }
        $descripcion = new Zend_Form_Element_Text('descripcion');
        $descripcion->setLabel('Descripcion:')->setRequired(false)->addFilter('StripTags')->addFilter('StringTrim');
        $fecha = new Zend_Form_Element_Text('fecha');
        $fecha->setLabel('Fecha lanzamiento:')->setRequired(true)->addFilter('StripTags')->
            addFilter('StringTrim')->addValidator('NotEmpty');
        $valiDate = new Zend_Validate_Date();
        $valiDate->setFormat('dd-mm-YYYY');
        $fecha->addValidator($valiDate);
        $fecha->setValue(date("d-m-Y"));
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');
        $this->addElements(array($id, $nombre,
            $artista, $descripcion, $fecha, $submit));
}

}

View.phtml

<div class="formContainer">
    <?php echo $this->form ?>
</div>

我怀疑这是你的问题:http://framework.zend.com/issues/browse/ZF-12442