Jump to content

Strange situation regarding Error 500 - Internal Server Error


BeatsMe

Recommended Posts

Wanting to ask for assistance regarding a Error 500 - Internal Server Error problems I have been experiencing lately.
This is a long post so I hope you have time to read this.

On the frontend, this is happening to the customers when they are placing an order. Once they have added an item to the cart and proceed through the checkout process to the very last page where they must click “I confirm my order >”, this is where the following white screen error appears…
====================================================================================
Error 500 - Internal Server Error
An error was encountered while processing your request. Typically this is a temporary condition. Please contact the web site owner for further assistance.
====================================================================================

On the backend, the order appears almost as normal, however there is no order Status applied to the order. And when I try to apply the “Awaiting bank wire payment” status, it throws me the same error 500 message as above. Even though there is an error for me, the customer now receives the email notification for an order awaiting payment at this point. However, they do not receive the new order acknowledgement that is normally sent. I have tested with a test user and have found that there are other order statuses that fail with the same error.

Here is the strange thing…
I have a test domain "pstest.mcdracing.com.au" that I setup to test with, this has a current copy of my live Prestashop 1.6 shop... it works no problem, it does not experience the same error 500 as above. Note I have wiped and installed on this site several times so as to see what problems I might face when I wipe the live shop domain.

Once I was happy with the process, I wiped my current live domain www.mcdracing.com.au expecting to fix this problem.

However, the same error 500 as described above still occurs, for some reason it did not fix the problem. Note the files and database are the same except for the SEO&URL settings that must be different to make the site work correctly.

I'm trying to understand why is it that my pstest site works fine, but my live site has errors?
I have logged a ticket with the host, Inmotion Hosting to see if there is any chance of an error on the server side, but do not have a solution as yet.

Sorry for the long post, but just hoping that someone can provide some kind of idea as to what is going on here.

 

Configuration Information
Server information Linux #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
Server software version Apache
PHP version 7.0.33
Memory limit 512M
max_execution_time = 1000
max_input_time = 600
max_input_vars = 30000
post_max_size = 256M
PrestaShop version 1.6.1.24
Current theme in use default-bootstrap

Link to comment
Share on other sites

17 minutes ago, ComGrafPL said:

Enable debug mode, retry order and check the errors it shows.

Hi ComGrafPL,

Forgot to mention Debug mode is enabled on both sites.

It seems to show nothing for this error??
Just the white screen with the error message as described in my opening post.

Edited by BeatsMe (see edit history)
Link to comment
Share on other sites

I have noticed that with the browser  Developer Mode on it shows an error 500. See attached image.

If you reload the page throws a "Cart cannot be loaded or an order has already been placed using this cart" error. Also see attached image.

When you reload the root website and go to "My Orders", the order is there but no status.

The Prestashop debug mode shows nothing.

Is there anyone that can help with any idea of what the problem might be??

Screen Shot 2023-09-12 at 21.31.38 pm.png

Screen Shot 2023-09-12 at 21.33.35 pm.png

Link to comment
Share on other sites

Hey, Just wondering if anyone might know what this error means...

[14-Sep-2023 12:48:17 Australia/Sydney] PHP Notice:  Undefined variable: shop in /home/mcdrac6/public_html/classes/Mail.php on line 253

[14-Sep-2023 12:48:17 Australia/Sydney] PHP Notice:  Trying to get property of non-object in /home/mcdrac6/public_html/classes/Mail.php on line 253

Two error lines when a customer placed an order today.

Hoping for a solution.
Thanks for looking.

Link to comment
Share on other sites

46 minutes ago, BeatsMe said:

Hey, Just wondering if anyone might know what this error means...

[14-Sep-2023 12:48:17 Australia/Sydney] PHP Notice:  Undefined variable: shop in /home/mcdrac6/public_html/classes/Mail.php on line 253

[14-Sep-2023 12:48:17 Australia/Sydney] PHP Notice:  Trying to get property of non-object in /home/mcdrac6/public_html/classes/Mail.php on line 253

Two error lines when a customer placed an order today.

Hoping for a solution.
Thanks for looking.

Hello,

This error appears because the mail() function cannot send the order confirmation email to your customer. You can check the file /home/mcdrac6/public_html/classes/Mail.php, there may be some variables that have not been defined or have inappropriate values.

I hope it is useful to you.

Best regards.

Link to comment
Share on other sites

So, the solution has been to reduce the PHP to v5.6

What I still don't understand is why my pstest site works fine with the original PHP v7.0??

I have asked the host of this question and they have not responded regarding that, all they have said is....

If changing the PHP version down to a lower version worked, that is indicative of a plugin conflict or PHP code issue. As you are on a shared server, we would not be able to make changes to the global PHP configuration. This is something that would need to be worked on by your developer to ensure compatibility.
 
Upon further searching here, there is indication that one of the PHP scripts is crashing, causing issues. The logs do not indicate what is crashing. See the below error message:
 
20961558 [Warning] Aborted connection 20961558 to db: 'mcdrac6_shopdb' user: 'mcdrac6_shopdb' host: 'localhost' (Got an error reading communication packets)

Edited by BeatsMe (see edit history)
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...