Page 1 of 1
flickr sidebar plugin error
Posted: Wed Jan 28, 2009 2:43 pm
by yellowled
Trying to test the flickr sidebar plugin in my local test blog, I get:
Code: Select all
Warning: serendipity_plugin_flickr::require_once(Flickr/API.php) [serendipity-plugin-flickr.require-once]: failed to open stream: No such file or directory in /var/www/s9y-lab/plugins/serendipity_plugin_flickr/serendipity_plugin_flickr.php on line 146
Fatal error: serendipity_plugin_flickr::require_once() [function.require]: Failed opening required 'Flickr/API.php' (include_path='.:/usr/share/php:/usr/share/pear:/var/www/s9y-lab/bundled-libs/:/var/www/s9y-lab/bundled-libs/Smarty/libs/:/var/www/s9y-lab/:') in /var/www/s9y-lab/plugins/serendipity_plugin_flickr/serendipity_plugin_flickr.php on line 146
What's wrong here? Line 146 of that file is:
Code: Select all
if (require_once('Flickr/API.php')) {
The plugin isn't configured yet (API keys etc), but this doesn't look like a configuration error, does it?
YL
Posted: Wed Jan 28, 2009 2:57 pm
by gimmel
That's funny. Just today I wanted to start a iPhone webcam on my blog with Pixelpipe and flickr. I installed the plugin and it „crashed” my website. It's not possible to delete the flickr plugin from the admin interface, because it's garbled, too. I had to delete it via FTP.
Has the plugin an expiration date today? Or are me and yellowled the first to try it at all? (on the same day by accident?)
Posted: Wed Jan 28, 2009 3:06 pm
by judebert
Hmm. Sorry I'm not all that familiar with Flickr, but the PHP error is reasonably understandable.
It's trying to load up the API.php file from the Flickr/ directory. It'll search your entire PHP include_path to find it.
Now, your provider has control over your include_path. Usually it contains the current directory, listed as ".". To find our what your include_path is, just create this little PHP file on your webserver and run it:
The output will tell you a lot about your PHP installation, including the include_path. The directories will be separated by colons. PHP (and therefore s9y) will look for the file in each of those directories.
So, what's "."? Usually it's the directory of the currently-executing PHP file. According to your warning, that's /var/www/s9y-lab/plugins/serendipity_plugin_flickr/serendipity_plugin_flickr.php, so "." is /var/www/s9y-lab/plugins/serendipity_plugin_flickr/. Is there a /var/www/s9y-lab/plugins/serendipity_plugin_flickr/Flickr/API.php? The message implies that there isn't.
So, after writing all this, I find the plugin at look at the README. It says you need to follow the directions at
http://code.iamcal.com/php/flickr/readme.htm to get the thing to work. That's about installing the PEAR Flickr API. PEAR is to PHP what SPARTACUS is to S9Y, essentially. Most providers include PEAR, but most don't provide the Flickr API. Yours certainly doesn't.
Instead, you'll want to download the package listed in the INSTALLATION section and unzip it into your plugins/serendipity_plugin_flickr/ directory. Then things should start working.
Posted: Wed Jan 28, 2009 3:09 pm
by judebert
gimmel wrote:That's funny. Just today I wanted to start a iPhone webcam on my blog with Pixelpipe and flickr. I installed the plugin and it „crashed” my website. It's not possible to delete the flickr plugin from the admin interface, because it's garbled, too. I had to delete it via FTP.
Has the plugin an expiration date today? Or are me and yellowled the first to try it at all? (on the same day by accident?)
No, others have had trouble with it, too. I don't remember anybody's site "crashing", but maybe those people just give up and never come back. :(
Many of the problems we've seen stem from not installing the Flickr API package, as stated in the README. However, we've also seen version incompatibility errors. No developer has taken the time to improve the plugin; it worked when it was first released, and that's it.
Posted: Wed Jan 28, 2009 11:14 pm
by gimmel
The Flickr-Plugin should be banned from Spartacus.
- You only have to copy the plugin to the plugins folder and Serendipity (1.4) will not be able to show the plugin page in the admin area anymore. No others plugins are causing such errors. It seems to be very buggy.
- The readme file is not visible if you install the plugin with spartacus. So nearly nobody knows that the plugins needs special libraries to be installed.
Posted: Thu Jan 29, 2009 10:52 am
by garvinhicking
Hi!
I've changed the plugin to no longer "require" the API file, but "include" it. This will then not result in a fatal fail.
I believe we cannot bundle the Flickr-API library because it doesn't allow to be bundled. Correct me if I'm wrong.
If you run PHP5, try the serendipity_plugin_flickrbadge plugin.
HTH,
Garvin
Posted: Thu Jan 29, 2009 1:41 pm
by gimmel
The PHP Flickr-API used in the Flickr plugin can be bundled.
Copyright
Unless otherwise noted, all code on this site is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
You can find this text on the bottom of the
authors website.
But even with the Flickr/API.php installed in bundled-libs, I get an error:
Code: Select all
require_once(XML/Tree.php): failed to open stream: No such file or directory
So I googled for XML/Tree.php and installed this, too. But Tree.php requires XML/Parser.php and XML/Tree/Node.php
It's not easy to find all this stuff when you are not an PEAR expert like me. But now where everything is installed, Serendipity does not show anything. Safari tells me
Safari kann die Seite „
http://local.dreikaisers.de/“ nicht öffnen, da der Server die Verbindung unerwartet beendet hat. Dies tritt manchmal auf, wenn ein Server überlastet ist.
Good to know…
This plugin should not be available in an automatic installer like Spartacus.
I try to do a new plugin based on
phpFlickr. It's easier and comes with all files it depends on.
serendipity_plugin_flickrshow
Posted: Fri Jan 30, 2009 11:57 am
by gimmel
Here's a new flickr plugin I made yesterday. It works without dependencies. Could somebody help me beta-testing?
serendipity_plugin_flickrshow
Re: serendipity_plugin_flickrshow
Posted: Fri Jan 30, 2009 12:26 pm
by garvinhicking
Hi!
Have you checked the serendipity_plugin_flickrbadge? I believe it should do quite similar, but has a more lightweight API...?
Regards,
Garvin
Posted: Fri Jan 30, 2009 1:16 pm
by gimmel
Yes, I've tried serendipity_plugin_flickrbadge and it works.
But it's not able to choose the size of the images, the image link target and it has no cache.
serendipity_plugin_flickrshow has the same gui and possibilities of serendipity_plugin_flickr. And it works out of the box.
Posted: Fri Jan 30, 2009 1:19 pm
by garvinhicking
Hi!
Okay, I understand.
IMHO the best way would be to unify all three plugins (or at least serendipity_plugin_flickr and flickrshow) into one plugin, and offer the user a choice which API to use (and select phpFlickr by default for no dependencies).
Any volunteers?
Best regards,
Garvin
Posted: Fri Jan 30, 2009 1:25 pm
by gimmel
Does it make any sense to switch the API-Class if they all do the same?
Posted: Fri Jan 30, 2009 1:32 pm
by garvinhicking
Hi!
If your plugin can provide exact the same functionality like serendipity_plugin_flickr, then of course it would not make sense to maintain serendipity_plugin_flickr any longer,I fully agree.
serendipity_plugin_flickrbadge AFAIR has a specific lightweigt API that could be useful in situations where someone in the future may want to enhance the existing plugin...
Regards,
Garvin
Posted: Fri Jan 30, 2009 2:54 pm
by gimmel
garvinhicking wrote:serendipity_plugin_flickrbadge AFAIR has a specific lightweigt API that could be useful in situations where someone in the future may want to enhance the existing plugin...
phpFlickr is that easy, I did the plugin in a hour. With a two year old child beside me! That's NOT easy

I'm still working on some enhancements (adjustable alignment, image captions). I hope I'm done tomorrow.
Re: flickr sidebar plugin error
Posted: Mon May 18, 2009 2:41 pm
by gimmel
Wow, it took a long time, but now the flickrShow plugin is complete. You can find it
here.