Page 2 of 2
Re: »Heavy Rotation« - Your top album in the last week
Posted: Fri Apr 24, 2009 10:47 am
by garvinhicking
Hi!
Actually the plugin code instructs to only cache for an hour. Can you check your templates_c directory? It should contain a "serendipity_plugin_heavyrotation.txt" file, check its last modiufication time?
Regards,
Garvin
Re: »Heavy Rotation« - Your top album in the last week
Posted: Sun Apr 26, 2009 4:25 pm
by mo
user@server1:/html/blog/templates_c$ ls -la serendipity_plugin_heavyrotation.txt
-rw-r--r-- 1 user user 72 2009-04-15 12:28 serendipity_plugin_heavyrotation.txt
When I delete the file (or create an empty new one), the sidebar doesn't display at all. I have tried reinstalling the plugin, but that doesn't help (nor does it create a new cache file for it).
Re: »Heavy Rotation« - Your top album in the last week
Posted: Mon Apr 27, 2009 11:36 am
by garvinhicking
Hi!
If the sidebar does not display, this would mean a fatal PHP error. HAve you looked inside the PHP error log and/or the HTML sourcecode to check for PHP errors?
To me it sounds as if the file cannot be written anymore, maybe due to permissions or a change in the server setup.
Regards
Garvin
Re: »Heavy Rotation« - Your top album in the last week
Posted: Mon Apr 27, 2009 12:58 pm
by mo
[27-Apr-2009 12:56:33] PHP Fatal error: Uncaught exception 'serendipity_plugin_heavyrotation_albumhandler_chickeneggproblem' with message 'Could not read image from a file. Error was: File /var/www/htdocs/web51/html/blog/templates_c/serendipity_plugin_heavyrotation.txt does not exists' in /var/www/htdocs/web51/html/blog/plugins/serendipity_plugin_heavyrotation/lib/albumhandler.php:208
Stack trace:
#0 /var/www/htdocs/web51/html/blog/plugins/serendipity_plugin_heavyrotation/plugin.inc.php(137): serendipity_plugin_heavyrotation_albumhandler->getInstance()
#1 /var/www/htdocs/web51/html/blog/include/plugin_api.inc.php(847): serendipity_plugin_heavyrotation->generate_content(' ')
#2 /var/www/htdocs/web51/html/blog/include/functions_smarty.inc.php(599): serendipity_plugin_api::generate_plugins('right')
#3 /var/www/htdocs/web51/html/blog/templates_c/carl_modified^%%0F^0FE^0FEECB36%%index.tpl.php(77): serendipity_smarty_printSidebar()
#4 /var/www/htdocs/web51/html/blog/bundled-libs/Smarty/libs/Smarty.class.php(1255): include('/var/www/htdocs...')
#5 /v in /var/www/htdocs/web51/html/blog/plugins/serendipity_plugin_heavyrotation/lib/albumhandler.php on line 208
I've played around with various permissions, but it doesn't help. Other cached content can be written fine. If i create the file with a simple "touch", the error message stays the same. If I edit the file and put *anything* in it, the sidebar displays (no php errors). If I then change the file date to some older date, I get the following error:
[27-Apr-2009 13:07:44] PHP Fatal error: Uncaught exception 'serendipity_plugin_heavyrotation_albumhandler_chickeneggproblem' with message 'Could not read image from a file. Error was: Metadata exists, but image is not fetched. So reread the whole stuff.' in /var/www/htdocs/web51/html/blog/plugins/serendipity_plugin_heavyrotation/lib/albumhandler.php:208
Stack trace:
#0 /var/www/htdocs/web51/html/blog/plugins/serendipity_plugin_heavyrotation/plugin.inc.php(137): serendipity_plugin_heavyrotation_albumhandler->getInstance()
#1 /var/www/htdocs/web51/html/blog/include/plugin_api.inc.php(847): serendipity_plugin_heavyrotation->generate_content(' ')
#2 /var/www/htdocs/web51/html/blog/include/functions_smarty.inc.php(599): serendipity_plugin_api::generate_plugins('right')
#3 /var/www/htdocs/web51/html/blog/templates_c/carl_modified^%%0F^0FE^0FEECB36%%index.tpl.php(77): serendipity_smarty_printSidebar()
#4 /var/www/htdocs/web51/html/blog/bundled-libs/Smarty/libs/Smarty.class.php(1255): include('/var/www/htdocs...')
#5 /var/www/htdocs/web51/html/blog/bu in /var/www/htdocs/web51/html/blog/plugins/serendipity_plugin_heavyrotation/lib/albumhandler.php on line 208
Re: »Heavy Rotation« - Your top album in the last week
Posted: Mon Apr 27, 2009 1:09 pm
by garvinhicking
Hi!
Sadly I don't know much of the plugin. Currently it seems like it cannot recreate the .txt file as long as your "uploads" directory was recently modified; this is where the images for heavrotation are saved, and the code checks this as well.
If you edit the plugin.inc.php file and change:
Code: Select all
if (file_exists($handler->getPath()) or file_exists($handler->getImagePath())) {
to:
Code: Select all
if (file_exists($handler->getPath())) {
then the plugin should hopefully properly recreate the .txt file, and also update it accordingly.
HTH,
Garvin
Re: »Heavy Rotation« - Your top album in the last week
Posted: Mon Apr 27, 2009 1:17 pm
by mo
Thanks for trying to help, but that doesn't change anything

It's not
that important, I can live without the plugin...
Re: »Heavy Rotation« - Your top album in the last week
Posted: Mon Apr 27, 2009 1:20 pm
by garvinhicking
Hi!
Hm, I'm really sorry for this. On my installation it basically works, so I'm not sure which could be the exact reason here. I could offer to have a look at your installation, if you can/want to provide me with FTP access to the site. Contact me via PM, if you'd like to try that.
Best regards,
Garvin
Re: »Heavy Rotation« - Your top album in the last week
Posted: Fri May 08, 2009 4:45 pm
by mo
thanks for trying to help. again, it's not refreshing since you reinstalled it on my blog.

also, avatars seem to be broken. because they're also cached, this might be the same cause?
Re: »Heavy Rotation« - Your top album in the last week
Posted: Sun Jan 31, 2010 6:07 am
by mo
i'd be grateful for help, i still experience the same problem, the cache file doesn't seem to get updated:
Code: Select all
web@server:/html/blog/templates_c$ ls -la serendipity_plugin_heavyrotation.txt
-rw-r--r-- 1 web web 50 2009-08-17 19:39 serendipity_plugin_heavyrotation.txt
drwxrwxrwx 4 web web 4096 2010-01-31 06:07 templates_c
drwxrwxrwx 19 web web 4096 2010-01-31 05:08 uploads
Re: »Heavy Rotation« - Your top album in the last week
Posted: Sun Jan 31, 2010 12:18 pm
by garvinhicking
Hi!
It's hard to say without access to the server.... the permissions look okay if your PHP user is 'web'.
Regards,
Garvin
Re: »Heavy Rotation« - Your top album in the last week
Posted: Mon Feb 01, 2010 1:05 pm
by lama
when i look at this:
Code: Select all
-rw-r--r-- 1 user user 72 2009-04-15 12:28 serendipity_plugin_heavyrotation.txt
and this:
Code: Select all
drwxrwxrwx 4 web web 4096 2010-01-31 06:07 templates_c
drwxrwxrwx 19 web web 4096 2010-01-31 05:08 uploads
i am getting an idea of the error
[add]
but if that doesnt help you, tell php to log errors perhaps will help.
in your php.ini change error_reporting:
Code: Select all
# cat /etc/php5/apache2/php.ini | grep error_reporting | grep -v ";"
error_reporting = E_ALL & ~E_NOTICE
in your .htaccess insert:
Code: Select all
php_value error_reporting 2047
php_value display_errors 0
php_value log_errors 1
php_value error_log /path/to/php.log
of course /path/to/php.log has to be writeable by your webserver, "user" or "web", whatever it is;-)
Re: »Heavy Rotation« - Your top album in the last week
Posted: Mon Feb 01, 2010 1:49 pm
by mo
the user names are consistent within the respective posts, both times i have edited my real username. you are right, i should have used the same edited name to avoid confusion.
i don't get any php errors logged until i delete the .txt , then i get
[01-Feb-2010 13:43:59] PHP Fatal error: Uncaught exception 'serendipity_plugin_heavyrotation_albumhandler_chickeneggproblem' with message 'Could not read image from a file. Error was: File /var/www/htdocs/web51/html/blog/templates_c/serendipity_plugin_heavyrotation.txt does not exists' in /var/www/htdocs/web51/html/blog/plugins/serendipity_plugin_heavyrotation/lib/albumhandler.php:208
if i manually edit the heavyrotation.txt and chance it to a different artist/album, i don't get any errors logged, but the picture isn't downloaded/displayed.