Support » Plugin: Reference 2 Wiki » [Plugin: Reference 2 Wiki] Parse error happened

  • When I updated using auto update to version 0.21, then happened parse error when activated.
    Then ftp the extract files to plug-in directory, but the result is the same.
    It says

    Plugin could not be activated because it triggered a fatal error.
    Parse error: syntax error, unexpected T_STRING in {my-server}/wp-content/plugins/reference-2-wiki/reference2wiki.php on line 31

Viewing 13 replies - 1 through 13 (of 13 total)
  • Same problem here.



    I also have the same issue; had to revert to a backup of my site as I use this plugin extensively, any chance of a fix of the latest version?

    Plugin Author flashpixx


    Check your PHP version. The 0.21er version uses PHP namespaces which are supported on PHP 5.3.0 first and later version. You need an update of PHP

    Sorry for the late answer, but I’m very busy at the moment

    That would explain a lot; my host is running php 5.2.17, I will ask if they can upgrade the php software, if they can’t I’ll just have to keep using the previous version of the plugin, it’s too much work to go back and strip out the code from all my previous posts.

    Plugin Author flashpixx


    I can create, if there enough people, a fork of the newest version that works without namespaces, so you can run it under PHP 5.2. But I’m thinking that is only a “time solution”, because there are also a lot of security patches in PHP and 5.2 is out-of-date.
    See the namespaces are added 2009-06-30, so I think 3 years are a lot of time to update.


    I resolved the PARSE ERROR issue on my host (Bluehost), there’s an option in cPanel to change php version.

    Log into cPanel from the BlueHost website, goto Software/Services -> PHP Config -> there you’ll have a choice of php 5.2, 5.3 or 5.4.

    I suspect other hosts will have a similar system, log into your control panel and have a look around, or call/email your host.

    Problem resolved in my case, probably due to host PHP updates.

    Plugin Author flashpixx


    Greate thanks to all 😛
    I have made a mistake, because I don’t write any information to PHP 5.3. IMHO the update information “uses namespaces” should be enough, so on this changes I will write the information explicite in the future.

    Interestingly enough, I am on BlueHost too, but the switch to PHP 5.3 in the BlueHost config did not solve the problem for me. I verified using phpinfo() that the server is indeed picking up the 5.3 version of PHP. Any thoughts?

    BTW, this is a great idea and I am glad you (flashpixx) took the trouble to implement it.

    Plugin Author flashpixx


    @ravisarma: Can you post a log entry or anything else (php.log) ? I need a detailed error message, but I run on all my system PHP 5.3 so I can’t reproduce the error.


    @flashpixx, unfortunately I have nothing more in the logs beyond the line:

    PHP Parse error: syntax error, unexpected T_STRING in /.../wp-content/plugins/reference-2-wiki/reference2wiki.php on line 31

    I can turn on more logging/debugging if you let me know what I should do.

    @flashpixx, please ignore. I created a test script with a namespace specified and moved it around to see where the issue cropped and it turns out to have to do with the way PHP is configured (AddHandler) for multi-site setups at my hosting provider (BlueHost). I changed the config and that fixed the problem. Thank you.

    Plugin Author flashpixx


    Thanks for this information 🙂

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: Reference 2 Wiki] Parse error happened’ is closed to new replies.