Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/j12bunk/public_html/hexicon/wp-content/plugins/lastfm-for-artists/lastfm-for-artists.php on line 376
Any ideas much appreciated! Brand new installation of wordpress, this is the first thing I did!
it seems you’ve tried to run the plugin under php 4. There are certain syntactic restrictions on how to program object-oriented in php 4, where in php 5 one can shorten the code quite a bit. It’s just a matter of a simple edit to fix this particular error, but there will be further errors like this on many other lines.
So the only way this can be fixed immediately is to switch to a more recent version of php, which is always a good idea.
If you run your website on a shared webhosting provider, there might be an option to use php 5 by default somewhere in your admin area.
If you don’t know how to check you version of php just create a empty textfile named
phpinfo.phpand put this single line of code into it:
<?php phpinfo() ?>
Then upload it and view this file in your browser. This will reveal a huge insight in the php configuration of your web hosting, including the php version number.
If you’ve got further problems regarding the plugin a link to this file will help me a lot tackling the problem.
ps. I appreciate every single vote on my plugin – once you get it to function, of course.
I’ve got the same problem. this is my php info:
i cannot – under no circumstances – update to php5. with these premises, can i use your plugin somehow. its just what I am looking for…
yeah – you found the right thread, the php version is the reason for the failure.
Mmhh… is there really such a great demand for using the plugin with php4? Then I maybe have to dig into this and release the next version compatible with php 4. But I guess this won’t be that easy.
Anybody also interested in using this plugin with php4, pleasy reply here!
I looked into this last night and I’ve got bad news. It’s not just about some shorthand coding style, there are also some php5 features which are used in the core of my plugin, namely the new built-in
dom-xmlfunctions, which are quite easy to use for someone who has developed with the Domcument Object Model before.
For supporting php before version 5 I would have to do massive modifications which would certainly result in a much heavier plugin. So my honest apologies for you all, but I can’t support anything before php 5.
But if you are interested only the event lists, give Simon Wheatleys Last.FM Events a try. I used his plugin as a starting point ’cause I wanted more customization possibilities. Unfortunately you have to edit the code to retrieve artist events and not user events but it’s as simple as searching in
ws.audioscrobbler.com/1.0/user/$username/events.icsand replacing with
Hope this helps a little,
that helps a lot. especially the hint how to change user to artist. thank you so much, iLL try it immediately. though iLL miss the fancy googlemapFeature. but in 2 or months i can change to php5 and then go back to your plugin.
hmpf. thats what it says after i “save changes” to update the new widget. there is something about “snoopy”… is it php5 problem again??? (plugin activation worked out nicely)
Fatal error: Cannot instantiate non-existent class: snoopy in /home/c/comeus.de/public_html/blog/wp-content/plugins/lastfm-events/lfm_events.php on line 32
Sorry I didn’t reply earlier, many thing to care about currently…
Your problem is weird: snoopy is a wordpress component, which is used to retrieve remote files. WordPress itself uses it to retrieve the feeds displayed on the dashboard, so it really SHOULD be there…
I took another look in the plugin file and actually the error should occur on line 48…
Are you sure you installed the most recent version? Did the plugin work before my suggested modification?
The plugin requires a wordpress file called
rss.phpto get access to the mentioned component. This requirement is stated on line 43, so everything should be fine. You might want to check if there is something messed up with your copy of the file.
I suggest the following:
- re-install the original plugin and try if it works out of the box
- if not, you maybe should contact the author, but I used this plugin myself, I swear! And as far as I know, there are no php5 dependencies.
- if it works, try to do change the mentioned url, and really nothing else, on one single line of the file.
- still no luck? reply here again (and prepare an email with the changed plugin file)
I’m sorry you’ve got no luck with this, but I doubt we won’t get to work!
I managed to get rid of the Snoopy error by adding the following like after the comments section:
include “/path on your webserver/wp-includes/class-snoopy.php”;
replace path on your webserver with the right path.
- The topic ‘[Plugin: Last.fm For Artists] Plugin could not be activated because of a fatal error’ is closed to new replies.