1

I am trying to use simplepie on a basic page. so I download simplepie from the simplepie site and set it up just like it says in documentation. I am using xampp on windows vista business sp2. I create 2 folders php and cache in my root directory and put the simplepie.inc file in php. when I run my code I get these errors:

Deprecated: Assigning the return value of new by reference is deprecated in C:\Users\PDG-PC\xampp\htdocs\rssproject\php\simplepie.inc on line 738

Deprecated: Assigning the return value of new by reference is deprecated in C:\Users\PDG-PC\xampp\htdocs\rssproject\php\simplepie.inc on line 1108 Strict Standards: Non-static method SimplePie_Misc::fix_protocol() should not be called statically, assuming $this from incompatible context in C:\Users\PDG-PC\xampp\htdocs\rssproject\php\simplepie.inc on line 834

Strict Standards: Non-static method SimplePie_Misc::normalize_url() should not be called statically, assuming $this from incompatible context in C:\Users\PDG-PC\xampp\htdocs\rssproject\php\simplepie.inc on line 9317

the first errors run about 20 lines and the later errors another 10 lines. I am using simplepie 1.2.1 and xampp 1.7.7. is there anything that I am missing or should know about?

Joseph Izang
  • 766
  • 1
  • 13
  • 43

3 Answers3

2

EDITED:

Okay: take a look at the developer's comment here: https://github.com/simplepie/simplepie/issues/127

You would need to 1.3-dev version to address this issue.

"This is a result of our PHP 4 compatibility and will not be fixed in the one-dot-two branch. To remove these, use the master branch (1.3-dev), as it drops PHP 4 compatibility."


Please look at John Crockford's solution from the page: Assigning the return value of new by reference is deprecated

you might need to replace all the instances of =& new with = new in the simplepie.inc file.

Community
  • 1
  • 1
Shadow_boi
  • 2,178
  • 2
  • 21
  • 26
0

SimplePie is PHP 4 code, you are running PHP 5, a more recent version.

Your PHP version informs you about deprecated (outdated, will be removed in the future) and in-appropriate language use resulting in the strict standards warnings.

First of all, log the errors to the error log and don't output them to the browser.

Then you can lower the reporting level and exclude deperecated and strict-standard warnings, see error_reportingDocs.

You can configure all this in your php.ini or at runtime, see this manual page.

The upcoming SimplePie version 1.3 will be PHP 5 compatible.

hakre
  • 193,403
  • 52
  • 435
  • 836
0

Try using the latest version from the SimplePie github repository: https://github.com/simplepie/simplepie

Michael Robinson
  • 29,278
  • 12
  • 104
  • 130