Hi,
I have created moodle extension as moodle/depths/mapping/depths_insert.php. It starts as:
<?php
require_once(dirname(__FILE__).'/../../config.php');
require_once('http://localhost:8080/JavaBridge/java/Java.inc');
$myLib=get_string('moodle_jar_file','depths');
java_require($CFG->wwwroot.'/'.$myLib);
If I try to deploy it I get an error message that get_string function is undefined:
javax.servlet.ServletException: java.lang.RuntimeException: PHP Fatal error: Call to undefined function get_string() in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\moodleDEPTHS\depths\mapper\depths_insert.php on line 8
php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:390)
php.java.servlet.CGIServlet.doGet(CGIServlet.java:469)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.RuntimeException: PHP Fatal error: Call to undefined function get_string() in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\moodleDEPTHS\depths\mapper\depths_insert.php on line 8
php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.parseBody(FastCGIServlet.java:473)
php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.doExecute(FastCGIServlet.java:368)
php.java.servlet.fastcgi.FastCGIServlet$CGIRunner.execute(FastCGIServlet.java:376)
php.java.servlet.CGIServlet.handle(CGIServlet.java:400)
php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:356)
php.java.servlet.CGIServlet.doGet(CGIServlet.java:469)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
What is confusing me is that I have created another set of files, such as moodle/depths/setup/mappingAllMoodleData.php, where exactly the same code works fine.
Could somebody explain me what makes the problem here?
Thanks
Zoran