Title: Plugin produces databases errors
Last modified: August 22, 2016

---

# Plugin produces databases errors

 *  [spiderwisp](https://wordpress.org/support/users/spiderwisp/)
 * (@spiderwisp)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/plugin-produces-databases-errors/)
 * This plugin produces database error:
 *     ```
       WordPress database error: [Duplicate entry '1' for key 'PRIMARY']
       INSERT INTO wp_hdflv_settings VALUES (1,1,1,1,1,0,1,'platoon.jpg','http://www.hdflvplayer.net/',50,'LR',1,1,0,20,1,'0x000000','skin_black',0,'hdflvplayer/url.php','playXml',1,1,1,1,1,500,400,1,0,0,'wp-content/uploads','0','','') /* From [obscured.com/wp-admin/plugins.php?error=true&charsout=808&plugin=wp-flash-player%2Fhdflvplugin.php&plugin_status=all&paged=1&s&_error_nonce=594a50849a] in [/nas/wp/www/staging/obscured/wp-content/plugins/wp-flash-player/install.php:132] */
       ```
   
 * Evidently not unique to our installation, as a google search will turn up dozens
   of other sites showing the same error in their logs.
 * [https://wordpress.org/plugins/wp-flash-player/](https://wordpress.org/plugins/wp-flash-player/)

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

 *  Thread Starter [spiderwisp](https://wordpress.org/support/users/spiderwisp/)
 * (@spiderwisp)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/plugin-produces-databases-errors/#post-5616174)
 * The problem seems to be with install.php using an INSERT statement every time
   a page loads, rather than loading only when the plugin is activated. Seems this
   plugin isn’t using WP’s register_activation hook?
 * Still looking… replacing INSERT with REPLACE will rid the errors, but I’m sure
   it’s overwriting the settings to default each time, so not a fix.
 *  Thread Starter [spiderwisp](https://wordpress.org/support/users/spiderwisp/)
 * (@spiderwisp)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/plugin-produces-databases-errors/#post-5616175)
 * Surely the issue is in hdflvplugin.php file here:
 * `add_action('plugins_loaded', 'contusHdInstall'); //when the version is updating
   that time this hook will execute`
 * Your install script is running every time plugins load.
 *  Thread Starter [spiderwisp](https://wordpress.org/support/users/spiderwisp/)
 * (@spiderwisp)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/plugin-produces-databases-errors/#post-5616176)
 * And since there is no check in your install.php file, it is running this query
   every time WordPress page loads:
 *     ```
       $wpdb->query(" INSERT INTO " . $wpdb->prefix . "hdflv_settings
       					   VALUES (1,1,1,1,1,0,1,'platoon.jpg','http://www.hdflvplayer.net/',50,'LR',1,1,0,20,1,'0x000000','skin_black',0,'hdflvplayer/url.php','playXml',1,1,1,1,1,500,400,1,0,0,'wp-content/uploads','0','','')");
       }
       ```
   
 *  [karthikeyani](https://wordpress.org/support/users/karthikeyani/)
 * (@karthikeyani)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/plugin-produces-databases-errors/#post-5616527)
 * Hi,
 * I have checked your issue in latest package and cannot find the issue. If you
   are using old version 1.0, please upgrade to the latest version and check. If
   you are still facing the same issue, contact the support team at [assist@apptha.com](https://wordpress.org/support/topic/plugin-produces-databases-errors/assist@apptha.com?output_format=md)

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

The topic ‘Plugin produces databases errors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-flash-player_6a879a.svg)
 * [FLASH PLAYER PLUGIN](https://wordpress.org/plugins/wp-flash-player/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-flash-player/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-flash-player/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-flash-player/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-flash-player/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-flash-player/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [karthikeyani](https://wordpress.org/support/users/karthikeyani/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/plugin-produces-databases-errors/#post-5616527)
 * Status: not resolved