Title: Parse error: syntax error, unexpected $end
Last modified: August 30, 2016

---

# Parse error: syntax error, unexpected $end

 *  Resolved [Anon M. Verte](https://wordpress.org/support/users/mverte/)
 * (@mverte)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end-22/)
 * Plugin could not be activated because it triggered a fatal error.
 * Parse error: syntax error, unexpected $end in /public_html/wp-content/plugins/
   delete-thumbnails/delete-thumbnails.php on line 225
 * Sorry, but as I can repair this error
 * [https://wordpress.org/plugins/delete-thumbnails/](https://wordpress.org/plugins/delete-thumbnails/)

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

 *  [tdmalone](https://wordpress.org/support/users/tdmalone/)
 * (@tdmalone)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end-22/#post-6586734)
 * This is an oversight in the plugin – it uses PHP short tags which aren’t enabled
   on every server.
 * You can either get these enabled through use of php.ini or (maybe) .htaccess,
   or you can manually edit the plugin file, replacing every instance of `<?=` with`
   <?php echo` and every instance of `<?` with <?php `.
 * That’s not the only issue though – line 33 is calling a constant (UPLOADS) that
   doesn’t exist – it might need to use wp_upload_dir instead ([https://developer.wordpress.org/reference/functions/wp_upload_dir/](https://developer.wordpress.org/reference/functions/wp_upload_dir/)).
   And, line 44 is calling a non-existent function – `register_dlthumbs_custom_options_settings`
   should probably be `dlthumbs_custom_options_page`.
 * Hopefully the plugin developer can fix these up 🙂
 *  Thread Starter [Anon M. Verte](https://wordpress.org/support/users/mverte/)
 * (@mverte)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end-22/#post-6586735)
 * This can be done by enabling short_open_tag in php.ini:
 * short_open_tag = on
 * If you don’t have access to the php.ini you can try to enable them trough the.
   htaccess file but it’s possible the hosting company disabled this if you are 
   on shared hosting:
 * php_value short_open_tag 1
 *  Plugin Author [David Sword](https://wordpress.org/support/users/davidsword/)
 * (@davidsword)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end-22/#post-9266442)
 * Thank you for contributing resolves for the issue.
 * Sorry about this, it was a rushed-and-forgetten project >3 years ago. I understand
   your frustration with plugins you need that don’t work, I’ve been there myself.
 * Please note I’ve overhauled the plugin, completely rewrote it, _and properly 
   this time._ It shouldn’t cause any headaches with shorttags or the upload path–
   as well the user interface is better, detection of an image has improved, option
   to exempt items added, and so on.
 *  [tdmalone](https://wordpress.org/support/users/tdmalone/)
 * (@tdmalone)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end-22/#post-9267818)
 * 👍

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

The topic ‘Parse error: syntax error, unexpected $end’ is closed to new replies.

 * ![](https://ps.w.org/delete-thumbnails/assets/icon-256x256.jpg?rev=1685851)
 * [Delete Thumbnails](https://wordpress.org/plugins/delete-thumbnails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/delete-thumbnails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/delete-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/delete-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/delete-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/delete-thumbnails/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [tdmalone](https://wordpress.org/support/users/tdmalone/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end-22/#post-9267818)
 * Status: resolved