我需要在WAMP环境中设置Concerto平台来开发自适应测试。到Concerto平台的链接在这里http://code.google.com/p/concerto-platform
这是我所做的事情:
1)设置WAMP Web服务器
2)设置R语言
3)设置本地主机并检查php,mysql和R的工作情况。
现在,在Concerto设置过程中遇到了问题,
特别是在本安装指南的倒数第二步之后
../concerto-platform/wiki/installation3
Concerto安装程序成功执行了php和mysql数据库的创建。
此后,Concerto安装程序无法按照下载文件../concerto-platform/downloads/list(zip文件3.8 MB)的安装要求运行安装脚本时识别R版本。
我已将Concerto源安装zip文件的内容提取到“ C:/ wampp / htdocs / concerto”目录中,并且安装脚本index.php位于“ C:/ wampp / htdocs / concerto / setup /”子目录中。
从浏览器(localhost / concerto / setup / index.php)运行安装脚本时,出现以下错误。
“注意:第97行中C:\ wampp \ htdocs \ concerto \ setup \ index.php中的未定义偏移量0。
R版本的安装必须至少为R> = v2.12。您的R版本是:v“
它无法获取和显示已安装的R版本,实际上是R v2.14
当我检查line97和引用的php函数时,我注意到以下代码片段。
public static function rscript_check()
{
$array = array();
$return = 0;
exec("'" . Ini::$path_r_script . "' -e 1+1", $array, $return);
return ($return == 0);
}
public static function r_version_check($version)
{
$elems = explode(".", $version);
if($elems[0]>2) return true;
if($elems[0]==2)
{
if($elems[1]>=12) return true;
}
return false;
}
public static function get_r_version()
{
$output = array();
$return = 0;
exec("'" . Ini::$path_r_script . "' --version -e 1+1", $output, $return);
$version = substr($output[0],10);
$version = substr($version,0, strpos($version, " "));
echo $version;
return $version;
}
我的直觉是exec函数无法正常运行,因为我在start>中执行了等效的cmdline调用>运行“ Cmd / c G:/R/R-2.14.0/bin/Rscript.exe” --version -e 1 + 1”,并能够手动获取结果检查,但不能通过上述设置功能进行检查。我向协奏曲管理员询问,最近才开设了一个新的讨论论坛http://www.psychometrics.cam.ac.uk/page/343/discussion-forum.htm
因此,我在这里向SO社区寻求帮助。
非常感谢您设置此安装程序的任何指示。
PS:这是我在zip文件中提供的settings.php文件中输入的设置
>{phpstart
> //MySQL
->$db_host = "localhost";
->$db_port = "3306";
->$db_user = "root";
->$db_password = "";
->$db_name = "test";
>//paths
->$path_external = "http://localhost/concerto"; //e.g. http://domain.com/concerto/
->$path_r_script = "G:/Program Files/R/R-2.14.0/bin/Rscript.exe"; //e.g. /usr/bin/Rscript
->$path_r_exe = "G:/Program Files/R/R-2.14.0/bin/R.exe"; //e.g. /usr/bin/R
->$path_php_exe = "C:/wampp/php"; //e.g. /usr/bin/php
->$path_mysql_home = "C:/wampp/mysql/bin"; //Home directory of MySQL server. It will be probably needed if you want to install Concerto on Windows platform. e.g. C:/Program Files/MySQL/MySQL Server 5.5
->$path_sock = "C:/wampp/htdocs/concerto/socks/"; //leave blank for default - /[concerto_installation_path]/socks/
->$path_temp = "C:/wampp/htdocs/concerto/temp/"; //leave blank for default - /[concerto_installation_path]/temp/
>//R connection
->$r_instances_persistant = true; //true - R instances are persistant and open throughout the whole test ( faster, but consumes more system resources, EXPERIMENTAL ), false - R instances are closed and restored when needed ( slower, but consumes less system resources )
->$r_instances_persistant_instance_timeout = 300; //after set period of instance inactivity in seconds the instance will be closed
->$r_instances_persistant_server_timeout = 420; //after set period of server inactivity in seconds the server will be closed ( new instances can restart it anytime )
->$r_max_execution_time = 120; //maximum R execution time ( prevents infinite loops in R on server )
>//general
->$timezone = 'Europe/London';
->$public_registration = false;
->$public_registration_default_UserType_id = 4;
>//remote client
->$remote_client_password = "pass";
->//ALWAYS RUN /setup AFTER CHANGING SETTINGS IN THIS FILE!
->?}phpend
根据您的个人经验或在WAMP / LAMP环境中快速安装协奏曲,您的任何想法和想法,我将不胜感激。我自己在Win XP上运行它。也许有人可以建议有关此主题的一些解决方法(如果exec确实是罪魁祸首,则可以在exec()周围)。
万分感谢!
最佳答案
我有相同的配置,对我来说效果很好。
首先,我建议您使用R2.12而不是R2.14,您可以在此处获取它http://cran.r-project.org/bin/windows/base/old/2.12.1/
我还建议您通过更改“ R连接”部分来更改SETTINGS.php文件。
添加以下行
//R connection
$server_socks_type = "TCP"; // UNIX or TCP, choose TCP for any other OS than Linux
$server_host = "127.0.0.1"; //is socket server set to TCP, choose host to connect to
$server_port = "80"; //if socket server set to TCP, choose port used for connection
$r_instances_persistant_instance_timeout = 300; //after set period of instance inactivity in seconds the instance will be closed
$r_instances_persistant_server_timeout = 420; //after set period of server inactivity in seconds the server will be closed ( new instances can restart it anytime )
$r_max_execution_time = 30; //maximum R execution time ( prevents infinite loops in R on server )
$unix_locale = ""; //Unix locale LANG variable. Must be installed on the system. Leave blank for none/default.
使用WAMP时,您必须进行一些更改。
希望对您有帮助。
鬼