Did you forgot your password? You can apply for a new one.
Using scripting languages with Roxen and ChiliMoon (Inline Pike, Java, Perl, PHP, CGI etc.)
Posted at 2004-11-14 by Michael Stenitzer, Last updated at 2005-05-21 by Sascha Nemecek
Run PHP as CGI (Roxen and ChiliMoon)
/(.*)\.php(.*)$ /cgi-bin/php/$1.php$2
Note: This is for php files ending in ".php".
Note2: Remember to set the correct values in php.ini to work with a PHP binary safely (see www.php.net/ )
Note3: For M$ windows users the redirect patern should be:
/(.*)\.php(.*)$ /cgi-bin/php.exe/$1.php$2
Use the PHP scripting support module (ChiliMoon) UNVERIFIED
Note: according to some unverified information this solution is not working with threads.
Use Scripting: PHP Support. This module allows ChiliMoon/Caudium users to run PHP scripts, optionally in combination with RXML.
Applies to: Roxen , ChiliMoon
Status: Answer to be confirmed
Posted at 2004-11-14 by Michael Stenitzer, Last updated at 2004-12-09 by Michael Stenitzer
Variables are available within your script just like in RXML but written in the form scope.variable instead of the entity style &form.scope; .
<set variable="var.test" value="test" />
<?pike
write("<h2>"+var.test+"</h2>");
var.test = "prost";
?>
<h2>&var.test;</h2>
See the documentation docs.roxen.com for further parsing information.
Applies to: Roxen , ChiliMoon
Posted at 2004-11-14 by Michael Stenitzer
The <pike>/ container is depreciated, but still available in the way it was in Roxen 2.
Applies to: Roxen , ChiliMoon
Posted at 2004-11-14 by Michael Stenitzer
To avoid memory leaks in Perl, the Perl support in Roxen runs under the pragma "use strict" which requires variables to be declared.
Note: The memory leaks aren't permanent, since the subprocesses get restarted now and then.
Applies to: Roxen , ChiliMoon
Status: Answer to be confirmed
Posted at 2004-11-14 by Michael Stenitzer
Example how to read and write RXML variables:
<perl>
my $variable = '&var.test;';
print $variable ;
print '<set variable="var.test" value="asdasd" />';
</perl>
If you use the processing instruction <?perl ... ?> instead, RXML variable are not available since it doesn't RXML-parse its content. Therefore you don't need quoting (unless you want "?>" inside a string in your Perl code).
You can not access something like id->variables from within a <perl>/ container as the Perl tag is evaluated in a separate subprocess that has no access to the RequestID object. (to be confirmed)
The form variables are available in the internal hash %Roxen::Request::req_vars. There is a function $r->get_http_variables that returns this hash. (to be confirmed)
Applies to: Roxen , ChiliMoon
Posted at 2004-11-15 by Michael Stenitzer, Last updated at 2004-12-09 by Michael Stenitzer
Error: Process.create_process(): Access denied.
_builtin.create_process:create(({" … "}),mapping[11])
_builtin: create_process() modules/scripting/cgi.pike (version 2.36):748: run()
...
An error like this is usually based on wrong owner settings of the CGI script. Check if the CGI script is executable for the user running the script.
Applies to: Roxen , ChiliMoon