I am having the same issue on my Zend Server CE. If I restart Zend Server the
error goes away until I make a change to the Controller file. Here is a
minified controller that is getting the errors.  I see the exact same "Fatal
error: Cannot redeclare class Zend_Controller_Router_Route_Abstract in " as
well

It is very strange and a concern for me as I have a couple projects being
built on ZF exclusively


<?php
class CrawlerController extends Zend_Controller_Action {

    public function init() {
        $this->_helper->viewRenderer->setNoRender();
        $this->_helper->layout->disableLayout();
    }

    public function indexAction() {
        
        $sitestbl = new Model_DbTable_Websites();
        
        $websites = $sitestbl->getWebsites();

        // Loop thru the available sites and crawl
        foreach($websites AS $web){
            $links = array();

            $links = array_merge($links, $this->_buildLinks($web['website'],
2));
                     
        }
        echo "<pre>";
        print_r($links);
    }

    public function _buildLinks($starturl,$depth){
        
        $linkarray = array();
        $currdepth = 0;
        
        // Load Start URL
        $dom = new DOMDocument();
        $pg = @file_get_contents('http://'.$starturl);
        @$dom->loadHTML($pg);
        $xpath = new DOMXPath($dom);

        $aTag = $xpath->query('//a...@href]');
        
        foreach ($aTag AS $val){
                // Add Additional
                $linkarray[] = $val->getAttribute('href');
        }

        return $linkarray;
    } 
}


-- 
View this message in context: 
http://n4.nabble.com/Faltal-Error-with-Controller-Action-on-ZF-tp998248p1010539.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to