1

安装 Chamilo 1.9 后,我得到:

Remote server or file not found

在 domain.com/chamilo/index.php

当我打开 domain.com/chamilo/version.php(只是 )时,它显示 5.3.15,其中 Chamilo 需要 5.3.X。

我以为这是我的 .htaccess 文件,但它不包含任何突兀的东西:

# Use PHP 5.3
 AddType application/x-httpd-php53 .php
 # Check that your Apache virtualhost have this settings:

#<Directory "/var/www/chamilo-classic">
#  AllowOverride All
#  Order allow,deny
#  Allow from all
#</Directory>

RewriteEngine on 
RewriteCond %{QUERY_STRING} ^id=(.*)$
RewriteRule ^certificates/$ certificates/index.php?id=%1 [L]
RewriteRule ^([^/.]+)/?$ user.php?$1 [L]

# This will transform
# http://my.chamilo.net/certificates/?id=123     to  http://my.chamilo.net/    certificates/index.php?id=123 
# http://my.chamilo.net/juliomontoya        to       http://    my.chamilo.net/user.php?juliomontoya 

但我看到我的托管服务提供商关闭了 php 错误并记录了它:

[02-Oct-2012 19:59:20 UTC] PHP Warning:  PHP Startup: magickwand: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match in Unknown on line 0
[02-Oct-2012 19:59:20 UTC] PHP Warning:  PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match in Unknown on line 0
[02-Oct-2012 19:59:20 UTC] PHP Warning:  PHP Startup: PDO: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match in Unknown on line 0
[02-Oct-2012 19:59:20 UTC] PHP Warning:  PHP Startup: pdo_sqlite: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match in Unknown on line 0
[02-Oct-2012 19:59:20 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so: undefined symbol: third_arg_force_ref in Unknown on line 0
[02-Oct-2012 19:59:20 UTC] PHP Warning:  PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match in Unknown on line 0
[02-Oct-2012 19:59:20 UTC] PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match in Unknown on line 0
[02-Oct-2012 19:59:20 UTC] PHP Fatal error:  Uncaught exception 'Exception' with message 'DateTime::__construct() [<a href='datetime.--construct'>datetime.--construct</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead' in /home/domain/chamilo/main/inc/lib/symfony/Twig/Extension/Core.php:420
Stack trace:
#0 /home/domain/chamilo/main/inc/lib/symfony/Twig/Extension/Core.php(420): DateTime->__construct('now')
#1 /home/domain/chamilo/main/inc/lib/symfony/Twig/Extension/Core.php(390): twig_date_converter(Object(Twig_Environment), 'now', NULL)
#2 /home/domain/chamilo/archive/twig/89/5c/c0f0daf45dd618c8ea2e2bbaf856.php(121): twig_date_format_filter(Object(Twig_Environment), 'now', 'Y')
#3 /home/domain/chamilo/main/inc/lib/symfony/Twig/Template.php(278): __TwigTemplate_8 in /home/domain/chamilo/main/inc/lib/symfony/Twig/Template.php on line 282

我该如何解决?

4

3 回答 3

1

在代码中添加以下行来设置应用程序的时区

date_default_timezone_set ('America / Sao_Paulo');

于 2013-05-01T16:35:54.487 回答
1

您在日志中遇到的唯一错误是(如果您向右滚动)您的 date.timezone 参数未在 php.ini 中设置(我认为您也可以使用 php_flag 在 .htaccess 中设置它)。例如,如果您在柏林,您将设置:

php_flag date.timezone Europe/Berlin

在您的 .htaccess 中(或者只是在您的 php.ini 中查找“时区”)。

如果您想包含下面提供的时区设置命令 date_default_timezone_set(),请将其放在 main/inc/global.inc.php 中,该命令由 Chamilo 中的所有脚本加载。在文件的开头,它应该可以工作......

于 2012-10-04T00:04:01.430 回答
0

好吧,显然在 htaccess 文件中设置 PHP 扩展(5.3)不使用更新 PHP 模块。所以你需要有完整的 5.3 支持而不是这个 hacky htaccess 包括

于 2012-10-02T20:23:26.493 回答