Title: PHP Fatal error: Cannot redeclare remove_underscore()
Last modified: February 25, 2020

---

# PHP Fatal error: Cannot redeclare remove_underscore()

 *  Resolved [rs2122](https://wordpress.org/support/users/rs2122/)
 * (@rs2122)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-remove_underscore/)
 * It’s giving an error when used with enable-media-replace plugin.
 * `Got error 'PHP message: PHP Fatal error: Cannot redeclare remove_underscore()(
   previously declared in /home/***/domains/****.com/public_html/wp-content/plugins/
   wp-add-mime-types/wp-add-mime-types.php:132) in /home/***/domains/****.com/public_html/
   wp-content/plugins/wp-add-mime-types/wp-add-mime-types.php on line 132\n', referer:
   https://www.****.com/wp-admin/upload.php?page=enable-media-replace%2Fenable-media-
   replace.php&action=media_replace&attachment_id=8502&_wpnonce=696c18926e`

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

 *  Plugin Author [kimipooh](https://wordpress.org/support/users/kimipooh/)
 * (@kimipooh)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-remove_underscore/#post-12480630)
 * Fixed version 2.4.1 was released.
    Please update wp add mime types plugin.
 * I tested version 2.4.0 with enable-media-replace plugin, but I confirmed to work.
   
   However, I think that the issue regarding remove_underscore function name conflict
   should be resolved, so I changed the remove_underscore fucntion name.
 *  Thread Starter [rs2122](https://wordpress.org/support/users/rs2122/)
 * (@rs2122)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-remove_underscore/#post-12485730)
 * Thank you for your help. However i still get an error when replacing a PDF file:
   `
   Got error 'PHP message: PHP Fatal error: Cannot redeclare wpaddmimetypes_remove_underscore()(
   previously declared in /home/***/domains/*****/public_html/wp-content/plugins/
   wp-add-mime-types/wp-add-mime-types.php:132) in /home/***/domains/*****/public_html/
   wp-content/plugins/wp-add-mime-types/wp-add-mime-types.php on line 132\n', referer:
   https://www.*****/wp-admin/upload.php?page=enable-media-replace%2Fenable-media-
   replace.php&action=media_replace&attachment_id=9053&_wpnonce=54c3cfbb76`
 *  Plugin Author [kimipooh](https://wordpress.org/support/users/kimipooh/)
 * (@kimipooh)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-remove_underscore/#post-12485886)
 * Umm.
    Please let me know about the following information because I cannot reproduce
   the error even if enable-media-replace plugin was enabled (tested up WordPress
   5.3.2 and PHP 7.4.1 and PHP 5.6.40). – The version of WordPress and PHP
 *  Thread Starter [rs2122](https://wordpress.org/support/users/rs2122/)
 * (@rs2122)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-remove_underscore/#post-12485919)
 * Php 7.2.28
    WordPress 5.3.2 Enable Media Replace Versie: 3.3.10 WP Add Mime Types
   Versie: 2.4.1
 *  Plugin Author [kimipooh](https://wordpress.org/support/users/kimipooh/)
 * (@kimipooh)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-remove_underscore/#post-12518778)
 * Thank you for your reply.
    Please try to use this version 2.5.0 of this plugin(
   today updated).
 *  Thread Starter [rs2122](https://wordpress.org/support/users/rs2122/)
 * (@rs2122)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-remove_underscore/#post-12532241)
 * Problem solved, thank you!

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

The topic ‘PHP Fatal error: Cannot redeclare remove_underscore()’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-add-mime-types.svg)
 * [Add MIME Types](https://wordpress.org/plugins/wp-add-mime-types/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-add-mime-types/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-add-mime-types/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-add-mime-types/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-add-mime-types/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-add-mime-types/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [rs2122](https://wordpress.org/support/users/rs2122/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-remove_underscore/#post-12532241)
 * Status: resolved