I had a problem – WP-Insert crashed my site
-
After several frustrating with my new VDS (Nginx,PHP5-fpm and other modules), WP4.1&WP-Insert I have included debug.log typing the following commands in the file wp-config.php:
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true);
After including WP-Insert and the emergence of another error I read in /wp-content/debug.log:
PHP Fatal error: Cannot redeclare geoip_country_code_by_name() in /full_way_to_path/wp-content/plugins/wp-insert/includes/common/geoip/geoip.inc on line 439
When I looked at this place, I found this code:
function geoip_country_code_by_name($gi, $name) { ... } function geoip_country_name_by_name($gi, $name) { ... }
But I already have a working module GeoIP on my VDS!
So I rewrote the code like this:if (!function_exists('geoip_country_code_by_name')) { function geoip_country_code_by_name($gi, $name) { ... } } if (!function_exists('geoip_country_name_by_name')) { function geoip_country_name_by_name($gi, $name) { ... } }
That’s all. Everything works flawlessly. Magnificent WP-Insert, which pleased me a long time, continues to delight me more 😉
Don’t forget to turn off the debug.log, that the file does not become too large.define('WP_DEBUG', false); define('WP_DEBUG_LOG', false);
- The topic ‘I had a problem – WP-Insert crashed my site’ is closed to new replies.