安装 Joomla 时遇到错误

8

我已经在本地xampp环境中安装和配置了Joomla 1.5 CMS。

安装完成后,当我访问Joomla网站时,会显示一些错误信息。

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 29

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 32

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JRequest::clean() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 33

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\environment\request.php on line 463

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\environment\request.php on line 464

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\environment\request.php on line 465

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\environment\request.php on line 466

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\environment\request.php on line 467

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\environment\request.php on line 468

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 35

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 38

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 39

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 46

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 47

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 50

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 53

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 54

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 57

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\import.php on line 58

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JFactory::getApplication() should not be called statically in C:\xampp\htdocs\mywebsite\index.php on line 31

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Redefining already defined constructor for class JObject in C:\xampp\htdocs\mywebsite\libraries\joomla\base\object.php on line 57

Strict Standards: Non-static method JApplication::getInstance() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\factory.php on line 46

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JApplicationHelper::getClientInfo() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\application\application.php on line 132

Strict Standards: Declaration of JSite::getRouter() should be compatible with that of JApplication::getRouter() in C:\xampp\htdocs\mywebsite\includes\application.php on line 377

Strict Standards: Declaration of JSite::getPathWay() should be compatible with that of JApplication::getPathway() in C:\xampp\htdocs\mywebsite\includes\application.php on line 377

Strict Standards: Declaration of JSite::getMenu() should be compatible with that of JApplication::getMenu() in C:\xampp\htdocs\mywebsite\includes\application.php on line 377

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JFactory::getConfig() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\application\application.php on line 732

Strict Standards: Non-static method JFactory::_createConfig() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\factory.php on line 73

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\registry\registry.php on line 19

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JUtility::getHash() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\application\application.php on line 101

Strict Standards: Non-static method JFactory::getConfig() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\utilities\utility.php on line 111

Strict Standards: Non-static method JFactory::getConfig() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\application\application.php on line 384

Strict Standards: Non-static method JFactory::getSession() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\application\application.php on line 770

Strict Standards: Non-static method JFactory::_createSession() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\factory.php on line 94

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JFactory::getConfig() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\factory.php on line 501

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Declaration of JSession::set() should be compatible with that of JObject::set() in C:\xampp\htdocs\mywebsite\libraries\joomla\session\session.php on line 737

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\joomla\session\session.php on line 19

Strict Standards: Non-static method JSession::getInstance() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\factory.php on line 507

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JSessionStorage::getInstance() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\session\session.php on line 108

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JFilterInput::clean() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\session\storage.php on line 57

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JFactory::getDBO() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\session\storage\database.php on line 64

Strict Standards: Non-static method JFactory::getConfig() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\factory.php on line 268

Strict Standards: Non-static method JFactory::_createDBO() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\factory.php on line 271

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 186

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 71

Strict Standards: Non-static method JFactory::getConfig() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\factory.php on line 551

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JDatabase::getInstance() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\factory.php on line 563

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JError::isError() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\factory.php on line 565

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 138

Strict Standards: Non-static method JTable::getInstance() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\mywebsite\libraries\joomla\session\storage\database.php on line 69

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\mywebsite\libraries\loader.php on lin
4个回答

16

"Strict Standards"不是技术上的错误,而是表示您安装的Joomla版本没有严格遵守PHP标准。您需要做两件事:首先,在php.ini中限制错误报告,以不将标准违规报告为错误,然后(当您准备好进行实际操作时),关闭Joomla错误报告。

在php.ini文件中更改以下内容: error_reporting = E_ALL | E_STRICT 改为 error_reporting = E_ALL & ~E_NOTICE

重新启动xampp以应用更改。

在 Joomla 的 configuration.php 文件中,将 $error_reporting 值更改为 6135。


我也遇到了同样的错误!但是你的解决方案对我没有帮助 :( - Hardik Thaker

10

谢谢大家。我已经找到了解决方案。

您需要在php.ini中禁用显示PHP错误和警告。 您可以联系您的托管提供商,或者如果您有访问该文件的权限,您也可以自行进行操作。

如果您无法访问php.ini文件,则可以尝试编辑htaccess文件。(您可以在Joomla!安装的根目录中找到此文件。如果文件名为htaccess.txt,请记得将其重命名为.htaccess)。

在您的 .htaccess 文件中添加以下内容:

代码

# supress php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_value docref_root 0
php_value docref_ext 0

你使用的是哪个版本的PHP?这可能是由于在Joomla 1.5中使用了PHP 5.3(它之前的版本不支持5.3,也不是为其构建的)所导致的。 - KingJackaL
1
@KingJackaL,大多数MAMP/WAMP/XAMPP捆绑包都预配置了PHP 5.3,更或多或少地使用默认配置。正如您所提到的,虽然Joomla 1.5已经为5.3打了补丁,但它并不一定是为它而设计的。 - jlleblanc
我已经尝试找出应该至少在“php.ini”中做哪些更改才能使它工作。所以它们是:“php_flag display_startup_errors off”和“php_flag display_errors off”。这对我起作用了! - Anton

1
在xampp/php/php.ini中更改:

    1.display_errors=Off
    2.error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING 

然后重新启动你的XAMPP。

0

在 Joomla 配置中将错误报告设置为“none”,这将关闭通知。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接