• Hi:

    I just tried to install this, and when I tried to activate the plugin, I got the message:

    Plugin could not be activated because it triggered a fatal error.
    
    Parse error: syntax error, unexpected T_STRING in /home/jaweinberger/dsthree.com/wp-content/plugins/two-factor-auth/two-factor-login.php on line 21

    I”m using WP 3.5.1 with PHP 5.3

    Help?

Viewing 5 replies - 1 through 5 (of 5 total)
  • It seems that your PHP version doesn’t support namespaces.
    Can you please download this file and upload as a plugin and try to install and activate: http://cl.ly/3O1k2R1B1f1c

    I removed the namespaces in that version.

    Thread Starter jweinberger

    (@jweinberger)

    Thank you!

    When I went to check on my PHP version at my web host, I noticed that they made 5.4 available, so I asked them to move me to 5.4.

    They did, and I tried activating the plug in again, and it worked fine. I have tested using it and playing with the settings as well and all seems fine.

    So I chose to continue with the standard release rather than the version you linked above. Sorry that it took some work to do that, but I think – hope – that’s the right choice.

    Thank you for your help!

    Perfect!

    Yes, if you want future updates you made the right choice 🙂

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    oskarhane: If you’re limiting it to a specific PHP version, you might want to put an activation check in front of the code to prevent it from being installed and the namespace code from being run by older versions.

    I do something similar to this here:
    http://plugins.svn.wordpress.org/simple-facebook-connect/trunk/sfc.php

    Samuel: Yes, of course. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Two Factor Auth: PHP error trying to activate’ is closed to new replies.