Title: Fatal php errors
Last modified: August 22, 2016

---

# Fatal php errors

 *  Resolved [tbm2](https://wordpress.org/support/users/tbm2/)
 * (@tbm2)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/)
 * I’m suddenly getting loads of fatal PHP errors in my error logs for this plugin
   today. Could it be because Woocommerce 2.3 was just released and I upgraded, 
   so maybe the plugin has some compatibility issues?
 * PHP Fatal error: Call to a member function set_customer_session_cookie() on a
   non-object in /home/xxxx/public_html/wp-content/plugins/woocommerce-products-
   per-page/woocommerce-products-per-page.php on line 359
 * [https://wordpress.org/plugins/woocommerce-products-per-page/](https://wordpress.org/plugins/woocommerce-products-per-page/)

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

 *  Plugin Author [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * (@sormano)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782678)
 * Hi,
 * Thanks for reporting!
 * I will have to look into this, there is a possibility for some compatibility,
   but have to verify this later today. If it turns out I will release a patch soon!
 * I will keep you posted in here.
 * Cheers,
    Jeroen
 *  Plugin Author [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * (@sormano)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782721)
 * Hi,
 * I just had a closer look and tested with 2.3.2 and 2.3.3, and both seem to work
   fine. To what version of WC did you update?
 * Also looked at the source of WC, there doesn’t seem any change.
 * I am lightly suspecting either of these options;
    – There might be a corrupt 
   file within the WC plugin (this would be caused during file transfer and not 
   all the bytes came over, happens rarely) – You are using another plugin that 
   is changing the session class as they do allow that; [https://github.com/woothemes/woocommerce/blob/2.2.11/woocommerce.php#L368](https://github.com/woothemes/woocommerce/blob/2.2.11/woocommerce.php#L368)
 * Can you;
    – Update WC to the latest version (2.3.3 at this moment) – If the issue
   still persists, disable all plugins + switch back to the default theme to see
   if the error still occurs?
 * Hope to find the issue together! 🙂
 * Cheers
    Jeroen Sormani
 *  Thread Starter [tbm2](https://wordpress.org/support/users/tbm2/)
 * (@tbm2)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782739)
 * Hi Jeroen,
 * Thanks for getting back to me and checking. My error logs are still full of fatal
   php errors today relating to Products Per Page. My Woocommerce version is the
   latest (2.3.3). I’ll see if I can investigate further later but it’s a bit tricky
   on my live site to disable all other plugins as I need 95% of them in order for
   the site to function correctly. I have a localhost test site but I don’t think
   that will give me error logs. I think I’ll just have to disable it for now and
   see what I can come up with. If I find anything I’ll let you know.
 * Just FYI I have a few other Woo related plugins so it could be conflicting with
   one of these:
 * Woocommerce Extra Product Sorting Options
    Woocommerce grid/list toggle Woocommerce
   Poor Guys Swiss Knife Woothemes Helper
 * Your plugin works great otherwise and is exactly what I need so I hope I can 
   find the cause!
 * Cheers
 * Simon
 *  Thread Starter [tbm2](https://wordpress.org/support/users/tbm2/)
 * (@tbm2)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782760)
 * Hi again Jeroen,
 * I tried disabling each plugin but none of them resolved the issue so unfortunately
   I’ll have to disable the plugin for now.
 * The only clues I could find were other people reporting similar errors in the
   past when Woocommerce has been updated previously:
 * [https://support.woothemes.com/hc/communities/public/questions/201745913-Help-Cannot-access-my-Dashboard-anymore-after-upgrading-the-latest-Woocommerce-Installation-](https://support.woothemes.com/hc/communities/public/questions/201745913-Help-Cannot-access-my-Dashboard-anymore-after-upgrading-the-latest-Woocommerce-Installation-)
 * [https://support.woothemes.com/hc/communities/public/questions/203027916-Update-to-ver-2-2-0-broke-administration-dashboard](https://support.woothemes.com/hc/communities/public/questions/203027916-Update-to-ver-2-2-0-broke-administration-dashboard)
 * [https://wordpress.org/support/topic/latest-woocommerce-broken-by-plugin?replies=17](https://wordpress.org/support/topic/latest-woocommerce-broken-by-plugin?replies=17)
 * If it’s just me reporting it, I guess it must be something unique to my install.
 * Thanks for checking it out anyway 🙂
 * Simon
 *  Plugin Author [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * (@sormano)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782773)
 * Hi Simon,
 * Thanks for trying that.
 * Would it be possible for you to re-upload WooCommerce? (download WC 2.3.3 manually,
   and replace the old folder with that one?)
    Now I’m thinking it may be a corrupt
   file.
 * You could check these code files/lines if they exist in your setup;
    [https://github.com/woothemes/woocommerce/blob/2.3.3/woocommerce.php#L301](https://github.com/woothemes/woocommerce/blob/2.3.3/woocommerce.php#L301)
   [https://github.com/woothemes/woocommerce/blob/2.3.3/includes/class-wc-session-handler.php#L134](https://github.com/woothemes/woocommerce/blob/2.3.3/includes/class-wc-session-handler.php#L134)
 * I just did a clean install to test the plugin, and had no issues so far..
    That
   plus, it is indeed just you (so far?) reporting it suggest to me its something
   on your setup.
 * Re: the posted urls; If I remember correctly there was an incompatibility issue
   in a earlier version of the plugin with a new WC release, but that was fixed 
   with a plugin update.
 * Thanks 🙂
 * Jeroen
 *  Plugin Author [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * (@sormano)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782774)
 * Hi Simon,
 * I was testing some other plugins of mine, and I all the sudden did get some notices.
   It looked like it only occurred every now and then, and only when not on the 
   products page.
 * Is it occurring with every page refresh with you?
 * Here’s what I’ve come up with, replace line 358 of the main plugin file with;
 *     ```
       if ( WC()->version > '2.1' && ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' ) ) :
       ```
   
 * I noticed WC has changed their conditional load, that why the error occurs; [https://github.com/woothemes/woocommerce/blob/2.3.3/woocommerce.php#L296](https://github.com/woothemes/woocommerce/blob/2.3.3/woocommerce.php#L296)
 * If you can test this out, and report back to me if this fixes it for you so there
   won’t be any more console error, that would be great! If positively tested I 
   will release a patch 🙂
 * Thanks!
 * Jeroen
 *  Thread Starter [tbm2](https://wordpress.org/support/users/tbm2/)
 * (@tbm2)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782777)
 * Thanks Jeroen,
 * Hard to tell from the error logs if it’s every page refresh that causes it (in
   yesterday’s logs alone there were about 750 instances of the error).
 * Anyway, I’ve updated your main plugin with that code but I’m not sure if the 
   error logs file is updated immediately if there’s a problem?
 * Nothing is showing there yet so fingers crossed you may have found the problem
   but I’ll report back later when there’s been some active traffic on my site to
   test it out more thoroughly.
 * Thanks,
 * S
 *  Plugin Author [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * (@sormano)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782796)
 * Hi Simon,
 * The error logs are static files, the errors that are in there won’t change. But
   there shouldn’t be any new ones added.
    (you can delete the old ones if you host
   allows that)
 * Thank for testing! Looking forward to your end report 🙂
 * Cheers,
    Jeroen
 *  Thread Starter [tbm2](https://wordpress.org/support/users/tbm2/)
 * (@tbm2)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782797)
 * Good news Jeroen, there haven’t been any more errors since I updated the code
   as you suggested!
 * The plugin has been active since yesterday so looks like all is good now.
 * Thanks for your help and a really useful plugin 🙂
 *  Plugin Author [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * (@sormano)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782799)
 * Awesome! 🙂
 * I’ve just pushed a update (1.1.5) to fix this for everyone else too 🙂
 * Thanks for Your help in finding this 😉
 * Jeroen
 *  [whoaloic](https://wordpress.org/support/users/whoaloic/)
 * (@whoaloic)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782842)
 * Thank you for the update Jeroen, I got a HTTP 500 error when tring to backup 
   my site (with BackWPup plugin).
    Now, my backup works.
 *  Plugin Author [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * (@sormano)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782866)
 * Ahh, glad thats resolved too then 🙂

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

The topic ‘Fatal php errors’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-products-per-page/assets/icon-256x256.jpg?rev
   =1090359)
 * [Products Per Page for WooCommerce](https://wordpress.org/plugins/woocommerce-products-per-page/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-products-per-page/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-products-per-page/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-products-per-page/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-products-per-page/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-products-per-page/reviews/)

 * 12 replies
 * 3 participants
 * Last reply from: [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/fatal-php-errors-1/#post-5782866)
 * Status: resolved