Search Results

Search found 4 results on 1 pages for 'keyne'.

Page 1/1 | 1 

  • Zend Studio Debugger returns Application Error

    - by Keyne
    When I run debug for my public/index.php I got an application error as output. I've seen that it occurs at this line: foreach($feed->findFeedEntries($entriesLimit) as $entry) If I put a breakpoint before this, all works as expected, I mean, the error is after the line above. If I remove findFeedEntries() method, I can perform debugging without erros. To clarify, this method is in my row object as described bellow: This is the error <?php class Model_DbTable_FeedEntries extends Zf_Db_Table { public function fetchNewEntries($feed_id) { $Feeds = new Model_DbTable_Feeds(); $Feed = $Feeds->getById($feed_id); // ERROR IS HERE! The colum doesn't exists! // And this is only on zend-debugger!!! var_dump($Feed->link) // ... } } I'm completely lost about what's happening, once my application has no errors, the problem is with zend-debugger. The error is: An error occurred Application error Exception information: Message: Specified column "link" is not in the row Stack trace: #0 C:\Program Files\xampp\htdocs\desenvolvimentistas\application\models\DbTable\FeedEntries.php(75): Zend_Db_Table_Row_Abstract->__get('link') #1 C:\Program Files\xampp\htdocs\desenvolvimentistas\application\models\DbTable\FeedEntries.php(50): Model_DbTable_FeedEntries->fetchNewEntries('1') #2 C:\Program Files\xampp\htdocs\desenvolvimentistas\application\models\DbTable\Row\Feed.php(15): Model_DbTable_FeedEntries->getAllByFeedId('1', 1) #3 C:\Program Files\xampp\htdocs\desenvolvimentistas\application\modules\default\controllers\IndexController.php(41): Model_DbTable_Row_Feed->findFeedEntries(1) #4 C:\Program Files\xampp\htdocs\ZendFramework-1.10.0-minimal\library\Zend\Controller\Action.php(513): IndexController->indexAction() #5 C:\Program Files\xampp\htdocs\ZendFramework-1.10.0-minimal\library\Zend\Controller\Dispatcher\Standard.php(289): Zend_Controller_Action->dispatch('indexAction') #6 C:\Program Files\xampp\htdocs\ZendFramework-1.10.0-minimal\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #7 C:\Program Files\xampp\htdocs\ZendFramework-1.10.0-minimal\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch() #8 C:\Program Files\xampp\htdocs\ZendFramework-1.10.0-minimal\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #9 C:\Program Files\xampp\htdocs\desenvolvimentistas\public\index.php(54): Zend_Application->run() #10 C:\Users\RAPOSO\AppData\Local\Temp\dummy.php(1): include('C:\Program File...') #11 {main} I've notice that when I get the row object my colums names are not right. Instead of have "title", "link", ... I have "feeds", "desenvolvimentistas" (projectname), and so on...

    Read the article

  • Is this way the best solution to read and save images from Rss Feeds?

    - by Keyne
    Hi, I've build a "RSS Feed Reader" module to my application, and for every post with images in the content, I get the first that matches a specific size and then I save for future use as reference to the posts. When processing, everything works properly except when more then 10 images are saved at the same time (This value is variable). I got an 404 error after a while saving the images. Some images are saved, but not all of them. If I run the app in my local server, everything work as expected (using set_timeout(0) to avoid timeout errors). Currently my application is hosted at dreamhost and I'm using Zend Framework. I'm not sure if the problem is specif for Zend Framework applications, so I didn't put any tags about. I've had this problem another time with other projects hosted at dreamhost. They seems to limitate memory for operations like that. My question is: There is a better way to save images then this (maybe in background? a limited amount per operation?): require_once(APPLICATION_PATH . '/../library/simplehtmldom/simple_html_dom.php'); $TableFeeds = new Model_DbTable_Feeds(); $Feeds = $TableFeeds->fetchAll(); foreach($Feeds as $Feed) { $entries = Zend_Feed_Reader::import($Feed->link); $lastEntry = $this->getLastEntry($Feed->id); if($lastEntry) { $lastDate = new Zend_Date($lastEntry->created_at, Zend_Date::ISO_8601); } foreach ($entries as $entry) { if($lastDate) { if(strtotime($lastDate->get('y-M-d H:m:s')) >= strtotime($entry->getDateCreated()->get('y-M-d H:m:s'))) { break; } } $Category = new Model_DbTable_Categorias(); $availableCategories = $Category->getList('slug'); $categoria_id = false; foreach ($categories as $cat) { if(!empty($cat) && !$categoria_id) { $slug = Zf_Convert::slugfy($cat); if($availableCategories[$Feed->categoria_id] == $slug) { $categoria_id = $Feed->categoria_id; break; } if(in_array($slug,$availableCategories)) { $categoria_id = array_search($slug,$availableCategories); break; } } } if(!$categoria_id) { $categoria_id = $Feed->categoria_id; } // Cadastra a entrada $data = array( 'categoria_id' => $categoria_id, 'feed_id' => $Feed->id, 'titulo' => $entry->getTitle(), 'slug' => Zf_Convert::slugfy($entry->getTitle()), 'created_at' => $entry->getDateCreated()->get(Zend_Date::ISO_8601), 'link' => $entry->getLink(), 'html' => $entry->getContent(), 'tags' => $tags ); $entry_id = $this->insert($data); if($categoria_id == 2) { set_time_limit(0); $post_dom = str_get_dom($entry->getContent()); $img_tags = $post_dom->find('img'); $images = array(); foreach($img_tags as $image) { $images[] = $image->src; } if(count($images)) { $i = 0; $saved = false; while($images[$i] && !$saved) { $src = $images[$i]; $imagem = Zf_Image::create($src); $size = $imagem->getCurrentDimensions(); if($size['width'] >= 150 && $size['height'] >= 200) { $imagem->adaptiveResize(200,200); $imagem->save(PUBLIC_PATH . '/img/feeds/manchetes/' . $entry_id . '.jpg'); $saved = true; $this->update(array('imagemChamada' => 1),'id =' . $entry_id); } $i++; } } } } } }

    Read the article

1