Title: Cannot modify header &amp; deprecated php method &#8211; bulk plugin acti-/deactivating
Last modified: September 1, 2016

---

# Cannot modify header & deprecated php method – bulk plugin acti-/deactivating

 *  Resolved [mpek](https://wordpress.org/support/users/mpek/)
 * (@mpek)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/cannot-modify-header-deprecated-php-method-bulk-plugin-acti-deactivating/)
 * Could be interesting to developer:
 * WPDEBUG reported:
 * `Deprecated: Methods with the same name as their class will not be constructors
   in a future version of PHP; shaHelper has a deprecated constructor in /home/www/
   mydomain/wp-content/plugins/amazon-product-in-a-post-plugin/inc/amazon-product-
   in-a-post-sha256.inc.php on line 39`
 * and
 * `Warning: Cannot modify header information - headers already sent by (output 
   started at /home/www/pekic.de/wp-content/plugins/amazon-product-in-a-post-plugin/
   inc/amazon-product-in-a-post-sha256.inc.php:39) in /home/www/mydomain/wp-content/
   plugins/qtranslate-x/qtranslate_core.php on line 388`
 * mydomain = replacer for Website URL
 * Hope it helps to imporve…
 * [https://wordpress.org/plugins/amazon-product-in-a-post-plugin/](https://wordpress.org/plugins/amazon-product-in-a-post-plugin/)

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

 *  [George wp-website-mastery](https://wordpress.org/support/users/lernerconsult/)
 * (@lernerconsult)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/cannot-modify-header-deprecated-php-method-bulk-plugin-acti-deactivating/#post-9036337)
 * WordPress 4.7.3 on Apache, PHP 7.1.3
    Amazon Product In a Post Plugin version
   3.6.4
 * Deprecated: Methods with the same name as their class will not be constructors
   in a future version of PHP; shaHelper has a deprecated constructor in /home/USERNAME/
   public_html/wp-content/plugins/amazon-product-in-a-post-plugin/inc/amazon-product-
   in-a-post-sha256.inc.php on line 39
 * Notice: add_utility_page is deprecated since version 4.5.0! Use add_menu_page()
   instead.
 *     ```
       Array (
       	[file] => /home/USERNAME/public_html/wp-content/plugins/amazon-product-in-a-post-plugin/inc/amazon-product-in-a-post-tools.php
       	[line] => 512
       	[function] => add_utility_page
       	[args] => Array
       		(
       			[0] => Amazon Product In a Post Plugin
       			[1] => Amazon Product
       			[2] => edit_posts
       			[3] => apipp-main-menu
       			[4] => apipp_main_page
       			[5] => dashicons-amazon
       		)
   
       )
       ```
   
    -  This reply was modified 9 years, 1 month ago by [George wp-website-mastery](https://wordpress.org/support/users/lernerconsult/).
 *  [Don Fischer](https://wordpress.org/support/users/prophecy2040/)
 * (@prophecy2040)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/cannot-modify-header-deprecated-php-method-bulk-plugin-acti-deactivating/#post-9037100)
 * We are aware of the notices in the current version. This means that you have 
   some sort of error notices turned on for your site – which will give you the 
   notices.
 * To stop them from displaying and allow the plugin activation/deactivation without
   warning messages, you should turn off WP_DEBUG if it is on, and also make sure
   your error logging is set to log messages and not display them.
 * If you are using a production site (live for the world to visit), you should 
   NEVER have WP_DEBUG set to true. You should also set your logging to ERROR only(
   unless you are debugging an issue) or your error logs will fill up quickly.
 * Check out this post for the WP_DEBUG:
    [https://codex.wordpress.org/WP_DEBUG](https://codex.wordpress.org/WP_DEBUG)
 * If you want to set error logging, you could also add this to your wp-config.php
   file (before the “stop editing comment”):
 *     ```
       ini_set('display_errors', 0);
       ini_set('log_errors', 1);
       ini_set('error_log', dirname(__FILE__) . '/wp-content/site-error-log.txt');
       error_reporting( E_ALL  & ~E_NOTICE & ~E_WARNING );
       ```
   
 * We will be fixing the issues in the next version of the plugin.
 * Warm regards,
    Don

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

The topic ‘Cannot modify header & deprecated php method – bulk plugin acti-/deactivating’
is closed to new replies.

 * ![](https://ps.w.org/amazon-product-in-a-post-plugin/assets/icon.svg?rev=1565235)
 * [Amazon Product in a Post Plugin](https://wordpress.org/plugins/amazon-product-in-a-post-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amazon-product-in-a-post-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amazon-product-in-a-post-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/amazon-product-in-a-post-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amazon-product-in-a-post-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amazon-product-in-a-post-plugin/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Don Fischer](https://wordpress.org/support/users/prophecy2040/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/cannot-modify-header-deprecated-php-method-bulk-plugin-acti-deactivating/#post-9037100)
 * Status: resolved