Title: Getting Parse Error &#8211; Unexpected EOF
Last modified: September 1, 2016

---

# Getting Parse Error – Unexpected EOF

 *  [DPGrant](https://wordpress.org/support/users/dpgrant/)
 * (@dpgrant)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/getting-parse-error-unexpected-eof/)
 * When I press FIX CATEGORY COUNT, I am getting the following error:
    “Parse error:
   syntax error, unexpected end of file in C:\xampp\htdocs\wordpress\wp-content\
   plugins\fix-category-count\inc\fix_category_count_admin_view.php on line 68”.
   Nothing else appears. Please advise. Thanks. WP 4.5.3, Twenty Sixteen theme, 
   no other plugins active.
 * [https://wordpress.org/plugins/fix-category-count/](https://wordpress.org/plugins/fix-category-count/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Jem Turner](https://wordpress.org/support/users/jemmie/)
 * (@jemmie)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/getting-parse-error-unexpected-eof/#post-8159104)
 * Having the same problem, WP4.6
 *  [vsego](https://wordpress.org/support/users/vsego/)
 * (@vsego)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/getting-parse-error-unexpected-eof/#post-8472642)
 * I got the same problem, and here is the **solution**:
 * In the file `fix-category-count/inc/fix_category_count_engine.php` replace all
   –`
   <?=` with `<?php echo` – `<?` (should be just one) with `<?php`.
 * This is because the author was using the short versions of the `<?php` tag (`
   <? ... ?>` for code and `<?= ... ?>` for outputs) that are usually disabled by
   default (and, if enabled, they can cause some collisions).
 * I’d also suggest adding `?>` to the end of the other two PHP files, even though
   it’s not strictly necessary.
    -  This reply was modified 9 years, 6 months ago by [vsego](https://wordpress.org/support/users/vsego/).
 *  [tzkmx](https://wordpress.org/support/users/tzkmx/)
 * (@tzkmx)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/getting-parse-error-unexpected-eof/#post-8769917)
 * Thanks [@vsego](https://wordpress.org/support/users/vsego/)! This solves the 
   problem.
 *  [KZeni](https://wordpress.org/support/users/kzeni/)
 * (@kzeni)
 * [9 years ago](https://wordpress.org/support/topic/getting-parse-error-unexpected-eof/#post-9138760)
 * Correction for the fix above, you need to edit the `inc/fix_category_count_admin_view.
   php` file for this.
 * Here’s a link to a GitHub Gist I created with the patched files: [https://gist.github.com/KZeni/5f7c14e4ea988e09d3daa8507daac1bf#file-inc-fix_category_count_admin_view-php](https://gist.github.com/KZeni/5f7c14e4ea988e09d3daa8507daac1bf#file-inc-fix_category_count_admin_view-php)
 * My gist above also modified the main `fix_category_count.php` file to not force
   a text color on the admin navigation item and modified the `inc/fix_category_count_engine.
   php` file to be more compatible with different WP database table prefixes per
   [https://wordpress.org/support/topic/issue-in-update_category_correct_count/](https://wordpress.org/support/topic/issue-in-update_category_correct_count/)
 * It would be great to see this plugin updated to incorporate these patches.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Getting Parse Error – Unexpected EOF’ is closed to new replies.

 * ![](https://ps.w.org/fix-category-count/assets/icon-256x256.png?rev=3439373)
 * [Fix Category Count](https://wordpress.org/plugins/fix-category-count/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fix-category-count/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fix-category-count/)
 * [Active Topics](https://wordpress.org/support/plugin/fix-category-count/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fix-category-count/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fix-category-count/reviews/)

## Tags

 * [bug fix](https://wordpress.org/support/topic-tag/bug-fix/)

 * 4 replies
 * 5 participants
 * Last reply from: [KZeni](https://wordpress.org/support/users/kzeni/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/getting-parse-error-unexpected-eof/#post-9138760)
 * Status: not resolved