Jump to content

Maximum Execution Time Fatal Error


jonhowell89

Recommended Posts

Hi all,

 

Have had a read through this forum and can't seem to pinpoint why I'm getting this error whilst doing a paypal transaction.

 

I'm currently doing the following:

1) I've set up a test £0.01 item in my shop and set postage of £0.01

2) I'm buying this single product with postage and successfully clicking through to paypal and logging in to make the purchase

3) The issue arises when "processing" transaction on paypal. The processing continues for 60 seconds before timing out

4) I then get the white screen with the following error...

 

Fatal error: Maximum execution time of 60 seconds exceeded in /var/sites/t/thenaturalcandle.co.uk/public_html/tools/tcpdf/tcpdf.php on line 8618

 

The order is going through as it is appearing in my back office, and the transactions are coming out of my account and into the business account.

 

Please can someone help as this is currently my only payment method and is likely to lead to confusion with customers when I launch.

 

Thanks,

Jon

Link to comment
Share on other sites

Hi -

 

I'm far from being some amazing programmer but I do recognize that error.  It is a php error that indicates you have reached the maximum execution time for the assigned task and the task is then shut down midstream.

 

Here is the fix: you need to login to your server or contact your host and find out what your max_execution_time is set to in your php.ini file.  It sounds like it is set to 120 which means 120 seconds which is 2 minutes.  It might be set to something even lower.  You need to change that value to something higher, like 240 or 300. 

 

Now there will be those on this board and elsewhere who might argue or bluster that you should not set your execution time so high.  I work with a programmer who I pay $60 an hour and we found this maximum execution error, not with prestashop but with an application within our forum.  She would never set the value to something that she felt would endanger my forum installation or my website, and she set my execution time to 300.

 

Hope that helps.

Link to comment
Share on other sites

Thanks for the response surfer.

 

My initial reaction was to do this, however as this is at point of payment, taking longer than a minute feels unacceptable for customers. I often click away if payments take this long and this could cause issues with payment still being taken.

 

Due to the fact payment is being taken, my guess is that some loop is being reached in the code thereafter which is only broken by the timeout, and this is what I'd like to fix, if possible.

 

If there is no further option, I will extend the timeout, however would prefer a more focussed solution if possible.

 

Thanks, Jon

Link to comment
Share on other sites

Prestashop indeed needs 300 as input and execution time. You should contact your hosting provider and ask him to change max_execution_time and max_input_time both to 300. 60 seconds are too low, because some scripts need more than this to be executed. They simply stop after 60 seconds and do not execute the script (or at least do not write completely into database the data - this could drive into database table crashes).

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

I've extended the execution time, as suggested and am now getting the following:

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

 

Any more ideas?

 

Thanks for the help so far.

Link to comment
Share on other sites

That sounds like a problem with the .ini file, where there is a conflict between settings.

 

I know this is a total armchair quarterback suggestion and I hate them when I get them but have you taken this to your host? Depending on your hosting plan, they may try to help or say you are on your own.  If you are on your own, you need to locate those server error logs and see what it says, and maybe post it here.  A programmer will always want to see the error logs when you go to them with a problem. That is their first step in diagnosing the issue.

Link to comment
Share on other sites

My host has suggested the following:

There may be a problem with your PayPal IPN which doesn't redirect properly once the payment has been successfully taken. Could you please check your IPN settings, especially auto-return options: the https://www.paypal.com/cgi-bin/webscr?cmd=p/mer/express_return_summary-outside.

 

I am able to turn auto-return to website on, however I don't know which URL to set this too. Thoughts?

 

Another snippet that might help is that when I try to cancel the order and return to site after clicking through to paypal, I get the following message:

[Debug] This page has moved
Please use the following URL instead: http://thenaturalcandle.co.uk/index.php?controller=order&paypal_ec_canceled=1&token=[xxxx]

 

A quick look at the actual url that it is being sent to, and it is http://thenaturalcandle.co.uk/index.php?paypal_ec_canceled=1&controller=order&token=[xxxx]

 

...seems like the controller=order and paypal_ec_canceled are the wrong way round. Do you know how I can correct this and whether this could be causing the issue on payment too?

 

I've just tried fresh install with Paypal Europe 3.10.1 using Prestashop 1.6.0.14 - hoping the older version of prestashop isn't the issue...

Link to comment
Share on other sites

My host has suggested the following:

There may be a problem with your PayPal IPN which doesn't redirect properly once the payment has been successfully taken. Could you please check your IPN settings, especially auto-return options: the https://www.paypal.com/cgi-bin/webscr?cmd=p/mer/express_return_summary-outside.

 

I am able to turn auto-return to website on, however I don't know which URL to set this too. Thoughts?

 

Another snippet that might help is that when I try to cancel the order and return to site after clicking through to paypal, I get the following message:

[Debug] This page has moved

Please use the following URL instead: http://thenaturalcandle.co.uk/index.php?controller=order&paypal_ec_canceled=1&token=[xxxx]

 

A quick look at the actual url that it is being sent to, and it is http://thenaturalcandle.co.uk/index.php?paypal_ec_canceled=1&controller=order&token=[xxxx]

 

...seems like the controller=order and paypal_ec_canceled are the wrong way round. Do you know how I can correct this and whether this could be causing the issue on payment too?

 

I've just tried fresh install with Paypal Europe 3.10.1 using Prestashop 1.6.0.14 - hoping the older version of prestashop isn't the issue...

 

my understanding is the paypal module will include the return path to paypal, so you don't need to configure any url in paypal for return.

Link to comment
Share on other sites

I'm interpreting the above as not needing to setup the return path (please let me know i'm being a bit slow here!)

- I have requested server logs, to see if I can get any more info on the errors.

 

Any ideas on the incorrect urls being directed to, and whether this could cause the wider issue?

 

Thanks for ongoing help.

Jon

Link to comment
Share on other sites

As I said, I have added the URL since I'm using Paypal. If needed or not, I don't have any problems with Paypal and the return to my URL. This question if needed or not you should ask Paypal support.

IPN method is not supported anymore since some years. Your host changed the configuration as mentioned before ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...