Moderator: madimar

Post by f.mautone@gmail.com » Thu Nov 26, 2020 10:21 pm

Ciao a tutti,
quando associo un articolo in una categoria, mi esce un errore nella pagina della categoria:
La pagina non funziona al momento non è in grado di gestire la richiesta.
HTTP ERROR 500
Se elimino l'articolo dalla categoria funziona tutto regolarmante.
Potete aiutarmi nel capire perchè succede? Grazie in anticipo


Posts

Joined
Wed Oct 14, 2020 9:18 pm

Post by huntbee » Wed Jan 06, 2021 3:22 pm

Add the following code to your admin/index.php just after the PHP opening tags <?php

Code: Select all

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
This will give you a better understanding of the cause of the error 500

HuntBee OpenCart Services
https://www.huntbee.com


User avatar
New member

Posts

Joined
Sun Nov 01, 2015 4:01 am
Location - India

Post by straightlight » Wed Jan 06, 2021 8:32 pm

huntbee wrote:
Wed Jan 06, 2021 3:22 pm
Add the following code to your admin/index.php just after the PHP opening tags <?php

Code: Select all

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
This will give you a better understanding of the cause of the error 500
I would not suggest this approach if the site is in production. Rather use the error / server access logs would be more ideal in these situations. You can also enable the display errors from the system/config/default.php file or from the admin > systems > settings > edit settings > server tab for development stores.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by huntbee » Thu Jan 07, 2021 12:39 am

The code referenced here is only for debugging the issue. Once the cause of the issue is identified, this code needs to be removed.

And moreover, you cannot see server error (ERROR 500) in opencart error logs. And also not every hosting provider gives you access to server logs. So the best way to find the cause of server error (error 500) is to place the code and understand what is causing the issue and then fix that issue. After fixing the issue, the code needs to be removed.

HuntBee OpenCart Services
https://www.huntbee.com


User avatar
New member

Posts

Joined
Sun Nov 01, 2015 4:01 am
Location - India

Post by straightlight » Thu Jan 07, 2021 12:51 am

huntbee wrote:
Thu Jan 07, 2021 12:39 am
The code referenced here is only for debugging the issue. Once the cause of the issue is identified, this code needs to be removed.

And moreover, you cannot see server error (ERROR 500) in opencart error logs. And also not every hosting provider gives you access to server logs. So the best way to find the cause of server error (error 500) is to place the code and understand what is causing the issue and then fix that issue. After fixing the issue, the code needs to be removed.
Doesn't matter. It does not exclude the fact that forum users should be informed to troubleshoot these issues on a development area rather than on their live stores in order to avoid security issues. As for the error logs with error 500, users are not prevented to look at their access logs rather than error logs from Opencart which is how and why my previous post does indicate: error / server access logs.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by huntbee » Thu Jan 07, 2021 1:12 am

straightlight wrote:
Thu Jan 07, 2021 12:51 am
huntbee wrote:
Thu Jan 07, 2021 12:39 am
The code referenced here is only for debugging the issue. Once the cause of the issue is identified, this code needs to be removed.

And moreover, you cannot see server error (ERROR 500) in opencart error logs. And also not every hosting provider gives you access to server logs. So the best way to find the cause of server error (error 500) is to place the code and understand what is causing the issue and then fix that issue. After fixing the issue, the code needs to be removed.
Doesn't matter. It does not exclude the fact that forum users should be informed to troubleshoot these issues on a development area rather than on their live stores in order to avoid security issues. As for the error logs with error 500, users are not prevented to look at their access logs rather than error logs from Opencart which is how and why my previous post does indicate: error / server access logs.
The user has mentioned Error 500, and OpenCart cannot log this error anyway. The best way to understand server errors is to use the code I have mentioned. I agree that good practice is to work on the development site and not on a production site. But this is something basic and it is not relevant to the query the user posted. It is up to to the user whether he prefers checking the issue on the production site or a development site.

HuntBee OpenCart Services
https://www.huntbee.com


User avatar
New member

Posts

Joined
Sun Nov 01, 2015 4:01 am
Location - India

Post by straightlight » Thu Jan 07, 2021 1:28 am

huntbee wrote:
Thu Jan 07, 2021 1:12 am
straightlight wrote:
Thu Jan 07, 2021 12:51 am
huntbee wrote:
Thu Jan 07, 2021 12:39 am
The code referenced here is only for debugging the issue. Once the cause of the issue is identified, this code needs to be removed.

And moreover, you cannot see server error (ERROR 500) in opencart error logs. And also not every hosting provider gives you access to server logs. So the best way to find the cause of server error (error 500) is to place the code and understand what is causing the issue and then fix that issue. After fixing the issue, the code needs to be removed.
Doesn't matter. It does not exclude the fact that forum users should be informed to troubleshoot these issues on a development area rather than on their live stores in order to avoid security issues. As for the error logs with error 500, users are not prevented to look at their access logs rather than error logs from Opencart which is how and why my previous post does indicate: error / server access logs.
The user has mentioned Error 500, and OpenCart cannot log this error anyway. The best way to understand server errors is to use the code I have mentioned. I agree that good practice is to work on the development site and not on a production site. But this is something basic and it is not relevant to the query the user posted. It is up to to the user whether he prefers checking the issue on the production site or a development site.
False. The best way to understand is how store owners should be handling their domain already. Access logs are offered by their hosting services in order to monitor domain activities including the error 500. Forum users on the forum are being encouraged to use these logs rather than showing displayed error outputs on their live stores since it is not a safe procedure to apply on anyhow when not outputting these results on a development server. Besides, Opencart already has other and easy ways to display the outputs still other than playing with the index.php file especially when these scenarios are present.

In addition, if users don't have access to access logs on their domain, it's due to security reasons where they should contact their host for more information on this especially when a store is running live.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by huntbee » Thu Jan 07, 2021 2:06 am

straightlight wrote:
Thu Jan 07, 2021 1:28 am
huntbee wrote:
Thu Jan 07, 2021 1:12 am
straightlight wrote:
Thu Jan 07, 2021 12:51 am


Doesn't matter. It does not exclude the fact that forum users should be informed to troubleshoot these issues on a development area rather than on their live stores in order to avoid security issues. As for the error logs with error 500, users are not prevented to look at their access logs rather than error logs from Opencart which is how and why my previous post does indicate: error / server access logs.
The user has mentioned Error 500, and OpenCart cannot log this error anyway. The best way to understand server errors is to use the code I have mentioned. I agree that good practice is to work on the development site and not on a production site. But this is something basic and it is not relevant to the query the user posted. It is up to to the user whether he prefers checking the issue on the production site or a development site.
False. The best way to understand is how store owners should be handling their domain already. Access logs are offered by their hosting services in order to monitor domain activities including the error 500. Forum users on the forum are being encouraged to use these logs rather than showing displayed error outputs on their live stores since it is not a safe procedure to apply on anyhow when not outputting these results on a development server. Besides, Opencart already has other and easy ways to display the outputs still other than playing with the index.php file especially when these scenarios are present.

In addition, if users don't have access to access logs on their domain, it's due to security reasons where they should contact their host for more information on this especially when a store is running live.
Let the user decide what he wants to do.

HuntBee OpenCart Services
https://www.huntbee.com


User avatar
New member

Posts

Joined
Sun Nov 01, 2015 4:01 am
Location - India

Post by straightlight » Thu Jan 07, 2021 2:14 am

huntbee wrote:
Thu Jan 07, 2021 2:06 am
straightlight wrote:
Thu Jan 07, 2021 1:28 am
huntbee wrote:
Thu Jan 07, 2021 1:12 am


The user has mentioned Error 500, and OpenCart cannot log this error anyway. The best way to understand server errors is to use the code I have mentioned. I agree that good practice is to work on the development site and not on a production site. But this is something basic and it is not relevant to the query the user posted. It is up to to the user whether he prefers checking the issue on the production site or a development site.
False. The best way to understand is how store owners should be handling their domain already. Access logs are offered by their hosting services in order to monitor domain activities including the error 500. Forum users on the forum are being encouraged to use these logs rather than showing displayed error outputs on their live stores since it is not a safe procedure to apply on anyhow when not outputting these results on a development server. Besides, Opencart already has other and easy ways to display the outputs still other than playing with the index.php file especially when these scenarios are present.

In addition, if users don't have access to access logs on their domain, it's due to security reasons where they should contact their host for more information on this especially when a store is running live.
Let the user decide what he wants to do.
The OP user can do whatever he wants with his store as long as safe solutions are provided to forum users which disregards the point of these replies.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 191 guests