error message PHP Parse error: syntax error, unexpected '[' after update version in elastica

17 views
Skip to first unread message

Jorge von Rudno

unread,
Dec 6, 2016, 9:53:11 AM12/6/16
to Elastica - Elasticsearch PHP Client
Dear Colleges

I am trying to use a script where I use elastica in order to access elasticsearch. I have test the script in my development environment and when I try to run it in production I get the following error message:
PHP Fatal error:  Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]])

I have google this error and found that it is an issue solved. So I have update elastica to Release 5.0.0-beta1. My first question is if can I use with this realese elasticsearch 2.3 or if I have to update it to version 5.


My second question is that after update elastica, I try to run my script but I get an error message "PHP Parse error:  syntax error, unexpected '[' ". How can I do?

ruflin

unread,
Dec 6, 2016, 9:57:41 AM12/6/16
to Elastica - Elasticsearch PHP Client
Which version of Elastica do you use currently? For the 2.x elasticsearch releases you need Elastica 3.x. As far as I remember the above issue is fixed there. For 5.0.0 you will also need elasticsearch 5.0.

What is your PHP version?
Reply all
Reply to author
Forward
0 new messages