WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
Getting a Parse Error when trying to activate plugin. (37 posts)

  1. bradcampbell
    Member
    Posted 3 years ago #

    Getting this error when I try to activate the plugin. Using WP 3.0.1 and PHP 5.2

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /home/kevin74/public_html/phoenixsportclub/dev/wp-content/plugins/events-manager/ajax.php on line 8

    Is there something that can be removed or needs to be changed to get this to work?

    http://wordpress.org/extend/plugins/events-manager/

  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    are you sure you have the latest version of EM (3.0.3)?

  3. bradcampbell
    Member
    Posted 3 years ago #

    Yea 3.0.3, just downloaded it last night.

  4. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    I can't see anything wrong on that line, otherwise I think we'd get a lot more complaints about this. Could you try re-installing?

    Also, if you have any other event plugins installed, at least deactivate them.

  5. bradcampbell
    Member
    Posted 3 years ago #

    Nope nothing. Pretty much a fresh, installed it maybe a week or two ago. Oh well.

  6. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    I'm curious as to the problem here...

    Can you break line 8 up into this:

    $booked_seats = $EM_Event->get_bookings()->get_booked_seats();
    $available_seats = $EM_Event->get_bookings()->get_available_seats();
    echo "[{bookedSeats:". $booked_seats. ", ";
    echo "availableSeats:". $available_seats ."}]";

    and inform me of any errors you get?

  7. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    oh, and update to the newest version 3.0.4 which was released yesterday.

  8. muirin
    Member
    Posted 3 years ago #

    I have the very same problem. Installed the newest version about an hour ago, no other calendar scripts/plugins running.

    Sadly I still got the same error after breaking up the line like you suggested.

  9. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    Can you give me the error? I need to know what exactly is breaking it, as it works fine on our tests.

  10. muirin
    Member
    Posted 3 years ago #

    Thank you for your super quick response!

    It's indeed the very same, as far as I can judge:

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /www/htdocs/w00886f5/larc/wordpress/wp-content/plugins/events-manager/ajax.php on line 8

  11. muirin
    Member
    Posted 3 years ago #

    ... and I get this error when I try to activate the plugin (=fatal error).

  12. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    much easier to keep on top of it when we get email notifications :)

    if you contact me on http://netweblogic.com/contact/ and provide ftp details and admin user credentials I'll have a look and see

    also, please confirm that you're having this issue when activating, and/or not on other occassions.

  13. bradcampbell
    Member
    Posted 3 years ago #

    Yes I was having the problem when trying to activate it. No other plugins were installed. I'll try breaking that line up and see what happens

  14. bradcampbell
    Member
    Posted 3 years ago #

    Tried it and still getting the same error.

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/kevin74/public_html/phoenixsportclub/dev/wp-content/plugins/events-manager/ajax.php on line 8

  15. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    I can't duplicate this issue, I need a site I can test this on where the problem shows. If you can contact me on the link above I'll have look.

  16. bradcampbell
    Member
    Posted 3 years ago #

    So from what it looks like the server didn't have a specific version of php configured. It was enabled but set on a system default setting, even though the cpanel was showing it running php 5.2. I enabled php 5 and everything seems to be working now.

    Only thing is now I'm having an issue with displaying a list of events. It keeps defaulting to 5 even when set it to display 1 event. Is this a known issue?

  17. bradcampbell
    Member
    Posted 3 years ago #

    Never mind I figured out an alternative solution.

    Muirin, check to see if php is configured correctly on your server. That seems to be what was giving me that error. It was also preventing another plugin from working properly.

  18. muirin
    Member
    Posted 3 years ago #

    Thanks for noticing this. My server is indeed running under a PHP4 version right now, so tonight I'm going to switch to 5. I'll let you know if it works for me then.

  19. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    Yup, I was going to ask your php version but since you said 5.x in your first post I was quite puzzled as to why (although in theory it should still work for php4)

  20. MacDoodle
    Member
    Posted 3 years ago #

    Not able to upgrade - is there a fix for php 4 users?

  21. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    I advise you upgrade. You host should do this for you, and if they don't, I advise you to move hosts :) WP is only supporting php5 as of next year, so at one point we'd be doing the same anyway.

    I'll try to check this out, but given that only 5% of wordpress users are using php v4 it's not a priority.

  22. MacDoodle
    Member
    Posted 3 years ago #

    Unfortunately the host is not going to upgrade until after the first of the year. Moving would take several days with the size of the site and is pointless to do if the upgrade is going to happen in less than two months.

    In the mean time -- I'm stuck with a non-functioning "Events" page on a busy site.

    It might be helpful to others if there were a warning that the upgrade DOES NOT work with PHP 4.

  23. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    I'd say they're a few years too late :)

    I'd be willing to have a look at this issue provided there aren't huge incompatibilities and if you give me access to some server space with php4. See contact link above.

  24. muirin
    Member
    Posted 3 years ago #

    I've now switched to PHP5 on my server and the script is running smoothly. Guess we can say for sure now that this error occurred because of an outdated PHP version.

  25. billc108
    Member
    Posted 3 years ago #

    I'm running PHP 5.3.3

    Just tried installing 3.0.7 and get:

    Fatal error: Cannot redeclare em_load_event() (previously declared in (...)/wp-content/plugins/events-manager3.0.7/events-manager.php:139) in (...)/wp-content/plugins/events-manager3.0.7/events-manager.php on line 152

    All other WP plugins are turned off.

    Any ideas?

  26. admintiger
    Member
    Posted 3 years ago #

    EM 3.0.7 installs and runs without errors here using PHP 5.2.14.

  27. billc108
    Member
    Posted 3 years ago #

    Glad to hear it's working for you. Honest, I am.

    But we're not likely to downgrade PHP from 5.3.3, which is the current stable version. There are other sites on the server which require it.

  28. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    sounds to me like you've installed something twice. you're meant to have only an events-manager folder, not events-manager3.0.7 I'd say check your plugin folder first.

  29. billc108
    Member
    Posted 3 years ago #

    Ah. That was it. Glad it was something so simple.

    (I had several versions in there that I was trying out and wanted to keep them straight)

  30. newhyn
    Member
    Posted 3 years ago #

    I obtain this errore in activation:

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /web/htdocs/www.reameincantato.it/home/ilgrv/wp-content/plugins/events-manager/ajax.php on line 8

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic