Fatal error for Feed_Parser_Model.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Fatal error for Feed_Parser_Model.

Eric-131

Hi everyone,
I am try to set a RSS parser for my project. And I follow the steps as
follow.
http://www.thinkingphp.org/2006/06/14/cakephp-rss-20-feed-parser-model/


BUT I got an fatal error like this "Fatal error: Call to undefined
function curl_init() in D:\Program
Files\xampp\htdocs\cake\app\web_model.php on line 91"

Can anyone help me to figure it out?

And Also I try the SimplePie for CakePHP, ALSO, got error message like
can't use SIMPLE_ITEMS.

Is there any tutorial or sample for rookie like me to show how to do it
?

Thanks.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Fatal error for Feed_Parser_Model.

Eric-131

When I add this to pass the items to $feed.

<?php foreach ($feeddata['items'] as $feed): ?>
<div>
<h3><?php echo $feed['title']; ?></h3>
<p><?php echo $feed['description']; ?></p>
</div>
<?php endforeach; ?>

There is an error mentioned
Fatal error: Cannot use object of type SimplePie_Item as array in
D:\Program Files\xampp\htdocs\cake\app\views\feed\index.thtml on line 6

Can't use object of type SimplePie_item?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Fatal error for Feed_Parser_Model.

Daniel Hofstetter
In reply to this post by Eric-131

Do you have installed the curl module?  Do a phpinfo() to see if it is
listed. If it is not listed, you have to install it (I don't know how
to do that on Windows).

HTH

--
Daniel Hofstetter
http://cakebaker.42dh.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Fatal error for Feed_Parser_Model.

Eric-131

Thank God! My xampp is great. Very easy to enable cURL.
http://www.menyhart.net/blog/developer-stuff/enabling-curl-on-xampp/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Fatal error for Feed_Parser_Model.

cadraig
In reply to this post by Daniel Hofstetter

Following from Daniels suggestion, there should be a line in your
php.ini file that you need to uncomment...  search for curl in php.ini
and uncomment the line.  Restart the server and it should just work.
Make sure you edit the right php.ini file though.  If you've got
something like XAMPP installed you can have more than one.  When I was
first doing this I was editing the Xampp/php.ini file, and not the
correct one under the apache directory.  I was tearing my hair out for
about 3 hours until I realised this!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Fatal error for Feed_Parser_Model.

Eric-131

AND, How Can I use Mysql to store the URL? ;

To creat a new normal model or modify the exist model related to
webmodel?
A table contains id(pk), title, url.
Modify the feeds_controller to
function index()
        {
 $this->set('feeds',$this->Rss->findAll());
        }
But How to do the view fiels?

Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Fatal error for Feed_Parser_Model.

Chris Hartjes

On 11/1/06, Eric <[hidden email]> wrote:

>
> AND, How Can I use Mysql to store the URL? ;
>
> To creat a new normal model or modify the exist model related to
> webmodel?
> A table contains id(pk), title, url.
> Modify the feeds_controller to
> function index()
>         {
>  $this->set('feeds',$this->Rss->findAll());
>         }
> But How to do the view fiels?
>
> Thanks

http://manual.cakephp.org/chapter/views

--
Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Fatal error for Feed_Parser_Model.

Eric-131

I don't think it is that simple just watch the manual....

It define findAll() in the Rss.php like function findAll($feedUrl,
$limit = 10, $cacheExpires = null).


So, How Can I do it ?



Chris Hartjes wrote:

> On 11/1/06, Eric <[hidden email]> wrote:
> >
> > AND, How Can I use Mysql to store the URL? ;
> >
> > To creat a new normal model or modify the exist model related to
> > webmodel?
> > A table contains id(pk), title, url.
> > Modify the feeds_controller to
> > function index()
> >         {
> >  $this->set('feeds',$this->Rss->findAll());
> >         }
> > But How to do the view fiels?
> >
> > Thanks
>
> http://manual.cakephp.org/chapter/views
>
> --
> Chris Hartjes
>
> "The greatest inefficiencies come from solving problems you will never have."
> -- Rasmus Lerdorf
>
> @TheBallpark - http://www.littlehart.net/attheballpark
> @TheKeyboard - http://www.littlehart.net/atthekeyboard


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Fatal error for Feed_Parser_Model.

Eric-133

Is there someone tried it before?

So,any advice to do it ?

Appreciate any relpy!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---