Welcome to the new Roxen & ChiliMoon FAQs. Our intention is to support and increase the Roxen & ChiliMoon community.

You can expect the following features sooner or later to appear at this site:

We need your help!

Help us to maintain these FAQs! Support the community with high quality documentation.

Topics

[ Don't show all FAQs on a single page ]

Roxen & ChiliMoon Resources

Documentation, mailing lists, etc.

Where can I find the Roxen mailinglist?

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2005-12-15 by Michael Stenitzer

Subscribe

Sign up by mailing roxen-request@roxen.com. You can send to the list via roxen@roxen.com

Unsubscribe

If you want to unsubscribe the list, just send a mail to roxen-request@roxen.com with subject 'unsubscribe'

Alternative read-only access to the mailing lists

Applies to: Roxen ,

Where do I find more information about ChiliMoon?

Posted at 2004-11-29 by Michael Stenitzer, Last updated at 2004-11-30 by Michael Stenitzer

There are three mailinglists available for ChiliMoon:

chilimoon-announce

On this list announcement are made for changes in the ChiliMoon project. A chilimoon user should at least be a member of this list.

  • Join the list by sending an email to: chilimoon-announce-subscribe@list.chilimoon.org
  • Leave the list by sending an email to: chilimoon-announce-unsubscribe@list.chilimoon.org

chilimoon-users

This list is to discuss every day problems when using the ChiliMoon Webserver. Users are also invited to discuss RXML.

  • Join the list by sending an email to: chilimoon-users-subscribe@list.chilimoon.org
  • Send your messages to: chilimoon-users@list.chilimoon.org
  • Leave the list by sending an email to: chilimoon-users-unsubscribe@list.chilimoon.org

chilimoon-dev

On this list the discussion of future development of the ChiliMoon Webserver takes place.

  • Join the list by sending an email to: chilimoon-dev-subscribe@list.chilimoon.org
  • Send your messages to: chilimoon-dev@list.chilimoon.org
  • Leave the list by sending an email to: chilimoon-dev-unsubscribe@list.chilimoon.org

The chilimoon-dev list is also available on lyskom, subscribe to ChiliMoon (-) Mooh, Mooh at the kom.lysator.liu.se lyskom server.

Applies to: ChiliMoon

Is there also a ChiliMoon version with CMS?

Posted at 2004-12-01 by Marc Dirix

No there isn't. ChiliMoon is only based on the Roxen Webserver parts.

Code-parts needed by Roxen CMS are kept as is, making it possible, however currently not supported, to run Roxen CMS ontop of ChiliMoon.

Applies to: ChiliMoon

What is ChiliMoon?

Posted at 2004-12-06 by Michael Stenitzer

ChiliMoon is what we like to call a "next generation" internet server[1]. ChiliMoon is a fork of the Roxen Webserver which is a very extensible internet server built completly in the Pike programming language. ChiliMoon will be based on Roxen 4.0.

Currently [Dec 04] a couple of people are preparing a public announcement and a first release of ChiliMoon.

  • If you are an experienced developer or want to support developers (e.g. by writing documentation or specifications) you can join the effort by subscribing the chilimoon-dev mailing list (see FAQs).
  • If you are a potential user of ChiliMoon wait until the chilimoon-announce list will inform you about major steps. Probly you will also hear about it at several related list (Roxen, Pike, Caudium).

Note [1]: It is important to distinguish between a webserver and an internetserver. Internet is much more than just the world wide web.

Applies to: ChiliMoon

Comments

Posted by Marc Dirix (2004-12-06)

Synchronisation between ChiliMoon and Roxen webserver will keep taking place.

[hide comments]

Installation

Installing Pike, Roxen & ChiliMoon on different platforms

Do I have to reinstall / recompile Roxen after installing / compiling a new Pike version?

Posted at 2004-11-16 by Sascha Nemecek

No, but you might need to restart Roxen with --remove-dumped.

When you are already running a custom Roxen-Pike setup, do not forget to update all symlinks, so that they pointing to the new Pike installation (e.g. /roxen/server-4.0.172/bin/roxen).

Applies to: Roxen , ChiliMoon

Is the use of the Roxen CMS Personal Edition restriced in any way?

Posted at 2004-11-21 by Michael Stenitzer

You have to fill out the registration form at download.roxen.com.

The license agreement says that you are allowed to install one "Web Site", but the intention is only to limit the number of CMS sites. The restrictions built in to the product only applies to CMS modules and there is nothing to stop you from fully taking advantage of the WebServer parts.

Applies to: Roxen ,

How can I use my own MySQL server instead of installing another one with Roxen?

Posted at 2004-11-21 by Michael Stenitzer, Last updated at 2004-11-30 by IzNoGooD

 cd /usr/local/roxen/server/mysql 
 mkdir libexec 
 mkdir share 
 ln -s /usr/local/libexec/mysqld libexec 
 ln -s /usr/local/share/mysql share 

Adjust the paths in the last two lines with paths to match wherever MySQL is installed on your system. ChiliMoon supplies a script in the mysql directory to do this job for you.

Note: be aware that you might be restricted to certain MySQL versions. (see according FAQ)

Applies to: Roxen ,

Starting Roxen 3.3 on Redhat 9 fails with "Roxen X.X requires MySQL support"

Posted at 2004-11-21 by Michael Stenitzer, Last updated at 2005-01-09 by Michael Stenitzer

The problem is due to Redhat’s new thread library.

Workaround: Add the following lines to ../local/environment:

 LD_ASSUME_KERNEL=2.4.1  
 export LD_ASSUME_KERNEL 

See Bug3492

Applies to: Roxen (3.3) ,

After updating to Roxen 4 the server fails to start because MySQL does not start

Posted at 2004-11-21 by Michael Stenitzer

You find an error message in the debug log:

 Failed to start MySQL. Aborting 

If you copied your configurations directory from an older Roxen, delete the file <roxenhome>/configurations/_mysql/my.cnf so that 4.0 can recreate it with correct options. It's probably missing a

 user = root 

line.

Note: If you run the Roxen process with another UID/GID you can also use this UID/GID for the MySQL process (don't forget to chown/chgrp the mysql-files to the UID/GID before starting Roxen with this combination).

Applies to: Roxen (4.0) ,

How can I get a look into Roxen’s self extracting installation files?

Posted at 2004-11-22 by Michael Stenitzer

They are just normal TAR files. You might want to rename them to have a glance into the containing files.

Applies to: Roxen ,

What libraries do I need to install Roxen/ChiliMoon?

Posted at 2004-11-27 by Michael Stenitzer, Last updated at 2004-12-05 by Michael Stenitzer

If you choose the binary installation files all libraries are compiled in. You just need your native database libraries to run Roxen / ChiliMoon with a different database than MySQL.

If you want to install the source package or build your own Pike, you have to be sure to install the necessary libraries in advance:

  • gmp (gmp-devel) (Bundled with pike)
  • zlib
  • libs for image support (jpeg, tiff and whatever you need)
  • libs for truetype rendering (freetype2-devel, ttf)
  • mysql-devel (or libmysql-devel)
  • optionally libs for other databes support (oracle, postgres etc.)
  • optionally libs for Java support (JDK)
  • Nettle (bundled with Pike)

GMP and Nettle are both bundled with Pike source distributions and are built during the Pike build process if you don't have a local installation.

Applies to: Roxen , ChiliMoon

Where can I get ChiliMoon?

Posted at 2004-11-30 by IzNoGooD

Anonymous access to the CVS should be possible through:

cvs -d :pserver:anonymous@cvs.lysator.liu.se:/cvsroot/ChiliMoon login 
cvs -d :pserver:anonymous@cvs.lysator.liu.se:/cvsroot/ChiliMoon co ChiliMoon/2004 

Applies to: ChiliMoon

Are there migration issues when migrating from Roxen 4.0 to ChiliMoon?

Posted at 2004-12-02 by Marc Dirix

There are no real issues to be taken care of when migrating from Roxen 4.0 to ChiliMoon at the moment.

One should however keep in mind that all compatibility layers for older Roxen versions have been stripped. So if you use them, please reconsider first updating your RXML code.

Applies to: ChiliMoon
Status: Answer to be confirmed

Comments

Posted by Sascha Nemecek (2005-02-02)

Maybe it is worth mentioning that the scope "roxen" has been changed to "server".

[hide comments]

Pike and Roxen / ChiliMoon

Roxen and ChiliMoon are written in Pike

Where can I get a recent Pike?

Posted at 2004-11-16 by Sascha Nemecek, Last updated at 2004-12-05 by Sascha Nemecek

The official download place is pike.ida.liu.se/download/

A well maintained mirror is:

Be aware that daily builds are usally not as stable as official releases and not recommend for production environment.

Fresh Pike source snapshots are provided by Xenofarm at IDA:

You can get the latest cvs version from roxens' cvs:

cvs -z3 -d :pserver:anon@cvs.roxen.com:/cvs logincvs -z3 -d :pserver:anon@cvs.roxen.com:/cvs co Pike/7.7 

Applies to: Roxen , ChiliMoon

How can I use my own Pike version instead of the one installed with Roxen?

Posted at 2004-11-16 by Sascha Nemecek, Last updated at 2004-12-05 by Sascha Nemecek

It is not necessary to place the whole Pike installation in your Roxen's server location. Simply symlink roxen/server/bin/roxen to your Pike binary, e.g.:

ln -s /usr/local/pike/7.6.15/bin/pike /usr/local/roxen/server-4.0.158/bin/roxen 

Be aware that Roxen's different versions are usually restricted to certain Pike versions.

You can also select a pike to use by setting the environment variable *PIKE*:

$ PIKE=/usr/local/bin/pike 
$ export PIKE 
$ ./start 

If you have multiple server versions inside a single roxen directory, you can also place a pike symlink in <roxenhome>/local/bin instead of <roxenhome>/<serverversion>/bin

Applies to: Roxen ,

Which versions of Roxen/ChiliMoon and Pike fit together?

Posted at 2004-11-21 by Michael Stenitzer

Chilimoon 2004

  • get the latest Pike 7.7 available from CVS

Roxen 2.0

  • Pike 0.7

Roxen 2.1

  • Pike 7.0

Roxen 2.2

  • Pike 7.2

Roxen 3.3

  • Pike 7.2

Roxen 3.4 [see Note 1]

  • Pike 7.2 (should also run with Pike 7.4 but not officially supported)

Roxen 4.0

  • Pike 7.4
  • Pike 7.6 (release later than 7.6.6) [see Note 2]
  • Pike 7.6 from CVS later than 2004-08-16 [see Note 2]

[Note 1] there has been no official release of WebServer 3.4, it was only available as Roxen CMS Personal Edition or as WebServer from CVS

[Note 2] supported only in Pike 7.4 compatibility mode

Applies to: Roxen , ChiliMoon

Compiling Pike from source failed?

Posted at 2004-11-21 by Michael Stenitzer, Last updated at 2004-12-05 by Sascha Nemecek

When building pike straight from CVS : A common reason is, that you must have a (old) pike binary in the path when you build pike since some of the source files are generated by pike programs.

Compiling from a source dist (such as provided by Xenofarm) is supported without having a prior installed pike.

Applies to: Roxen , ChiliMoon

Where can I find more Pike information on the Internet?

Posted at 2005-08-07 by Bill Welliver

The GotPike.org website has an assortment of Pike related content, including a Pike mailing list search engine, and the Pike Module Repository.

www.gotpike.org

Applies to: Roxen , ChiliMoon

Server Administration

Manage your Roxen and ChiliMoon server

Why is it not possible to bind a recently changed domain name?

Posted at 2004-11-15 by Michael Stenitzer

If you have recently changed a nameserver setting for your domain it might fail to bind because its being cached by Roxen’s own DNS cache.

Flush the caches in the Tasks -> Maintenance tab.

Applies to: Roxen , ChiliMoon

How can I delete the Demo module’s history (if there is some misbehaving RXML in there)?

Posted at 2004-11-15 by Michael Stenitzer

Delete the files under roxen/var/demomodule-bookmarks/<your site>/.

Applies to: Roxen , ChiliMoon

How can I easily create a site configuration template?

Posted at 2004-11-15 by Michael Stenitzer

Go to Tasks -> Maintenance -> Create site template

Applies to: Roxen , ChiliMoon

Where does Roxen / ChiliMoon look for files with relative paths?

Posted at 2004-11-15 by Michael Stenitzer

If you use relative paths in Roxen’s / ChiliMoon's configuration they always refer to the start directory (e.g. /usr/local/roxen/server/).

Applies to: Roxen , ChiliMoon

Why does the automatic server update fail?

Posted at 2004-11-15 by Michael Stenitzer

Don't worry if you find a regular error message “Update: Failed to connect to update server to fetch information about new packages” in event log. The update server has been out of work for a long time. It’s working again with Roxen 4.0 (well, at least it does not show any error messages, at the other hand i haven't recieved any update package so far).

Applies to: Roxen , ChiliMoon

How can I have my old log files zipped and removed?

Posted at 2004-11-15 by Michael Stenitzer

You just have to move the current log, wait a couple of minutes, and then Roxen will start a new one at the old location on its own.

Additionally you may want to install a cron job to compress or remove old log files, e.g.:

 find /usr/local/roxen/logs/ -name 'Log.????-??-??' -mtime +7 \ 
     -exec gzip {} \; 
 find /usr/local/roxen/logs/ -name 'Log.????-??-??.gz' -mtime +30 \ 
     -exec rm {} \; 

This will gzip files after a week and remove them after a month.

Applies to: Roxen , ChiliMoon

What signals can be handled by the Roxen / ChiliMoon process?

Posted at 2004-11-15 by Michael Stenitzer

  • SIGHUP - Reloads the configuration
  • SIGQUIT - Generate a thread dump
  • SIGTERM - Restarts the server process
  • SIGINT - Restarts the server process
  • SIGALRM - Force ABS restart
  • SIGKILL - Exit harder
  • SIGABORT - Exit and generate a core dump

Applies to: Roxen , ChiliMoon

I have lost access to the administration interface (forgot password or the address/port). How can I get it again?

Posted at 2004-11-15 by Michael Stenitzer

Run

	create_configinterface -a 

to create a new create a new administrator user with which you can change the password of the old one.

You can get more options of for creating a configuration interface (e.g. how to create with a batch process) by running

	create_configinterface --help 

You can get the address or port either by having a look at the configuration file for the administration interface (search for <var name='URLs'> by default in the file /configurations/Administration_Interface) or have a look into the debug log (logs/debug/default.1).

Applies to: Roxen , ChiliMoon

Why does log analyzing not report correct user-agents?

Posted at 2004-11-15 by Michael Stenitzer

By default Roxen / ChiliMoon writes encoded user-agent identification strings (spaces are replaced by %20) to the log files. You have several solutions to solve this:

  • Newer versions of Roxen allow to define the log string format with “$user_agent_raw” instead of “$user_agent”.
  • Use Awstats log analyzer. It provides a configuration option to use it with Roxen’s / ChiliMoon's log files.

Applies to: Roxen , ChiliMoon

Why does binding a port fail on IP or Url?

Posted at 2004-11-15 by Michael Stenitzer, Last updated at 2004-12-05 by Sascha Nemecek

Error message: "Binding the port failed on <IP> for <url>."

If Roxen / ChiliMoon says it can&#8217;t register the port, it most likely failed to bind it. Reasons might be:

  1. the server isn't running as root, which it may need to in order to bind low port numbers (below 1080),
  2. some other process has already bound the port (check with lsof or some other similar program),
  3. you've entered an explicit domain name, and DNS doesn't map this domain name to an IP address you can bind.

Applies to: Roxen , ChiliMoon

I want to run a virtual server on https, but binding failed.

Posted at 2004-11-15 by Michael Stenitzer

You can not run two https servers on the same IP and the same port. IP and port must together form an unique pair. If you have several virtual https servers, they need either different IPs or different port numbers. This is a restriction of the https protocol.

Applies to: Roxen , ChiliMoon

RXML

Can I use more than one plugin in a <cond>'s <case>

Posted at 2004-11-16 by Sascha Nemecek

Unfortunately, no! You'll have to use the normal <if><else> structure instead.

Applies to: Roxen ,

Developing and testing RXML can be hard when I always have to embed it into HTML pages. Any tip for easy RXML development?

Posted at 2004-11-17 by Michael Stenitzer

Use the demo module, but be careful to restrict access through the security tab.

Applies to: Roxen , ChiliMoon

How can I avoid having so much whitespace in my pages using RXML?

Posted at 2004-11-17 by Michael Stenitzer

Using RXML always causes a lot of spaces and newlines to be added to the code. You can try to put thing that does not have to generate output in a <nooutput>-container. Another way to go is to add the whitespace remover module, which will remove superfluously whitespace, but in doing so you add an additional parsing overhead.

Applies to: Roxen , ChiliMoon

Comments

Posted by Sascha Nemecek (2009-04-23)

You can also use <nooutput>/ in the context of defines, where it is important to add no additional whitespace. Here is a simple example:

<define tag="example" trimwhites="trimwhites"> 
  <attrib name="attribute1">1</attrib> 
  <attrib name="attribute2">somevalue</attrib> 
<nooutput> 
 
<do-something /> 
<emit host="&var.myhost;" source="sql" query="&var.query;"><set variable="example.output" from="sql.value" /></emit> 
</nooutput>&example.output:none; 
</define>  

Please consider that this technique requires the trimwhites attribute to be set!

Reply by Michael Stenitzer (2009-04-23)

The problem with <nooutput /> was always that the containers have to be well formed - which leads in real life to restrictions soon.

[hide comments]

Some RXML is not working as intended after importing configuration to a newer server version

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2004-12-05 by Sascha Nemecek

For Roxen:

Check the compatibility level of your site's settings tab. After an server update it will be set to your old server's level.

For Chilimoon:

ChiliMoon aims to be compatible with RXML 2.0, all other compatibilty layers are removed. If your page contains older RXML-code please update the code even if it still works, it might not work with future versions.

If you think the RXML 2.0 parser is not behaving the way it should, then post a message at the ChiliMoon developers mailinglist (chilimoon-dev.)

Applies to: Roxen , ChiliMoon
Status: Answer to be confirmed

How can I create dynamicly comments with RXML?

Posted at 2004-11-17 by Michael Stenitzer

<maketag>/ is your friend.

 <maketag type=container name=comment>&var.anything;</maketag> 

or

 <maketag type=container name=cdata>&var.anything;</maketag> 

Applies to: Roxen , ChiliMoon

Comments

Posted by Paulo Amaral (2016-03-30)

To dynamically generate <!-- HTML comments --> using variables, use &lt; and &gt; inside <eval/>:

<eval>&lt;!-- &var.comment_contents; --&gt;</eval> 
[hide comments]

How can I avoid an infinite loop when redefining a HTML tag with RXML?

Posted at 2004-11-17 by Michael Stenitzer

If you want to redefine an HTML tag with RXML's <define>/ you might end up in an infinite loop by parsing the redefined tag again and again. Use the <?noparse ?> processing instruction around the redefined HTML tag in your definition.

Example:

 <define container=”h2”> 
   <?noparse <h2?> &_.args:none;>Header</h2> 
 </define> 

Applies to: Roxen , ChiliMoon

How can I use arrays in RXML?

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2006-01-07 by Marc Dirix

The new implementation in Roxen and Chilimoon is to use <append type="array">:

<set variable="var.array" value="value1" /> 
<append variable="var.array" value="value2" /> 
<append variable="var.array" value="value3" /> 

Output either by:

<emit source="values" variable="var.array" > 
&_.value; &_.index; 
</emit> 

Or where n is the index of the value (e.g. 1,2,3...):

&var.array.n; 

--

Currently this is only possible in a very restriced way. Use <set> in combination with the split attribute. E.g.:

<set variable="var.array" value="name1::value1;name2::value2;name3::value3" /> 
<emit source="values" scope="outer" variable="var.array" split=";"> 
  <emit source="values" scope="inner" variable="outer.value" split="::"> 
    <cond> 
      <case variable="inner.counter == 1"> 
        <set variable="var.name" from="inner.value" /> 
      </case> 
      <case variable="inner.counter == 2"> 
        <set variable="var.value" from="inner.value" /> 
      </case> 
    </cond> 
  </emit> 
  <p>Name: &var.name;<br /> 
  Value: &var.value;</p> 
</emit> 

Applies to: Roxen , ChiliMoon

What means the RXML parse error: This tag doesn't handle content?

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2004-11-30 by IzNoGooD

Some tags don't take input between open and close tag. They have to be terminated at the end of the opening tag: <tag />.

For example sqltable which takes a query as argument not between open and close tag: <sqltable query="select names from group where age=10" />

Applies to: Roxen , ChiliMoon

How can I change the behaviour of the last row in an <emit>/ container?

Posted at 2004-11-17 by Michael Stenitzer

Use <delimiter>/ which adds the content of this container to every processed row except the last one.

 <set variable="var.test" value="this,that,other"/> 
 <emit source="values" values="&var.test;" split=","> 
     team LIKE '&_.value;' <delimiter>OR</delimiter> 
 </emit> 

Result:

  team LIKE 'this' OR team LIKE 'that' OR team LIKE 'other' 

Applies to: Roxen , ChiliMoon

Why does <insert href=http://host/path/> not work?

Posted at 2004-11-17 by Michael Stenitzer

You explicitly have to allow <insert#href/> in the admin-interface in the additional rxml-tags' module. Note that the thread will be blocked while it fetches the web page.

Applies to: Roxen , ChiliMoon

Why is the <attrib>/ container of an <define>/ not working as intended?

Posted at 2004-11-17 by Michael Stenitzer

If you are setting an attribute with a value not available at the time a <define>/ is parsed, you might end up in an empty attribute.

Example:

 <define container="c"> 
  <attrib name="headline">&var.name;</attrib> 

The problem is, that the <attrib>/ containers being parsed at definition time (together with define, as they are actually belonging to define). At that time your variable var.name has no value assigned.

Applies to: Roxen , ChiliMoon

Is there a way to handle cases when <emit>/ does not return any rows?

Posted at 2004-11-17 by Michael Stenitzer

Use

 <emit></emit> 
 <else>No rows returned</else> 

See also documentation for <emit></emit>.

Applies to: Roxen , ChiliMoon

Why does inserting a file with <eval><insert file="file" /></eval> not work as intended?

Posted at 2004-11-17 by Michael Stenitzer

The intention of the concept <eval><insert file="file" /></eval> is to insert a file into another one and parse it (<eval>/) after insertion. Therefore it is important NOT to use extensions which will be parsed by the RXML parser (like rxml, html, xml etc., set in the rxml-parser module interface) at the stage of insertion.

Applies to: Roxen , ChiliMoon

How can I avoid caching of a page?

Posted at 2004-11-17 by Michael Stenitzer

 <expire-time now="now"/> 

Applies to: Roxen , ChiliMoon

Using <header /> does not show the expected behaviour in the browser

Posted at 2004-11-17 by Michael Stenitzer

Be careful that header names in http are case sensitive.

Applies to: Roxen , ChiliMoon

How can I insert an tag's attribute stored in a variable?

Posted at 2004-11-17 by Michael Stenitzer

<tag &var.test; /> is not allowed according to XML specifications and does not work in Roxen. Variables (entity references) are only recognized in normal text and in argument values.

You can achieve this by using a "splice" argument:

 <tag ::="&var.test;" /> 

Applies to: Roxen , ChiliMoon

How can I create a tag from a variable <&var.name;>?

Posted at 2004-11-17 by Michael Stenitzer

You have to use <maketag>/

Applies to: Roxen , ChiliMoon

How can I insert a tag within another one's attribute (e.g. <form action="<tag />" />)?

Posted at 2004-11-17 by Michael Stenitzer

Roxen parses the arguments to all tags, but only for entity references and not other tags (which would encourage invalid XML).

  <set variable="var.tmp"><tag/></set> (verify) 
  <form action="&var.tmp;">...</form> 

You can also build your tag (<form> in the example above) by using <maketag>/

Applies to: Roxen , ChiliMoon

Why are my UTF-8 characters in form variables treated as two separate single-byte characters

Posted at 2007-01-24 by Michael Stenitzer

The reason is that the server does not know about the encoding in a form because this information is usually not sent by the browser. This is also the reason why <vform> might fail verification for an input-length.

Use <roxen-automatic-charset-variable/> in the form, so Roxen will know about your encoding. See the Roxen manual page for further information.

Applies to: Roxen , ChiliMoon

How can I prevent variables from being parsed?

Posted at 2004-11-16 by Sascha Nemecek, Last updated at 2004-11-22 by Michael Stenitzer

If one wants to specify a variable reference in the content that should not be expanded right away, it is possible to use the special syntax with a ":" first, e.g. "&:foo.bar;". Every parse step just removes one colon at the front and leaves the rest.

Applies to: Roxen , ChiliMoon

How can I test if a variable is empty / not set / not empty?

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2007-01-26 by Michael Stenitzer

 <if sizeof="var.test = 0">empty or not set</if> 
 <if match="&var.test; = ">empty or not set</if> 
 <if variable="var.test = ">empty, but set</if> 
 <if variable="var.test = ?*">the variable contains 1 or more characters</if> 
 <if sizeof="var.test">variable set (might be empty)</if> 
 <if sizeof="var.test > 0">the variable contains 1 or more characters</if> 

Applies to: Roxen , ChiliMoon

What is the difference between a <define>/ and a <set>/ container?

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2004-11-22 by Michael Stenitzer

<define></define>, unlike most RXML tags, does not preparse its content while <set></set> does. Use either the preparse="preparse" attribute to parse it immediately or use <eval>/ to parse it at the time of inserting the variable.

Applies to: Roxen , ChiliMoon

I have found no docs or reference for <cset>/

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2004-11-22 by Michael Stenitzer

It is depreciated. Use <set></set>. But <cset>/ also has an advantage to <set>/: it does not need type conversion. see Bug 3553 community.roxen.com/crunch/show_bug.cgi?id=3553 .

Applies to: Roxen , ChiliMoon

I have a dot in my variables name and I get the error 'no current scope'

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2004-11-22 by Michael Stenitzer

Escape the dot in the variable name with a second dot.

Example:

 scope: form, variable: test.1 
 &form.test..1; 

Applies to: Roxen , ChiliMoon

I get the error 'no current scope'

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2004-12-07 by Sascha Nemecek

Only the scope "var" and "form" are always available. If you temporarily want to add an additional scope, you can do this by using the <scope>/ container.

If you have problems with the extend attribute, you should have a look at roxens bug crunch and check if you are using a recent rxmltags.pike (>1.471). See: https://community.roxen.com/crunch/show_bug.cgi?id=3831.

Applies to: Roxen , ChiliMoon

How can I handle a variable coming from a multiple value form?

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2004-11-22 by Michael Stenitzer

The values are split by NULL characters.

form.ID=v1\0v2\0v3\0v4 

Use <emit#value> to retrieve all single values

 <emit source="values" value="&form.ID;"> 
   &_.value; <br /> 
 </emit> 

You can also use &form.ID.1;, if you know what index your value has.

Applies to: Roxen (2.1+) , ChiliMoon

Comments

Posted by Marc Dirix (2005-01-27)

In my experience only:

<emit source="values" variable="form.ID"> &_.value; </emit>

works in ChiliMoon, haven't tried it against Roxen yet.

[hide comments]

How can I insert a variable into a variable?

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2007-01-26 by Michael Stenitzer

 <set variable="var.1" value="1" /> 
 <set variable="var.test1" value="finally!" /> 
 &var.test&var.1;; <!-- does not work! --> 

Solution 1:

 <eval>&var.test&var.1;;</eval> 

Solution 2:

 <insert variable="var.test&var.1;" /> 

Solution 3:

 <if variable="var.test&var.1;"> 
    <!-- Checking if the variable exists first since next variable assignment generates run error --> 
     <set variable="var.tmp" from="var.test&var.1;"/> 
     &var.tmp; 
 </if> 

Applies to: Roxen , ChiliMoon

Comments

Posted by Marc Dirix (2004-12-24)

If you can do this backwards eg, create a variable seperated by \0, doesn't that leave us with an indexable array? However,

<set variable="var.ID" value="V1\0V2\0V3" />  

does not seem to work.

[hide comments]

Why do I sometimes get an error when use <set>/ or <append>/ containers?

Posted at 2004-11-22 by Michael Stenitzer

Possible error messages are:

 RXML parse error: Cannot append another value ... to non-sequential type any. 

or

 RXML parse error: Unknown tag ... is not allowed in context of type any. 

This is due to the fact that <set>/ and <append>/ needs type conversion if the content is not a string but of type "text/html". The type conversion attribute in <set> is undocumented.

Example:

 <set variable="var.test" type="text/html">this is a <a href="#">link</a></set> 

Applies to: Roxen , ChiliMoon

Comments

Posted by Paulo Amaral (2016-03-08)

This error also happens when using RXML tags and variables inside <set>...</set> (without the value="..." parameter).

In this case you must set the variable type as *text/plain*:

<set variable="var.myquery" type="text/plain"> 
    SELECT  `column1`, 
            `column2`, 
            `column3` 
    FROM    `mytable` 
    WHERE   `ispublished`=<if variable="form.state=published">1</if><else>0</else> 
    AND     `username`='&fom.namesearch:mysql;' 
</set> 
[hide comments]

RXML Compatibility & Migration

Differences between different versions

How can I import a site's configuration from an old version's configuration files?

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2004-12-02 by Marc Dirix

For Roxen:

Move the configuration file to the correct path in the file system (e.g. /usr/local/roxen/configuration/). Be aware that the compatibility level is automatically set to your old server's version, what can bring up quite annoying and hard to find errors. Set the compatibility level in the site's settings tab.

For ChiliMoon:

ChiliMoons' installation script will automatically detect a previous configuration file and will not overwrite it with a new one. Once the server is restarted setting will be as with a previous version. No compatability layer is activated because there aren't any.

Applies to: Roxen , ChiliMoon

How did the handling of <contents/> change?

Posted at 2004-11-22 by Michael Stenitzer

The passed contents of a defined container is RXML evaluated at the first encountered <contents/>. The result of this will be reused for each succeeding <contents/> within the same definition.

Applies to: Roxen (changed after 2.2) ,

Is there a way to use/convert old RXML 1.x pages?

Posted at 2004-12-02 by Marc Dirix, Last updated at 2004-12-06 by Michael Stenitzer

ChiliMoon

Unfortunately not at the moment. It should not be hard to convert the current caudium parser into a working ChiliMoon module. Just keep in mind not to make large changes in the ChiliMoon core.

Roxen > 2.0

There is a compatibility module available, although it is not recommended to be used. There are many reasons to move on to RXML 2.

Applies to: Roxen , ChiliMoon

Connecting to And Working With a Database

Connecting to different database servers, advanced ways to query your database

Why is Roxen using its own "internal" MySQL setup?

Posted at 2004-11-15 by Michael Stenitzer, Last updated at 2004-11-29 by Marcus Agehall

Roxen and ChiliMoon stores some stuff in its local database:

Argument cache, cimg cache, precompiled security patterns (eg htaccess), gbutton cache, gtext cache, roxen module list, precompiled pike files, session cache, update information, etc...

Most of which is information that is easily reconstructed, or doesn't matter much if it gets lost. Therefore this data does not have to be backuped.

One important point here is that the <accessed/> tag may store information in the database. If the database gets zapped, your accesscounters may get zapped as well. This may be bad, so to make sure that you don't suffer any data loss, please back up the internal mysql-files as well.

Applies to: Roxen , ChiliMoon

Can I use a different database server for the internal caching?

Posted at 2004-11-15 by Michael Stenitzer, Last updated at 2005-02-14 by

No you can't. Developers have chosen MySQL for many reasons, not the least of them MySQL being the fastest in the way it is used (for caching purposes eg.) It is not recommended to use the internal database for your own project, because there are no backups made of the database.

You are not forced to use MySQL for your own data, it just uses it for its own purposes. You are free to use whatever database server you want for your own data.

Applies to: Roxen , ChiliMoon

Can I connect to a Database-Server using a socket file?

Posted at 2004-11-17 by Michael Stenitzer, Last updated at 2005-12-02 by Sascha Nemecek

Yes. "Create new database" in the administration interface's DBs tab. Choose type "external" and insert an Url in the form of

 Unix: mysql://user:password@:/path/to/mysql/socket/db-name 
 Win: mysql://user:password@:C_/path/to/configurations/_mysql/pipe 

Roxen uses socket when connection is made to mysql://localhost/db and if the operating system permit it.

Applies to: Roxen , ChiliMoon

How can I access the internal database?

Posted at 2004-11-20 by Michael Stenitzer, Last updated at 2004-12-05 by Michael Stenitzer

You can access the the internal databases from the command-line MySQLl program if you have read/write access to the mysql socket file (which is located in the "_mysql/" sub-directory of the configuration directory usally accessed as "../configurations" relative to the server directory).

Start the MySQL command-line client like this:

 mysql --socket=/usr/local/roxen/configurations/_mysql/socket -u rw 

An alternative is to connect via TCP-IP. Connect to the MySQL server via socket file. Create an user with the rights for external access (see MySQL manual) and change the bind addresse in /usr/local/roxen/configurations/_mysql/my.cfg to

 bind-address = 192.168.0.13               # (or whatever your IP is).  
 port=3307                                 # optionally, if you want to change from the standard port 3306 

Another option to change the bind address and port is to set the environmental variables in roxen's startup-script

 export MYSQL_HOST=192.168.0.13            # (optionally, default 127.0.0.1) 
 export ROXEN_MYSQL_TCP_PORT=3306 

Applies to: Roxen , ChiliMoon

How can I connect to a database from an embedded Pike script?

Posted at 2004-11-20 by Michael Stenitzer

The cleanest way is to set up your database links inside the administration interface, so you don't have to embed any database names or passwords in the script itself:

 <?pike 
 object sq=DBManager.get("mydb"); 
 array result=sq->query("select id, name, address from mytable"); 
 write("%d records:<br>\n", sizeof(result)); 
 foreach (result, mapping row)  
 { 
    write("ID: %s<br>Name:%s<br>Address:%s<br><br>\n",  
        row->id, row->name, row->address); 
 } 
 ?> 

Applies to: Roxen , ChiliMoon

What MySQL versions can be used?

Posted at 2004-11-20 by Michael Stenitzer, Last updated at 2004-12-02 by Michael Stenitzer

Roxen older than 4.0 shipped with MySQL 3.23 but should also work with MySQL 4.0 (but not later). You have to be careful to compile Pike earlier than 7.4 using MySQL 3.23 client libraries - they connect just fine to a MySQL >=4.0 server. Roxen 4.0 ships with MySQL 4.0. Pike 7.4 and later compiles with MySQL 4.0 / 4.1 client libraries.

ChiliMoon has the same requirements for MySQL version as Pike CVS does. Which means MySQL >=4.0 server for now.

Applies to: Roxen , ChiliMoon
Status: Answer to be confirmed

Comments

Posted by Sascha Nemecek (2005-05-21)

If you receive the following message:

Couldn't reconnect to SQL-server Client does not support authentication protocol requested by server; consider upgrading MySQL client

You must either update your Pike version to support the MySQL 4.1 authentication or tell mysql to use the old password authentication: mysqld --old-passwords

Reply by Sascha Nemecek (2008-02-08)

When trying to access a MySQL Server >= 4.1 using newer user account, you have to recreate the passwords with MySQL's OLD_PASSWORD() function.

mysql> SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd'); 

Posted by Sascha Nemecek (2008-02-08)

At least under Windows, Roxen seems to have problems with UTF8 character encoding. Try disabling it in my.ini as a quick workaround:

# default-character-set=utf8 
[hide comments]

Is there a way to set an option somewhere in Roxen or the environment so that Oracle date/time fields are returned as ISO standard dates (yyyy-mm-dd 24:00:00)?

Posted at 2004-11-20 by Michael Stenitzer

  • insert <sqlquery host="your_host" query="alter session set nls_date_format='YYYY-MM-DD'" /> somewhere at the top of every page, or
  • if you have access to the startup scripts of the Roxen server, simply set the environment variable NLS_DATE_FORMAT there, or
  • or even better, just add a line "export NLS_DATE_FORMAT=..." to local/environment.

Applies to: Roxen , ChiliMoon

I can not access a certain database from my site

Posted at 2004-11-20 by Michael Stenitzer

  • Check if you have access to the database from the DB manager (DB tab in the admin interface)
  • Check if your site has according rights (R=Read and/or W=Write) in the administration interface's DB manager
  • You might also check if you have access to DB from your host in general and from Pike in special

Applies to: Roxen , ChiliMoon

How are NULL values returned from DB queries handled in RXML?

Posted at 2004-11-21 by Michael Stenitzer

Internally the column variables are "UNDEFINED" if the value in the row is NULL. Undefined variables in RXML tested with <if variable="sql.col">/ will return false for a NULL value in the row's column "col", and true for an empty string in this column. Inserting an undefined variable in RXML will give an empty string as result.

Applies to: Roxen , ChiliMoon

How do I get binary data (eg. an image) out of my database?

Posted at 2004-11-21 by Michael Stenitzer

In your main page write

 <img src="getimage?id=12332" /> 

The getimage.html page that looks like

 <header name="Content-Type" value="image/jpeg" /><emit source="sql" query="select * from binfiles where id=&form.id"><img src="&sql.binary;"/></emit> 

Important note: write this in one line so you don't add any extra linefeeds to the output image.

Alternative option:

 <emit source='sql' query='select imagedata from images where id=37'> 
   <cimg data='&sql.imagedata:none;'/> 
 </emit> 

This solution is worse from a scalability viewpoint, since using the cimg tag produces a copy of the image in the image cache

Applies to: Roxen , ChiliMoon

How can I use other database systems than MySQL?

Posted at 2004-11-27 by Michael Stenitzer

If you install Roxen / ChiliMoon from source you have to ensure to have your native database client libraries installed (and Pike can find them) before you compile Pike.

To verify if your database drivers are available in your Pike, use the Pike module list task in the Roxen / ChiliMoon Administration interface: tasks -> debug_information -> features show the available Pike modules. To get new modules included, you have to install your database client libraries first and either reinstall Roxen or recompile Pike.

On linux you can directly test if your database libraries are available (example checks for Oracle):

  ldd /<roxen-home>/pike/lib/pike/modules/___Oracle.so 

If you are using other OS then you have to use truss(1) or some equivalent command and try to connect to the oracle from hilfe:

 # cd /<roxen-home>/server/bin 
 # truss ./roxen 
 Pike v7.0 release xyz running Hilfe a.b (Incremental Pike Frontend) 
 object db=Sql.sql("oracle:///<sid>"); 

Native database drivers are supported for Oracle, Sybase, Msql, Postgres, Informix. Others can be used with an ODBC driver.

Applies to: Roxen , ChiliMoon

Comments

Posted by oNNoZeLe (2005-12-13)

If you want to use a oracle database within your network and you are using roxen on a windows OS you have to specifiy a DSN in the ODBC settings.

Then Roxen pulls this from the Registry.

Then define the DB in roxen with the DSN name. To keep it clear DON'T give the DSN the same name as the database.

odbc://username:pass@<dnsname>/database so like this:

odbc://my:pass@my_database/product_db

this works for me.

FYI

Posted by oNNoZeLe (2012-08-24)

When using Oracle as DB i noticed the connect string should end with /

oracle://user:pass@//host[:port]/SID/

that should be the connect string.

when omitting the last / one gets:

ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

[hide comments]

Can I use the internal database to store my application data?

Posted at 2004-11-30 by IzNoGooD, Last updated at 2004-12-05 by Michael Stenitzer

It is possible, however it is not recommended in a production server. Always keep in mind that there might be no backups made of the internal database.

Applies to: Roxen , ChiliMoon

How can I change Oracle's character set? I do not get any "umlauts".

Posted at 2005-05-02 by Sascha Nemecek, Last updated at 2005-07-21 by Sascha Nemecek

if you have access to the startup scripts of the Roxen server, simply set and export the following environment variables

export ORA_NLS33=/usr/local/oracle/app/oracle/product/8.1.7/ocommon/nls/admin/data 
export LNG=american_america.WE8ISO8859P1 

or add them to the local/environment.

Applies to: Roxen (4.0) , ChiliMoon

How do I catch sqlqueries?

Posted at 2006-02-23 by Marc Dirix, Last updated at 2006-02-24 by Sascha Nemecek

You can use <else>/ directly behind <emit>/ and <sqlquery>/. With <sqlquery>/ the statements between the <else>/ tags are executed when the query fails. Furthermore you can use <then>/ when the query succeeds.

<sqlquery query="foo" /> 
<then> 
  Success handling code.  
</then> 
<else> 
  Error handling code. 
</else> 

With <emit>/ the statements between the <else> tags are executed when the query returns no result whereas the contents of the <then>/ container are executed after the last returned result.

<emit source="sql" query="foo" /> 
 Code for the queryresult. 
</emit> 
<then> 
  Success handling code.  
</then> 
<else> 
  Sorry, no results. 
</else> 

Note that the <else>/ tag will not suppress SQL error messages.

Applies to: Roxen , ChiliMoon

Security and Roxen / ChiliMoon

How to secure your websites with Roxen and ChiliMoon

How can I implement HTTP user authentication?

Posted at 2004-11-21 by Michael Stenitzer

Load the password module and one of the modules to provide a user database (SQL User Database, System User Database etc.).

 <if not="not" user=”NAME” group=”GROUP”> <!-- you can use user and/or group --> 
    <auth-required /> 
    failed login 
 </if> 
 <else> 
    logged in 
 </else> 

Other options are:

  • add security patterns to one or several of your modules
  • use htaccess authentication

Applies to: Roxen , ChiliMoon

Comments

Posted by andreas werla (2004-11-29)

also u can check out my "AW_easy Protect" module: bunnyhero.de/RXML/view.html/roxen/modules/AW_EasyProtect.pike

Reply by Per Öberg (2006-09-21)

Link seems to outdated, could you please repost a current one

[hide comments]

How can I get rid of a second login dialog on protected web sites?

Posted at 2004-11-21 by Michael Stenitzer

Sometimes (e.g. when you use some gtext in a password protected part of the website), you will be asked a second time for the password:

  1. to enter the protected page, and
  2. to show the rendered images

If your gtext module and protected filesystem have the same authentication realms (you can set auth realm in gtext security tab without specifying any specific restrictions), then you won't be asked for a password a second time.

Applies to: Roxen , ChiliMoon

Why do my chained SSL certificates not work with Roxen?

Posted at 2004-11-21 by Michael Stenitzer

If you have a chained certificate, simply list the certificate files comma-separated in the "SSL certificate file" field.

Note: If you have Roxen older than 3.3.69 the spaces around the commas aren't ignored. Bug 2722 community.roxen.com/crunch/show_bug.cgi?id=2722

Applies to: Roxen , ChiliMoon

Comments

Posted by Henrik Grubbström (Roxen IS) (2004-11-29)

In Roxen 3.4 and later, the certificate chain is specified by adding multiple rows.

[hide comments]

How can I debug user-authentication or security patterns?

Posted at 2004-11-22 by Michael Stenitzer

If you're using .htaccess or security patterns, you can start the server with -DHTACCESS_DEBUG and/or -DSECURITY_PATTERN_DEBUG to get authentication debug traces in the debug log.

Currently there is no debug mode for the userdb_sql module

Applies to: Roxen , ChiliMoon

How can i remove a cookie set by the HTTP Cookie Authentication Module?

Posted at 2005-09-27 by Michael Stenitzer

To remove a cookie in all browsers (IE, Firefox, Opera) which has been set by the the HTTP Cookie Authentication Module use <remove-cookie/> without the domain attribute:

 <remove-cookie name="_roxen_cookie_auth" path="/" /> 

Applies to: Roxen , ChiliMoon

Scripting Roxen & Chilimoon

Using scripting languages with Roxen and ChiliMoon (Inline Pike, Java, Perl, PHP, CGI etc.)

How can I use PHP with Roxen / ChiliMoon?

Posted at 2004-11-14 by Michael Stenitzer, Last updated at 2005-05-21 by Sascha Nemecek

Run PHP as CGI (Roxen and ChiliMoon)

  1. Compile PHP4 as a CGI (default). You end up with a binary file called "php".
  2. On your Roxen site configuration make sure the following modules are enabled.
    • CGI executable support
    • PATH_INFO support
    • Redirect Module
  3. Copy the "php" binary to the /cgi-bin/ directory of your site.
  4. Add a redirect pattern in the redirect module:
  /(.*)\.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.

  • Get PHP4
  • Configure PHP4 with --with-roxen=/usr/local/ChiliMoon/2004/server (--enable-roxen-zts)
  • Make and install PHP4
  • Restart ChiliMoon
  • Add the "PHP 4 Script Support Modul"

Applies to: Roxen , ChiliMoon
Status: Answer to be confirmed

How can I access RXML variables inside an Pike tag?

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

What is the difference between <?pike ?> and <pike>/ ?

Posted at 2004-11-14 by Michael Stenitzer

The <pike>/ container is depreciated, but still available in the way it was in Roxen 2.

  • <pike>/ container will not be parsed (i.e. your variables and other functionality are not available in the way they are in the Pike processing instruction)
  • the comparison operators '<' and '>' will cause an error within a <pike>/ container. Use &lt; and &gt; instead.

Applies to: Roxen , ChiliMoon

Inline Perl: Why do I have to declare variables before using them?

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

Inline Perl: How can I access RXML variables?

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

How can I resolve this internal server error when I want to run a CGI script?

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

Programming and debugging Roxen & ChiliMoon

Extend and debug your Roxen and ChiliMoon webserver

Where can I find error and debug messages?

Posted at 2004-11-15 by Michael Stenitzer, Last updated at 2004-11-21 by Michael Stenitzer

There are as usual several ways to get your debug and error messages:

  • the debug-log in your logs directory show the last 5 debug logs named default.1 (Roxen) etc or configurations.1 etc. (ChiliMoon)
  • some errors are listed in the administration interface (Globals -> Events, Sites -> <name> -> Status or also in the modules Status tab).

You can controll the logging and visibilty of error information on your web page by several settings:

  • to show details about internal server errors can be enabled at your site's Port tab
  • to show errors on module level you can adjust the settings in some modules (mostly the RXML2 parser to show RXML errors)
  • you can use the <debug/> tag to toggle the visibility of RXML errors

Note: The debug logs (including backtraces of internal errors and - if set so in the configuration - RXML errors) are rotated in ../logs/debug/default.1 - ../logs/debug/default.5. So after one restart you’ll find debug information from the last run in ../logs/debug/default.2.

Applies to: Roxen , ChiliMoon

How can I get more information about what is cached or not?

Posted at 2004-11-15 by Michael Stenitzer, Last updated at 2004-11-21 by Michael Stenitzer

You can start Roxen with the flags -DPC_DEBUG and -DSBNOTIFY_DEBUG to get more information in the debug log about what the persistent cache and notification systems are doing.

You can also find some general cache information in the admin interface’s Tasks -> Status -> Cache status tab.

Applies to: Roxen , ChiliMoon

How can I write my own Roxen / ChiliMoon modules?

Posted at 2004-11-17 by Michael Stenitzer

There is some documentation cluttered all over the place:

  • Look at the docs “System Developer Manual Pike” and “System Developer Manual Java“
  • There are few articles concerning this topic at community.roxen.com/articles (be careful as they might not represent the current API to full extent)
  • Pick up one of the modules shipped with Roxen / ChiliMoon most similar to your ideas and learn from those
  • There is also quite a bit of API documentation in the comments in of server/pike_modules/RXML.pmod/module.pmod. Unfortunately that's not very easy to understand, since it only got all the details, but not the "big picture"

Applies to: Roxen , ChiliMoon

Comments

Posted by Matt Oros (2006-03-29)

Dear anybody who helps me I am just started working with linux,and installed debian3.1 with 2.6.8.2kernel with Roxen4.0.325 (apt-get install roxen4). I try to compile with source php4.4.2 module (configure –with-roxen=/usr/share/roxen4 –enable-roxen –zts make make-install).Everything makes without errors my questions: Where can I find php module files and how can I add module to Roxen?

[hide comments]

How can I access a variable in modules?

Posted at 2004-11-17 by Michael Stenitzer

This is the way to acces variables in the "form" scope:

 id->variables->var1 

All other scopes, especially the "var" scope, must be accessed through

 RXML.get_context()->user_get_var("scope.myvar"); 
 RXML.get_context()->user_set_var("scope.myvar","value"); 

or

 RXML.get_context()->user_get_var("myvar", "scope"); 
 RXML.get_context()->user_set_var("var","value", "scope"); 

Note: You can also use this method in inline Pike, although it is easier to use the form scope.context in the Pike processing instruchtion <?pike ?> (see Roxen Scripting FAQs)

Applies to: Roxen , ChiliMoon

I changed Pike code in a module. Why does it have no effect at the server's behaviour?

Posted at 2004-11-17 by Michael Stenitzer

Reload your module (in the module's status tab) in the administration interface or flush the cache (Tasks-> Maintenance-> Flush chaches).

Applies to: Roxen , ChiliMoon

Comments

Posted by IzNoGooD (2004-12-01)

A module can also be reloaded in the modules status page inside a virtual server's configuration. By doing this a module will only be reloaded inside the selected virtual server making it possible to debug changes to the module withouth breaking it in other vritual servers.

[hide comments]

I have found a bug. How can I report it?

Posted at 2004-11-17 by Michael Stenitzer

For Roxen: Use Crunch, a kind of bugzilla at community.roxen.com/crunch/ . You have to register at Roxen Community community.roxen.com/register/

For ChiliMoon: Currently you have to use bugzilla at bugzilla.lysator.liu.se/

Applies to: Roxen , ChiliMoon

How can I debug Roxen?

Posted at 2004-11-17 by Michael Stenitzer

Use debug options provided by the start programme.

 ./start -help 

gives you more information this.

Another way to debug Roxen's / ChiliMoon's modules or core is to insert something like this in the code:

 werror("report a: %O, b: %O\n", a, b); 

The result will be printed into the debug files. (logs/debug/default.1). Read more at community.roxen.com/articles/004_errors/

You can also write from RXML directly into the debug log

 <debug werror="This is printed in the debug log"/> 

Applies to: Roxen , ChiliMoon

Roxen & ChiliMoon Modules

Working with Roxen and ChiliMoon modules (general and concerning certain modules)

Why does IMHO not work with Roxen 4.0?

Posted at 2004-11-12 by Michael Stenitzer, Last updated at 2004-12-30 by Michael Stenitzer

Roxen 4 uses Pike 7.4 or 7.6. IMHO has not been maintained for a long time.

Try this patch

--- imho.pike	Mon Aug 11 09:19:53 2003 
+++ imho.pike.patch	Mon Aug 11 09:09:56 2003 
@@ -6541,7 +6541,7 @@ 
     if(query("sendmethod")=="SMTP") 
       break; 
     { 
-      array stat=(array)file_stat(value); 
+      mixed stat=file_stat(value); 
       if(!stat || !(stat[0] & 73)) 
 	return "Must be an executable file."; 
     } 
@@ -6781,7 +6781,7 @@ 
   // Roxen tries to kill us. Escape... 
   // Destroy all sessions after 60 seconds if the new IMHO hasn't been compiled by then. 
   a[0]=call_out(lambda(mixed ... foo){foo[1]->destroy_clients();}, 60,  
-		"IMHO_Survivor", new(object_program(this_object()), g, variables, 
+		"IMHO_Survivor", object_program(this_object())(g, variables, 
 				     0,0,0,0,0,0,0,0,0,0), a, my_configuration() ); 
 } 

Applies to: Roxen (4.0) ,

Comments

Posted by Henrik Grubbström (Roxen IS) (2004-11-29)

Just adding a

 #pike 7.0 

to the beginning of imho.pike should be sufficient.

[hide comments]

Why is the HTTP-Proxy forwarding to another server so incredibly slow?

Posted at 2004-11-12 by Michael Stenitzer, Last updated at 2004-11-14 by Sascha Nemecek

Do not use "raw" in your forwarding pattern.

  LOCATION / CALL http://otherhost/dir/ 

The problem is with keep-alive. The relay module does not like it, if the backend server keeps the connection. For some reason, some browsers send a keep-alive request, and if you specify the 'raw' option, it gets handed to the backend server which of course honors it. After a couple of minutes, the browser times out and drops the connection. The connection to the backend is dropped in turn, the browser repeats the request, and from then on everything is fine.

Applies to: Roxen , ChiliMoon

I want to drop a module from a site, but it can not be removed

Posted at 2004-11-12 by Michael Stenitzer

The module is still used by a different module (e.g. “Tab list” uses the “GButton” module).

Applies to: Roxen , ChiliMoon

What is the search order for overlapping filesystems?

Posted at 2004-11-15 by Michael Stenitzer

Roxen/ChiliMoon starts to look in the filesystem with longest mountpoint first. It's only undefined if two modules have the same mountpoint.

e.g. if you have three filesystem with the following mountpoints:

 /foo/bar/gazonk/ 
 /foo/bar/ 
 /foo/ 
 / 

The file /foo/bar/gazonk/file will be searched in the order shown above. For identical mountpoints (e.g. two filesystems mounted at /foo/) you can change the search order if you change the module’s priority settings.

Applies to: Roxen , ChiliMoon

Why does the redirect module not apply the rules from an included file?

Posted at 2007-02-13 by Michael Stenitzer

If you include a file with redirect rules by using the '#include <filename>' syntax you must use UNIX-style linebreaks (LF only) in this file.

Applies to: Roxen ,

[ Don't show all FAQs on a single page ]