aaemnnosttv / wp-cli-login-command

Log in to WordPress with secure passwordless magic links.
https://aaemnnost.tv/wp-cli-commands/login/
MIT License
292 stars 47 forks source link

syntax error, unexpected 'class' #27

Closed oberonlai closed 5 years ago

oberonlai commented 5 years ago

Hello~

When I run 'wp login xxx', and It said syntax error, unexpected 'class' of aaemnnosttv/wp-cli-login-command/command.php on line 11. My wp cli version is latest. Did I do something wrong?

aaemnnosttv commented 5 years ago

Hi there, it sounds like an issue with the autoloader.

How did you install the package?

oberonlai commented 5 years ago

Hi,

I install package through wp package install.

I use the script below:

"/opt/plesk/php/7.2/bin/php -d memory_limit=512M "$(which wp)" package install aaemnnosttv/wp-cli-login-command”

Is it correct?

感謝您的支持,有任何問題歡迎與我們聯絡! 服務時間:星期一~星期五 10:00~19:00 — WordPress 顧問 - 賴俊吾 Oberon Lai © 2018 Hellowp

On Nov 23, 2018, 3:59 PM +0800, Evan Mattson notifications@github.com, wrote:

Hi there, it sounds like an issue with the autoloader. How did you install the package? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aaemnnosttv commented 5 years ago

Yes that looks correct.

Are you sure you are executing the wp login xxx command with PHP version 5.5 or higher? The error you are citing looks like a pre-5.5 error. I see you are installing the command with PHP 7.2, but what do you see when you run wp --info without specifying the full path to the php binary?

oberonlai commented 5 years ago

You got it. My php version is 5.4. I will upgrade my php version. Thanks for help!

感謝您的支持,有任何問題歡迎與我們聯絡! 服務時間:星期一~星期五 10:00~19:00 — WordPress 顧問 - 賴俊吾 Oberon Lai © 2018 Hellowp

On Nov 23, 2018, 7:46 PM +0800, Evan Mattson notifications@github.com, wrote:

Yes that looks correct. Are you sure you are executing the wp login xxx command with PHP version 5.5 or higher? The error you are citing looks like a pre-5.5 error. I see you are installing the command with PHP 7.2, but what do you see when you run wp --info without specifying the full path to the php binary? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aaemnnosttv commented 5 years ago

Glad we were able to figure it out 😄 Cheers!