Title: PHP errors
Last modified: January 18, 2022

---

# PHP errors

 *  [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/php-errors-261/)
 * So I have been using the statistics for over a year now and decided to start 
   using “Purge Old Data Daily” set to “Purge Data Older Than: 365”
 * And every time it runs I am getting PHP errors….
 * `WordPress database error Duplicate entry '0' for key 'page_id' for query INSERT
   INTO`w3p8w4z_statistics_historical`(`value`,`category`,`uri`,`page_id`) VALUES('
   78', 'uri', '/xmlrpc.php', '0') made by do_action_ref_array('wp_statistics_dbmaint_hook'),
   WP_Hook->do_action, WP_Hook->apply_filters, WP_STATISTICS\Schedule->dbmaint_event,
   WP_STATISTICS\Purge::purge_data`
 * `WordPress database error Duplicate entry '6282' for key 'page_id' for query 
   INSERT INTO`w3p8w4z_statistics_historical`(`value`,`category`,`uri`,`page_id`)
   VALUES ('3', 'uri', '/reduced-price-listings/', '6282') made by do_action_ref_array('
   wp_statistics_dbmaint_hook'), WP_Hook->do_action, WP_Hook->apply_filters, WP_STATISTICS\
   Schedule->dbmaint_event, WP_STATISTICS\Purge::purge_data`
 * There are 8 different ones every time but here are two of them, they are pretty
   much the same.
 * I am on….
    WordPress 5.8.3 PHP 7.4
 * Please advice…
    Thanks.

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

 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/php-errors-261/#post-15313126)
 * Anybody?
 *  Plugin Author [Mostafa Soufi](https://wordpress.org/support/users/mostafas1990/)
 * (@mostafas1990)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-errors-261/#post-15336733)
 * Hi,
 * Sorry for the delayed reply, this is weird why occurred. any way you can get 
   rid of that error by deleting those rows manually from the phpMyAdmin
 *     ```
       DELETE FROM w3p8w4z_statistics_historical where page_id = 78;
       DELETE FROM w3p8w4z_statistics_historical where page_id = 3;
       ```
   
    -  This reply was modified 4 years, 1 month ago by [Mostafa Soufi](https://wordpress.org/support/users/mostafas1990/).

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

The topic ‘PHP errors’ is closed to new replies.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Mostafa Soufi](https://wordpress.org/support/users/mostafas1990/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/php-errors-261/#post-15336733)
 * Status: not resolved