Title: Call to undefined function iconv
Last modified: August 6, 2019

---

# Call to undefined function iconv

 *  Resolved [danfsullivan](https://wordpress.org/support/users/danfsullivan/)
 * (@danfsullivan)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/call-to-undefined-function-iconv/)
 * Hello,
 * So I can’t seem to add a redirect on my site, I am getting a 500 error which 
   allegedly is a security plugin issue, but that’s not the case. I didn’t even 
   have Wordfence installed. In fact, I disabled all plugins except Redirection 
   and the problem persists.
 * UI Admin Interface error:
 * Unexpected token < in JSON at position 0 (SyntaxError)
 * Console error:
 * Failed to load resource: the server responded with a status of 500 ()
    redirection.
   js?ver=4.3.2-0f831a6c0558229b803b83eda31409a3:62 Unexpected token < in JSON at
   position 0
 * Server log error:
 * [06-Aug-2019 10:43:05 UTC] PHP Fatal error: Uncaught Error: Call to undefined
   function iconv() in /home/thesurvivalistbl/public_html/wp-content/plugins/redirection/
   models/redirect-sanitizer.php:224
    Stack trace: #0 /home/thesurvivalistbl/public_html/
   wp-content/plugins/redirection/models/redirect-sanitizer.php(182): Red_Item_Sanitize-
   >sanitize_url(‘/proper-time-te…’, 0) #1 /home/thesurvivalistbl/public_html/wp-
   content/plugins/redirection/models/redirect-sanitizer.php(86): Red_Item_Sanitize-
   >get_url(‘/proper-time-te…’, 0) #2 /home/thesurvivalistbl/public_html/wp-content/
   plugins/redirection/models/redirect.php(231): Red_Item_Sanitize->get(Array) #
   3 /home/thesurvivalistbl/public_html/wp-content/plugins/redirection/api/api-redirect.
   php(55): Red_Item::create(Array) #4 /home/thesurvivalistbl/public_html/wp-includes/
   rest-api/class-wp-rest-server.php(946): Redirection_Api_Redirect->route_create(
   Object(WP_REST_Request)) #5 /home/thesurvivalistbl/public_html/wp-includes/rest-
   api/class-wp-rest-server.php(329): WP_REST_Server->dispatch(Object(WP_REST_Request))#
   in /home/thesurvivalistbl/public_html/wp-content/plugins/redirection/models/redirect-
   sanitizer.php on line 224
 * So it seems the plugin is trying to call a function, namely iconv, that does 
   not exists, which leads me to believe it is not a permissions/security plugin
   error.
 * Thanks!

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

 *  [bezpeka.com](https://wordpress.org/support/users/bezpekacom/)
 * (@bezpekacom)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/call-to-undefined-function-iconv/#post-11807685)
 * Same problem here.
 *  [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/call-to-undefined-function-iconv/#post-11811036)
 * iconv() comes from an optional PHP module. You may be able to add it in your 
   PHP settings (cPanel) or php.ini file.
 * Having said that, if this module isn’t always available, the plugin should probably
   have fallback for it.
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/call-to-undefined-function-iconv/#post-11812316)
 * This should be fixed in 4.3.3. Let me know if that solves the problem.

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

The topic ‘Call to undefined function iconv’ is closed to new replies.

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

 * 3 replies
 * 4 participants
 * Last reply from: [John Godley](https://wordpress.org/support/users/johnny5/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/call-to-undefined-function-iconv/#post-11812316)
 * Status: resolved