简体   繁体   English

更改托管公司后,Joomla 3提供了错误

[英]Joomla 3 is giving error after changing hosting company

I have developed new website in Joomla 3 and now want to transfer it to new hosting and domain. 我在Joomla 3中开发了新网站,现在想将其转移到新的托管和域中。 I have copied all files and directories and created databases. 我已经复制了所有文件和目录并创建了数据库。 Also changed configuration file. 还更改了配置文件。 The problem is that new hosting company runs PHP 5.2.17 version and I removed this string in index.php where it is checking for php version. 问题是新的托管公司运行的是PHP 5.2.17版本,并且我在index.php中删除了该字符串,该字符串正在检查php版本。 After that I have strange error 之后,我有一个奇怪的错误

Warning: require_once(__DIR__/includes/defines.php) [function.require-once]: failed to open stream: No such file or directory in /usr/.../public_html/index.php on line 28

Fatal error: require_once() [function.require]: Failed opening required '__DIR__/includes/defines.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /usr/.../public_html/index.php on line 28

How can I fix it? 我该如何解决? Thanks in advance. 提前致谢。 I can not use php.ini and changing hosting company is big problem. 我无法使用php.ini,并且更改托管公司是个大问题。

Minimum requirement of PHP version is PHP 5.3 for Joomla 3. So you should upgrade your PHP version otherwise use Joomla 2.5 Joomla 3的PHP版本最低要求为PHP 5.3。因此,应升级PHP版本,否则请使用Joomla 2.5

You may get other issues also, if you use Joomla 3 on PHP 5.2. 如果在PHP 5.2上使用Joomla 3,可能还会遇到其他问题。 To fix this issue you need to replace __DIR__ with dirname(__FILE__) 要解决此问题,您需要将__DIR__替换为dirname(__FILE__)

The version check isn't just for show. 版本检查不只是为了显示。 Requirements for Joomla 3.* is PHP 5.3.1 or higher. Joomla 3. *的要求是PHP 5.3.1或更高版本。

Even if you fix what bugs you find now, you will definitely encounter problems later if you do not upgrade the PHP version. 即使您修复了现在发现的错误,如果不升级PHP版本,以后肯定也会遇到问题。

Just to get an idea of how ugly things can get - check the PHP changelog . 只是为了了解丑陋的事情-检查PHP changelog There are a lot of changes in 5.3.0 and 5.3.1 , and any of them can cause unexpected behavior. 5.3.05.3.1中有很多更改,并且其中任何一个都可能导致意外的行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM