安装Chamilo LMS - 找不到远程服务器或文件

时间:2012-10-02 20:11:06

标签: php apache module

安装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

我该如何解决这个问题?

3 个答案:

答案 0 :(得分:1)

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

答案 1 :(得分:1)

你的日志中唯一的错误就是(如果你向右滚动)你的date.timezone参数没有在php.ini中设置(我想你也可以用php_flag在.htaccess中设置它) )。 例如,如果你在柏林,你会设置:

php_flag date.timezone Europe/Berlin

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

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

答案 2 :(得分:1)

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

date_default_timezone_set(&#39; America / Sao_Paulo&#39;);