-2

我为 opencart 使用 shoppica 主题。当我以测试客户身份登录并单击订单历史记录部分时,我总是收到内部服务器错误 500。我没有更改 .htaccess 和配置文件中的任何内容。它来自乞讨,但从现在开始我需要它。客户面板中的所有部分都可以使用,除了订单历史记录和交易部分。一个线索是,当我向我的客户提供奖励交易时,面板中之前的交易部分会消失并给我一个内部 500 错误。请帮助我,因为我非常需要它。我不能再次安装它,因为它是 3 个月,我不能从头开始。我使用 opencart 1.5.3.1

对于另一个内部错误,我在日志中收到了这些错误:

PHP Warning:  unlink(public_html/system/cache/cache.currency.1358109327) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in public_html/system/library/cache.php on line 14
PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at public_html/index.php:104) in public_html/system/library/session.php on line 11
PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at public_html/index.php:104) in public_html/system/library/session.php on line 11
PHP Warning:  Cannot modify header information - headers already sent by (output started at public_html/index.php:104) in public_html/index.php on line 177
PHP Warning:  Cannot modify header information - headers already sent by (output started at public_html/index.php:104) in public_html/vqmod/vqcache/vq2-system_library_currency.php on line 45
4

2 回答 2

1

你应该检查 unlink 功能

于 2013-01-15T12:41:17.810 回答
1

对于这个特定问题,我为时已晚,但是由于它有很多观点,我仍然会提供答案。

对于其他在 OpenCart 中遇到 500 个服务器错误的人来说——调试这些错误时要做的第一件事是查看服务器的错误日志并找到确切的错误消息

如果没有,您可能需要通过调整 PHP 配置中的error_reportingdisplay_errorslog_errors设置来显式启用它们。您也可以直接在主 index.php 文件中临时更改它们。

一旦您知道确切的错误消息,修复它就是一个简单的过程。

我们在博客文章中介绍了一些导致 500 服务器错误的最常见 OpenCart 错误消息:OpenCart 中的服务器错误和空白页:最常见的原因

在这种特殊情况下,问题是由于您的缓存文件夹丢失或服务器不可写入的事实引起的:

PHP警告:unlink(public_html/system/cache/cache.currency.1358109327)[function.unlink]:第14行的public_html/system/library/cache.php中没有这样的文件或目录

此错误表明您的 OpenCart 货币缓存文件丢失。在大多数情况下,当您的system/cache/文件夹缺少正确的服务器权限时会发生这种情况(对于 OpenCart,通常是 775)。应该通过调整文件夹权限并从文件夹中删除所有现有缓存文件来修复它。

于 2016-07-12T10:50:04.663 回答