• Resolved lisabeewd

    (@lisabeewd)


    We have Woocommerce 3.0.5 and your plugin version 5.0.5. We keep getting an internal server error everytime we load the cart or checkout page … depending on if we are logged in or not. If we are already logged in we get the internal server error 500 when we add something to the cart. Otherwise, we get the internal server error 500 when we log in on the checkout page. It only happens when your plugin is activated. We just updated it (in fact, it keeps automatically updating itself since we had taken it back to the previous version yesterday and find it had updated itself this morning). We had resorted to the previous version yesterday because bootstrap.php had invalid headers, which was causing the error 500 then. Now the plugin has updated itself again and we are not sure if it is the same program causing the error 500 or not but we really need it to be fixed … we are running a sale this week and no orders are able to be placed at this time. Help!!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter lisabeewd

    (@lisabeewd)

    Our hosting company has said the error 500 is being generated from your bootstrap.php program: the script is ending without headers being sent.

    Thread Starter lisabeewd

    (@lisabeewd)

    I am also getting the following message in the plugins window:

    The plugin weight-based-shipping-for-woocommerce/bootstrap.php has been deactivated due to an error: The plugin does not have a valid header.

    Plugin Author Dan

    (@dangoodman)

    There are three unrelated issues actually.

    First one is “The plugin weight-based-shipping-for-woocommerce/bootstrap.php has been deactivated due to an error: The plugin does not have a valid header”. Every WordPress plugin has a so called “plugin file” containing some plugin meta data. In the 5.0 version of this plugin the plugin file has been renamed causing the WordPress to not being able to find the old one and deactivating the plugin. It doesn’t break anything. Once you activate the plugin again it will continue working. The word “header” in the error message has nothing to do with headers mentioned in the error message. Same word, different meaning.

    Another issue is “the script is ending without headers being sent”. The plugin isn’t supposed to send any http headers. This message actually means there is some error happened on a deeper level preventing the server from executing plugin files. This is a server misconfiguration issue. Most likely, your server is running PHP 5.3 in FastCGI mode which is not configured correctly. There might be some too tight restrictions on memory, execution time or something else (I’m not talking about memory_limit and max_execution_time php.ini options but rather about RLimitCPU and RLimitMEM). Ask your hosting support to investigate the issue and fix the server configuration. In the meanwhile you can try switching from PHP 5.3 to PHP 5.4+, it usually helps.

    And finally, the one about the plugin keeping auto-updating. The plugin has no code to update itself. It just can’t do that. That means your WordPress is somehow set up to automatically update plugins or something else is causing that.

    • This reply was modified 7 years, 6 months ago by Dan.
    Thread Starter lisabeewd

    (@lisabeewd)

    Thank you Dan!

    Our web host is looking into the server settings and has advised they will set the RLimitCPU and RLimitMEM values for us. I will update your plugin to the latest version and give it a try when they are done.

    I am not sure where the auto updating is coming from but it IS happening … every 12 hours. I suspect WordPress but it could also be our theme or Woothemes Helper since it is auto updating both Woocommerce and your plugin. So, I have installed a Disable Updates plugin and it has prevented the auto updating from occurring … so far.

    Plugin Author Dan

    (@dangoodman)

    Here is the docs on automatic updates which might be worth to check first.

    Looking forward for the results of investigation of both issues.

    Just wanted to add that I also saw the 500 error on the basket page, and narrowed it down to this plugin after I updated it to the latest version.

    The log entry was “End of script output before headers: index.php” and only happened with this plugin enabled.

    We were running PHP 5.3, updating to 5.6 sorted the problem – Dan maybe it would be worth putting that in a sticky or FAQ incase others are affected? It’s hard to diagnose from the log entry what the actual issue is, but if it’s related to PHP version maybe saying “recommended PHP 5.6+” somewhere would help others.

    Cheers

    Plugin Author Dan

    (@dangoodman)

    Hi @alancolyer,

    The issue is that the plugin does work fine with PHP 5.3 for most of its users. The error only happens on a [very] small number of installation with 5.3 active. The plugin also doesn’t do anything tricky which might be causing the server error and has no code paths depending on PHP version.

    It would be great if you or @lisabeewd let us know what had to be changed in the server configuration to solve the issue when running PHP 5.3.

    • This reply was modified 7 years, 6 months ago by Dan.

    Hi @dan,
    I’m not saying there’s anything tricky in the plugin at all but there does seem to be some trouble when 5.3 is installed.

    To resolve, I only changed the PHP version, updating from 5.3 to 5.6. No other changes made to WP or the server config.

    This site was running a custom theme and several other plugins, if it would help I could list them for you. One note is the theme is a custom one developed by me so there’s the possibility of some edge case incompatibility between my theme and the plugin.

    Long story short, upgrading PHP sorted the problem. Hope that’s of some help,

    Cheers

    Note – sorry slightly misread your reply. I had no success getting it to run on 5.3, but I didn’t try to edit the config, the option to upgrade was fast & easy so tried that first.

    Cheers

    Thread Starter lisabeewd

    (@lisabeewd)

    Hi @dangoodman … We were quickly trying to find a way to run the cart since we were in the middle of a sale so we just took the software back to a previous version. I installed the update manager and was able to stop the automatic updates.

    We did have our web host make a couple of server setting changes but are not sure if they worked yet. Our sale just ended so we can update the plugin and see if there is still an error 500. I will be sure to get back to this post once we update (probably in a couple of days). If everything works well then I will let you know what server changes were made to fix the error 500.

    BTW … We ARE running PHP 5.3 and are unable to update to a more recent version due to the server being shared with another website that cannot run under the updated Apache that would allow us to upgrade the PHP version for each account separately.

    Plugin Author Dan

    (@dangoodman)

    Thank you for the update. Looking forward for further info on your tests.

    Thread Starter lisabeewd

    (@lisabeewd)

    @dangoodman … no luck. All plugins updated to latest and still receiving an error 500 when trying to login on the check out page. Although the login appears to have actually happened before the 500 error was triggered I found that after hitting the ‘back’ button and moving to the cart page another 500 error occurs. I am moving the plugin back to a previous working version. Will follow up with our web host to see about getting our PHP version increased since it seems the PHP 5.3 is the culprit.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Internal Server Error in cart after login’ is closed to new replies.