WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Can't active this plugin!

[Resolved] Can't active this plugin!

  • The message appear when active:

    Parse error: syntax error, unexpected $end in ../public_html/wp-content/plugins/google-pagespeed-insights/core/admin.php on line 872

    I’ve open file admin.php and go to line 872, but this file only have 871 line.

    My server had already installed PHP 5.3.x and Curl extension, JSON extension.

    Any help me?

    http://wordpress.org/plugins/google-pagespeed-insights/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author mattkeys
    Participant

    @mattkeys

    That is a very strange error that you are getting. the end of the file in question should be a } bracket.

    How are you installing the plugin? If you haven’t already done so, I would remove the plugin, and reinstall it from within WordPress so that it will download a fresh copy from the plugin codex.

    I’ve reinstall many times, but still not resolved.

    And this is your admin.php code:

    http://pastebin.com/0sgE6k6n

    WPyogi
    Forum Moderator

    @wpyogi

    Sorry, but 800+ lines of code is way too much to post on these forums – you need to use a pastebin

    http://codex.wordpress.org/Forum_Welcome#Posting_Code

    Plugin Author mattkeys
    Participant

    @mattkeys

    No need to post the code anyways, I have seen it many times 🙂

    Unfortunately I am not sure what steps to recommend for you. The only times I see the type of error that you are reporting is when there is a syntax error. However a syntax error of that sort should effect everyone equally, and you are the first person to report this issue.

    Does anyone else have experiences with this type of error that would be helpful?

    Plugin Author mattkeys
    Participant

    @mattkeys

    I just came across a suggestion from a google search:

    http://stackoverflow.com/questions/3819487/syntax-error-on-closing-brace-after-opening-a-php-tag

    The bottom answer suggested putting a comment // after the opening of the <?php at the end of the file.

    This makes no sense to me, and I have no way of testing it, but if it works for you let me know.

    This error is not same [http://stackoverflow.com/questions/3819487/syntax-error-on-closing-brace-after-opening-a-php-tag]

    Please to see http://pastebin.com/0sgE6k6n at the line 871 and 872, something wrong

    869: <?php
    870:
    871:}
    872:

    Plugin Author mattkeys
    Participant

    @mattkeys

    You can try erasing the ‘whitespace’ on line 872.

    If that doesnt work you could try adding a close to the PHP line on 872: ?>

    Of course, I’ve tried to adding a close to the PHP line on 872: ?>

    Like this: <?php } ?>, fix not yet.

    Anyone open this file?

    Hey, Matt Keys

    You disclaim your brainchild?

    Plugin Author mattkeys
    Participant

    @mattkeys

    haminhgiap,

    It may just be a language barrier, but your posts are coming across as a bit disrespectful. I would like to remind you that this plugin has been provided to you free of charge, and that any time I spend supporting you is also provided free of charge.

    With that said, you are the only one reporting this issue, and I have been unable to reproduce your problem locally. I am not able to further troubleshoot your issue without looking at your site.

    If you would like to send me access to your wordpress administration area and FTP, I would be willing to take a quick look and see if there is anything obvious that would be causing the problem.

    You can send me that information through my sites contact form if you chose to do so: http://mattkeys.me/about/

    Hi Matt,

    Firstly thanks for this awesome plugin.

    Well your plugin has indeed problems while activation. This is because of php short tags used in a couple of places. I would suggest it to replace “<?” with “<?php” for compatibility in various php environments.

    or the other solution would be to enable php short tags short_open_tag=On in php.ini file and restart Apache.

    Hope that helps.

    Thanks.

    Plugin Author mattkeys
    Participant

    @mattkeys

    Bekar09,

    Thank you so much for posting, this was driving me crazy. I must have accidentally slipped in the use of these short-tags while coding and never noticed because my environment supports them.

    I will fix this in the next release.

    My pleasure Matt. Keep up the good job.

    Sean Hayes
    Participant

    @seanchayes

    Hi Matt,

    I’ve just downloaded the plugin (it was linked to here in 7 Top WordPress plugins) and found this issue in 3 places in the same file.

    core/admin.php lines 382, 385, 388.

    I’ve made the change from “<?” to “<?php” and the plugin activates.

    Hope that helps.

    Sean

    Plugin Author mattkeys
    Participant

    @mattkeys

    Thanks Sean,

    This fix is coming soon along with some minor bug fixes and enhancements, as well as some CSS tweaks to make the plugin look nicer in the new WordPress 3.8 admin interface.

    It is a busier time of the year for me with the holidays, but I hope to have this out soon anyways.

    Also, thanks for pointing out the article that lead you here, I had not seen it yet.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Resolved] Can't active this plugin!’ is closed to new replies.