Post by cokesjo1 » Sat Oct 19, 2024 1:49 pm

Hi guys i've recently upgrade from OC 3.0.3.8 to OC 3.0.4 and is using PHP ver 8.3. All is fine after the upgrade except that i get the http 500 error on the checkout success page. Still the same when i change back to PHP ver 7.4. The server error log in cpanel does not give any error. Any idea on what might have gone wrong?
Thank you
Last edited by cokesjo1 on Mon Oct 21, 2024 11:18 pm, edited 1 time in total.

Newbie

Posts

Joined
Sun Jan 03, 2021 5:10 am

Post by by mona » Sat Oct 19, 2024 2:41 pm

The HTTP status code 500 is a generic error response. It means that the server encountered an unexpected condition that prevented it from fulfilling the request. This error is usually returned by the server when no other error code is suitable.

How to Resolve 500 Internal Server Error
In a 500 Internal Server Error situation, the server has encountered an unexpected condition that prevents it from fulfilling the clients’ requests. Note that essentially, there is nothing wrong with the server itself. It has simply encountered something it can’t figure out.

Important
Before making changes to the site’s code and database, it is always a good practice to take a full backup of the server, so that you can restore the site in case something goes wrong.

Resolving 500 Internal Server Error requires you to follow this process:
Step 1: Debugging the Issue
The first step is to make sense of the situation and try to make sense of the error. For this, you need to check PHP logs (part of Apache error logs) for more information about the error.

If you are unable to find the error logs there, try enabling PHP error reporting by adding the following lines to the index.php file:

Code: Select all

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
 
Step 2: Check if the Admin Works
Log in to the admin panel for your website. If this page loads properly and allows you to log in, you can be reasonably sure that the issue is with a plugin/extension/module or with the active theme.

Step 3: Revert Recent Changes
If changes were made just before the 500 error, you should try to revert back to the last available version. This way, you could eliminate a very probable source of the error.

Step 4: Audit Your Plugins/Extensions/Modules
Plugins/extensions/modules can also cause 500 Internal Server Error. In general, the error occurs because of the compatibility issues caused by outdated plugins/extensions/modules or poorly coded new ones. In this context, you might encounter the error after installing a plugin/extension/module or because it is no longer compatible. To find out which of your plugins/extensions/modules is causing the error, deactivate ALL of them and then reactivate them one at a time. If you discover the offending plugin/extension, deactivate (or better yet uninstall) it and get in touch with the developer for help.

Step5: Increase PHP Memory Limit
PHP libraries require a memory limit for the successful execution of PHP scripts. Increasing the available PHP memory limit from the Server and Packages tab can also fix the 500 Internal Server error. If you have defined a memory limit in the application configuration files, simply increase the value in these files. Changing the PHP memory limit will also help you avoid the “Allowed memory size” error.

Step 8: Check File Permissions
If none of the above works, the issue can lie with file permissions.

It is always a good practice to test the changes on a staging website/environment to make sure everything works as intended.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by cokesjo1 » Sun Oct 20, 2024 5:02 pm

Hi @mona,
Thank you very much for the reply. i found the following error in the error_log file in my root folder: [26-Feb-2021 13:33:05 Africa/Johannesburg] PHP Fatal error: Uncaught Exception: Error: Could not load template /home/.../catalog/view/theme/default/template/checkout/checkoutsimple.twig! in /home/.../ocartdata/storage/modification/system/library/template/twig.php:21
i could not find the checkoutsimple.twig on the specific folder, but the twig.php is in the data folder. Can i rename the checkout.twig to checkoutsimple.twig or upload it from the OC 3.0.3.8 maintenace package? Please advice what the best pratctice will be.
Thank you

Newbie

Posts

Joined
Sun Jan 03, 2021 5:10 am

Post by cokesjo1 » Sun Oct 20, 2024 7:13 pm

Hi guys sorted. the culprit was and extention (Google Analytics - Enhanced Ecommerce). disabled it and the checkout-success page showed, but now order emails does not send to clients, specially gmail account, but i can send order updates and marketing email to gmail accounts

Newbie

Posts

Joined
Sun Jan 03, 2021 5:10 am

Post by by mona » Mon Oct 21, 2024 12:37 am

Have you checked if the extension installs events ?
When you disable an extension it does not disable events - you have to do that manually - or uninstall the extension (presuming it removes the events)

EDIT :) When you disable an extension it does not necessarily disable events - you have to check and do that manually - or uninstall the extension (presuming it removes the events)
Last edited by by mona on Mon Oct 21, 2024 5:23 pm, edited 1 time in total.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by JNeuhoff » Mon Oct 21, 2024 4:17 pm

by mona wrote:
Mon Oct 21, 2024 12:37 am
Have you checked if the extension installs events ?
When you disable an extension it does not disable events - you have to do that manually - or uninstall the extension (presuming it removes the events)
That depends on the extension. Ours are using events, but when disabled, the events of the extension won't be called. But you are right, not every extension has been implemented like that, so always worth a check.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by paulfeakins » Mon Oct 21, 2024 6:51 pm

cokesjo1 wrote:
Sun Oct 20, 2024 7:13 pm
Hi guys sorted.
Great, so please now add [SOLVED] to the start of this topic title.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 18 guests