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?
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:
Sorry, but 800+ lines of code is way too much to post on these forums – you need to use a pastebin –
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?
I just came across a suggestion from a google search:
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
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?
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/
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=Onin php.ini file and restart Apache.
Hope that helps.
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.
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.
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.
- The topic ‘Can't active this plugin!’ is closed to new replies.