bradcampbell
Member
Posted 1 year 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/
are you sure you have the latest version of EM (3.0.3)?
bradcampbell
Member
Posted 1 year ago #
Yea 3.0.3, just downloaded it last night.
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.
bradcampbell
Member
Posted 1 year ago #
Nope nothing. Pretty much a fresh, installed it maybe a week or two ago. Oh well.
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?
oh, and update to the newest version 3.0.4 which was released yesterday.
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.
Can you give me the error? I need to know what exactly is breaking it, as it works fine on our tests.
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
... and I get this error when I try to activate the plugin (=fatal error).
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.
bradcampbell
Member
Posted 1 year 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
bradcampbell
Member
Posted 1 year 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
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.
bradcampbell
Member
Posted 1 year 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?
bradcampbell
Member
Posted 1 year 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.
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.
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)
MacDoodle
Member
Posted 1 year ago #
Not able to upgrade - is there a fix for php 4 users?
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.
MacDoodle
Member
Posted 1 year 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.
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.
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.
billc108
Member
Posted 1 year 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?
admintiger
Member
Posted 1 year ago #
EM 3.0.7 installs and runs without errors here using PHP 5.2.14.
billc108
Member
Posted 1 year 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.
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.
billc108
Member
Posted 1 year 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)
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