Support

Home Forums Event Espresso Premium Checkout server errors

Checkout server errors

Posted: May 8, 2018 at 6:23 am


Oguzhan Altun

May 8, 2018 at 6:23 am

Hello,

U have the following errors for all customers completing checkout:

https://gist.github.com/altuno/3d3f5774ab2598d13f5d4bd80f8bb738

Any idea what is causing these and how to fix them?


Josh

  • Support Staff

May 8, 2018 at 8:23 am

The error you report about the invalid DateTime is very similar to what was reported here:
https://bugs.php.net/bug.php?id=72011
In the bug report two items were mentioned which may lead to a solution for you:
1) If APC or any other bytecode caching is in place on your server it may help to deactivate it
2) The bug occurs when the max_execution_time is reached while Garbage Collection is running. This would happen when the server is under heavy load. A possible solution would be to bump up the max_execution_time setting in the PHP configuration.


Oguzhan Altun

May 9, 2018 at 4:50 am

Hi Josh,

So I just checked:
1) No caching in the server. I use wp-rocket, but it’s already setup to exclude:
/events/
/registration-checkout/
/transactions/
/thank-you/
/registration-cancelled/

2) The max_execution_time is already at 3600, do you think I should increase it even more?
By the way, I’m using PHP 7.0. Would it help if I upgrade to 7.1? Last time I had tried 7.1, there were some problems with Event Espresso.

Best,


Oguzhan Altun

May 9, 2018 at 7:32 am

update: I cannot increase the max_execution_time more than 3600, my host won’t allow it.


Oguzhan Altun

May 9, 2018 at 9:29 am

I did a new check on the error logs. Looks like a series of errors start after this specific error about invalid date format of “-0001-11-30 01:00:00 +0100 Europe/Zurich”:

“/home/clients/1d989383ee11099bb2d8468c003d5c0c/.config/apache/www.genevaphotoclub.com/.fpm/php5.external” stderr: PHP message: A valid DateTime could not be generated from “-0001-11-30 01:00:00 +0100 Europe/Zurich” because the following errors occurred: <br /> Array, referer: https://www.genevaphotoclub.com/registration-checkout/?uts=1525854945&step=payment_options&ee_cancel_payment=1

Any idea why such date format is created?


Josh

  • Support Staff

May 9, 2018 at 9:34 am

The format isn’t the issue, it’s the actual date (year -0001), which is related to the PHP bug. You could try updating to the current version of PHP 7.0 if that’s available (currently 7.0.29). This way your server will have all of the bug fixes that were made available since 7.0.13 was released.


Oguzhan Altun

May 9, 2018 at 9:42 am

unfortunately the only other option is 7.1. Is this tested for EE4?


Josh

  • Support Staff

May 9, 2018 at 9:57 am

Yes, currently PHP 7.1.16. Older versions of PHP 7.1 aren’t set up for testing.


Oguzhan Altun

May 9, 2018 at 10:12 am

Hi Josh,

I have the following error at the front end when I switch to 7.1:

Fatal error: Uncaught Error: [] operator not supported for strings in /home/clients/1d989383ee11099bb2d8468c003d5c0c/dev2/wp-content/uploads/espresso/templates/template.oa.php:326 Stack trace: #0 /home/clients/1d989383ee11099bb2d8468c003d5c0c/dev2/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Template.helper.php(384): include() #1 /home/clients/1d989383ee11099bb2d8468c003d5c0c/dev2/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Template.helper.php(296): EEH_Template::display_template(‘/home/clients/1…’, Array, true) #2 /home/clients/1d989383ee11099bb2d8468c003d5c0c/dev2/wp-content/plugins/eea-events-table-view-template/EES_Espresso_Events_Table_Template.shortcode.php(253): EEH_Template::locate_template(Array, Array) #3 /home/clients/1d989383ee11099bb2d8468c003d5c0c/dev2/wp-includes/shortcodes.php(319): EES_Espresso_Events_Table_Template->process_shortcode(Array, ”, ‘ESPRESSO_EVENTS…’) #4 [internal function]: do_shortcode_tag(Array) #5 /home/clients/1d989383ee11099bb2d8468c003d5c0c/dev2/wp-i in /home/clients/1d989383ee11099bb2d8468c003d5c0c/dev2/wp-content/uploads/espresso/templates/template.oa.php on line 326

The code in the template.oa.php creates the events table, which is they key design that we use across the website:
https://gist.github.com/altuno/30c20c0f80a815ce92782fde49d43c46

Is this possible to fix?

It would be wonderful to switch to 7.1, as I have speed issues all over the page and I know that upgrading will help.


Tony

  • Support Staff

May 9, 2018 at 10:24 am

On line 324 you set up the $category_slugs variable to be an empty string.

https://gist.github.com/altuno/30c20c0f80a815ce92782fde49d43c46#file-template-oa-php-L324

Then on line 326:

https://gist.github.com/altuno/30c20c0f80a815ce92782fde49d43c46#file-template-oa-php-L326

You try to use $category_slugs as an array and add an element to it.

Change line 324 to:

$category_slugs = array();


Josh

  • Support Staff

May 9, 2018 at 10:25 am

You’ll need to change line 324 of your custom template:

$category_slugs = '';

to

$category_slugs = array();


Oguzhan Altun

May 9, 2018 at 11:06 am

Thanks both, this solved the 7.1 issue and I updated the website successfully to 7.1.0

However I still get the same error messages in the server log when I do a test checkout using bank transfer option. The first message is still:

[Wed May 09 19:05:24 2018] [error] [client 84.72.221.195] FastCGI: server “/home/clients/1d989383ee11099bb2d8468c003d5c0c/.config/apache/dev2.genevaphotoclub.com/.fpm/php5.external” stderr: PHP message: A valid DateTime could not be generated from “-0001-11-30 01:00:00 +0100 Europe/Zurich” because the following errors occurred: <br /> Array, referer: https://dev2.genevaphotoclub.com/registration-checkout/?uts=1525885388

Why could that be?


Josh

  • Support Staff

May 9, 2018 at 11:17 am

PHP 7.1.0 (released 01 Dec 2016) is going to have many of the same bugs that PHP 7.0.13 (released 10 Nov 2016) had because they were released within a month of each other. Neither versions will have the bug fixes that PHP 7.1.16 has.

The support post ‘Checkout server errors’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso