Wordpress 4.6 update caused WHMCS integration failure - line 376

Just updated WordPress to version 4.6 and I am now getting the following integration error with WHMCS Wordpress Integration 1.4.4

Warning: file_get_contents(/home/xxxxx/public_html/wp-content/plugins/whmcs-wordpress-integration/cache/e64dac59086b730bdf42e33aa5cd6bc6.txt): failed to open stream: No such file or directory in /home/xxxxx/public_html/wp-content/plugins/whmcs-wordpress-integration/includes/class-whmcs-wordpress-integration.php on line 376

Any ideas as to what may be causing this? The fact its a cache problem makes me think its directory permissions but I'm just guessing to be honest. Any solutions or even a temp fix appreciated at the moment. :slight_smile:

  • Vaughan
    • Support/SLS MockingJay

    Hi Colin,

    Hope you're well?

    Whilst I can't replicate that exact error, i'm receiving a fatal error instead.

    However, this is the 2nd report now i've seen with this error, I have reported this as a bug for the developer to look into, hopefully we can get a fix out quickly.

    Ignoring the error,does it still function ok? as it's just a warning, and not an error notification?

    If it's still functioning ok, you should be able to hide the notice by adding the following to your wp-config.php just below the WP_DEBUG line, so it looks like:

    define('WP_DEBUG', true);
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    This should hopefully no longer displaynoticesor errors on the screen, and instead will write the errors to a file called debug.log in /wp-content folder instead.

    Hope this helps

  • Colin
    • WPMU DEV Initiate

    Hi Vaughan,

    I'm very well thanks.

    Nope this is not an error that I can seem to bypass, it appears to have fundamentally broken the integration so none of our billing platform is functioning.

    You can view the error live here...


    I'd appreciate a quick fix even just to get this back up and running - No billing system means no bills paid ! :slight_frown:

    Oh and I've changed theme to standard theme and get the exact same error. Does seem to be related to the move to WP 4.6 which we sadly needed to do early for PCI compliance.



  • Panos
    • SLS

    Hi Colin ,

    I tried replicating this but I got different notices. Could you please send in ftp and admin access so we can get a closer look on this? You can send that privately through our contact form: https://premium.wpmudev.org/contact/

    Select "I have a different question?" for your topic - this and the subject line ensure that it gets assigned to me.

    Send in:Subject: "Attn: Panos Lyrakis"

    - Admin login:
    Admin username
    Admin password
    Login url

    - FTP credentials
    (and port if required)

    - link back to this thread for reference
    - any other relevant urls


  • Kieran
    • Site Builder, Child of Zeus

    I am getting the same error.
    It causes a user to be logged out as no cookie is created so renders everything useless.

    The error is being caused by the cache text file being deleted each time page is opened.

    So file_get_contents() at class-whmcs-wordpress-integration.php on line 376
    fails as there is no file in the cache folder after the initial;page load..

  • Panos
    • SLS

    Hi Kieran ,

    Could you try placing the following code before that line:

    $cookies = array();
    		if( file_exists( $this->cache ) )

    so it would run the file_get_contents() function only when file exists?
    I can do this for you but I would require ftp access. I have described on my previous reply here: how to send ftp and wp info :slight_smile:

    Can you also replicate issue Colin is having when members try to log in? I can't replicate this :disappointed:

    Colin , as I have replied in the email I can't access with ftp credentials sent. Can you ask host and re-send them?


  • Vhc-John
    • New Recruit


    The problem exists within WordPress 4.6.x and WHMCS Integration 1.4.4 (and it appears previous versions as well, as I've tried downgrading in hopes of restoring the working model). WordPress 4.6 changed the way it operates. You're attempting, through the wp-integration file, that should be in the WHMCS folder, to set a cookie within WordPress (or that's what I see). WordPress is rejecting that cookie, but not alerting about it. It actually responds with a cookie identifier (which is what everyone keeps seeing the Line 376 error), but it doesn't actually create the cookie. That leads to the exact problems we're all having... Upon login (which is successful), we're unable to do anything at all with the Billing system through WordPress. I'm having to tell my clients to go directly to my WHMCS Installation, which is 99% of the reason I came to WPMU Dev. I understand it takes some time to fix, but we're all on pins and needles as we're losing business over the customers being unable to sign up through WordPress. We can, one-by-one, edit every product link to go directly to WHMCS's interface, bypassing the WMHCS WordPress Integration plugin, but that defeats the purpose.

    And, as a side note, I tested the above as you've requested. It eliminates Line 376 errors, but it does NOT address the issue with cookies not loading properly.

    Thank you,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.