Caudium :: FAQ

Caudium

Open Webserver

Quick Info

 

 

bug reports: sourcehut

source code: git

twitter: caudiumweb

 

about»
 

login

about > faq

FAQ

Tuesday, 1 April 2014 by Bill Welliver

Pike related Questions

What is Pike?

Pike is an object oriented, interpreted programming language. It is fast, dynamic, high-level and easy to extend, and is similar in syntax to C++.

Pike is also a fish.

Pike's features include:

  • garbage collection,
  • advanced string functions,
  • 18 years of development behind it,
  • advanced data types such as associative arrays,
  • support for bignums,
  • builtin socket support, and
  • lots of modules such as a SQL client, HTTP, GTK, Threads, Images etc.

What is the difference between Pike and other languages?

A comparison is made in the Pike manual:

Python
Python is probably the language that is most like Pike. Pike is faster and has more sophisticated object orientation. It also has a syntax similar to C++, which makes it more familiar for people who know C++. Python on the other hand, has a lot more libraries available.

C++
Pike's syntax is almost the same as for C++. A huge difference is that Pike is interpreted. This makes the code somewhat slower, but reduces compile times to almost nothing. For those few applications which require the speed of C or C++, it is often easier to write a Pike extension than to write the whole thing in C or C++.

Lisp and Scheme
Internally Pike has a lot in common with simple interpreted Lisp and Scheme implementations. They are all stack based, byte-compiled, interpreted languages. Pike is also a 'one-cell' language, just like Scheme.

Pascal
Pike has nothing in common with Pascal. :)

Tcl/Tk
Pike is similar to Tcl/Tk in intent and they both have good string handling. Pike has better data types and is much faster however. On the other hand Tcl/Tk has good X windows system support.

Questions about Caudium

What is Caudium?

Caudium is a free (Released under the GPL), non-forking, modular, gui-configurable, object-oriented World Wide Web server. It is compatible with HTTP/1.0, HTTP/0.9 and provides a built in programming language and HTML extension called RXML.

What are the advantages and disadvantages of Caudium?

Caudium has a lot of advantages:

  • Automatic generation of text pictures
  • Not forking - runs on few processes, fast
  • Low on system requirements
  • Extendable - build modules for your special application
  • Entusiastic development, both on the part of the Caudium crew and fans all over the world.
  • Easy configuration - using your favorite browser

Caudium has a few disadvantages:

  • It is not the fastest WWW-server around. WWW-servers using a multithreaded approach are probably faster on machines with OS:es that have good support for threads.
  • The community is not as large as other web servers such as Apache. That's not so much of a disadvantage as an opportunity for improvement. Help us out!

Why should I use Caudium instead of my favorite web server?

The best way to learn whether Caudium fits your needs is to install it and give it a go! Caudium is a flexible, robust platform that excels at dynamically generating almost any kind of content you can think of, from a variety of sources including SQL databases.

When should I not use Caudium?

If you need to run a web server on Windows® or on any other platform for which Caudium is not supported. Caudium is actively supported by its developer community on Linux, Solaris®, and most variants of BSD. Caudium should also work on any Unix® flavours for which Pike binaries are available.

What does the name Caudium mean?

Caudium was an ancient city in the Roman Empire (see the wikipedia entry for Caudium). Caudium is pronounced "cow-dee-uhm".

Where are the manuals?

Caudium does not have a set of manuals per se, but the documentation for Roxen 1.3, which Caudium is based on, is available here: Roxen 1.3 Manuals. Additionally, the Caudium HOWTO might be useful for getting started. Additionally, most of the modules have their own internal documentation, and many RXML tags support the "help" attribute.

What operating systems do you support?

Caudium runs on just about any Unix like operating system that's out there today and supported by Pike. This list includes, but is not limited to: Solaris, Linux, OpenBSD, NetBSD, FreeBSD, MacOS X, AIX, and HPUX. Packages are available for Debian, FreeBSD and OpenBSD.

What if I run Windows?

Caudium might run on Windows when Pike is compiled with Cygwin. However Pike under Cygwin is not yet supported by the Pike developers and is a bit of a hack. Basically, you're on your own.

Do you have a version number scheme?

Yes. Caudium uses a scheme similar to Linux's version number system. Each version of Caudium is numbered with a major, minor and build number in the format a.b.c.

The major version number represents the number of rewrites or signifigant overhauls of the existing codebase. Developer (or unstable) releases have odd minor version numbers (1.1, 1.3, 2.5 etc) while stable releases are even numbered (1.0, 1.2, 3.6 etc).

The build number is uneven for SVN check out or snapshot versions but even for actual releases.

How does your release process work?

When a release is near, the codebase is placed in feature freeze and testing for bugs starts. When all obvious bugs have been resolved, the code is frozen and a snapshot is created called release candidate 1, or just RC1. The release candidate is tested thoroughly and only important bugs are fixed (minor problems, like typos, will not be fixed after the code freeze). If major problems are found in RC1 then they will be fixed, and the resulting snapshot will be renamed RC2. This process is repeated until there are no more major problems and the resulting snapshot is officially named the stable release and given even minor and build version numbers (for example 1.2.8).

What Pike version do I need?

Caudium 1.0.xx: anything newer than Pike 0.6.116 and all Pike newer than 7.0.190 should work. However, Caudium 1.0.xx branch does not support newer Pikes (eg 7.1, 7.2, 7.3, 7.4...).

Caudium 1.2.xx: all Pikes newer than 7.0.190 and older than 7.3.40 should work. However we strongly recommend that you use a Pike newer than 7.2.192.

Caudium 1.4.xx branch requires Pike 7.6.112 or newer.

Caudium 1.5.xx branch requires Pike 7.8.352 or newer.

Pike compilation error

I get the following error when trying to compile Pike:

/precompile.sh precompile.pike >"/usr/local/pike-7.2.432/src/builtin.c" 
     "/usr/local/pike-7.2.432/src/builtin.cmod" || { rm "/usr/local/pike-7.2.432/src/builtin.c"; exit 1; }
 precompile: /usr/local/pike-7.2.432/src/pike -DNOT_INSTALLED  -m/usr/local/pike-7.2.432/src/master.pike 
./precompile.pike  /usr/local/pike-7.2.432/src/builtin.cmod (method=Q)
./precompile.sh: line 151: /usr/local/pike-7.2.432/src/pike: No such file or directory

You are compiling Pike from SVN or from a SVN snapshot. You need an "exported" version of Pike. Any official source release from the Pike website should be free from this problem.

What is RXML?

RXML stands for Roxen eXtensible Markup Language and is a set of tags, containers and simple programming language constructs that can be placed in HTML source code. These tags and containers will be interpreted by Caudium each time the page is requested. This allows non-programmers such as web designers to develop complex web based applications without having to learn anything more difficult than HTML.

What is UltraLog?

UltraLog is a very fast log parser. The parser is written in C (as a Pike module) and the viewing is done through a Caudium module. The summarizing is done using an external application. Features include, but are not limited to, customizable log format, multiple log files per profile and wild card profiles (in a sense). Future plans include better integration (web based configuration for example).

Caudium 1.4 is the last version that will include UltraLog. You may be able to continue using UltraLog by copying the required modules and files to a newer installation.

What is PiXSL?

PiXSL is Caudium's engine for XSLT. XSLT is an XML transformation language. It can be used to generate various output formats from an XML input (you can think of it as templates). PiXSL is a glue to the Sablotron XSLT parser. The current state is "working, without intelligent caching". You can use the current implementation by adding the Caudium XSLT Tag module or by using the XSLT Template module, which more or less works like mod_xslt for Apache.

Why did you use Sablotron XSLT parser for PiXSL?

When we started to make PiXSL, Sablotron was the most stable and usuable XSLT engine available.

It is possible that another XSLT engine could be used (such as libxslt), but such an effort would depend on user interest.

Tell me more about the Caudium.so/_Caudium.so module

This module contains all our custom C-code which is too small to be a self-contained module. Today it includes a query string parser and a HTTP header parser as well as a more complete HTTP request parser used by the http2 protocol.

What's wrong with Apache?

That's a loaded question… :)

Caudium, Roxen and the Fork

Why a fork? What were your main reasons for doing this?

We were somewhat unhappy with the direction the Roxen development was heading. We believe that the success of Roxen WebServer is hindered by the commercial needs of Roxen IS. The 2.0 version was initially not very backwards compatible (despite claims that it was). Also it was a lot slower (something that was partially fixed in Roxen 2.1) and rather unstable. These things might or might not be fixed by now.

What is new in Caudium compared to Roxen 1.3?

Quite a few things have been fixed, tweaked and added since the fork from Roxen 1.3. This includes fixes to long-standing bugs, performance enhancements, Pike 7.x compatibility, availability of both the old RXML parser and a new XML compliant parser, support for scopes and (when using the XML parser) entities, and more. Read the CHANGES file in the top-level caudium directory for more details.

We have also added a number of features that existed prior to the fork like UltraLog (a log parser), PiXSL (XSLT support), CAMAS and more.

Is Caudium a successor to Roxen 1.3?

Yes, we would like to see it that way; but since we consider it to be a new product, the version numbers start at 1.0.

Why should I use Caudium instead of Roxen 2.x?

Many reasons could be listed here. The main one might be that you are a Roxen 1.3 user, and you do not have the resources to rewrite your RXML pages. Also you might not agree the direction Roxen 2.x+ is heading. It is up to you to make up your mind.

Usage Questions

I think I found a bug and have a proposed patch. Where can I send it?

We love patches! Send your patches (with a description of the problem it solves and the Caudium version) to the caudium-general@caudium.net mailing list.

I think I found a bug. Where can I report it or get it fixed?

Send a description of the problem, along with the information described in the next question to the caudium-general@caudium.net mailing list.

What should I include when reporting a problem?

If you have a problem that you want help with, try to describe the problem completely.

Always include the following information in one way or the other:

  • What version of the Caudium server you are using.
  • What platform you are running it on.
  • What happens.
  • What do you think should have happened?

Include this if you have it and feel that it might be significant:

  • A list of the flags you gave when building and installing Caudium.
  • A list of modifications you have made to your server, like changed the version of pike or the version modules.
  • A list of configured modules.

Where can I find modules and scripts for use with Caudium?

Try the Roxen/Caudium Module Source. It's located at [external]http://source.riverweb.com.

How do I start Caudium?

You cd to /mydir/caudium/server and run ./start. Useful information is displayed when you run ./start --help.

How do I shut Caudium down?

Connect to the WWW-configuration interface and choose "Actions" then Shutdown.

Alternately, you can stop Caudium by using kill pid, where pid is the pid of the caudium (not the start script) process. Note that if you perform a kill -9 on the caudium process, caudium will restart automatically, which doesn't happen if you just do a kill.

How do I get Caudium to reload its configuration files?

You can send a HUP signal (using the kill command, for example) to the Caudium process. This causes Caudium to reload all of its configurations.

Do I have to run Caudium as root?

No, you can start Caudium as any user. However, you must start as root to be able to open ports under 1024 (where the default HTTP port is 80). You won't be able to change UID/GID if you don't start as root.

How do I change the user Caudium runs as?

You set the global variable 'Change UID and GID to:' to the numeric UID/GID you want Caudium to run as. Then, before configuring anything more, you should shut down the server and start it again like this:

$ su
# cd /mydir/caudium/server/
# ./start
# exit
$

How do I run several instances of Caudium with different configuration directories?

You start them with:

start --config-dir=[configdir]

I can't seem to kill Caudium. It just keeps restarting.

As soon as one is killed another one springs up.

Kill the start script. That script is restarting the caudium processes as you kill them.

Why is a pike script faster than CGI?

The first time a pike script is called, it is compiled and loaded into memory by the Caudium server. It shares the same file descriptors, and the same user. In effect, it becomes part of the server.

Is Caudium used in heavy production? Where?

Caudium is used by numerous large ISPs and ASPs, as well as many smaller companies and individuals. Caudium is well suited both for simple hosting of large numbers of websites and for hosting of complicated web applications.

What are the advantages of the configuration interface over webmin for example?

Caudium's web interface is defined automatically by the modules that are loaded. That means that if you add a new module, or modify a module, the configuration interface will automatically reflect those changes.

I forgot the admin (Configuration Interface) port number. How can I find it?

The easiest way is to look in the debug log output, found in $CAUDIUMPATH/logs/debug/default.1:

...
Starting Caudium
Restart initiated at Thu Nov 6 18:49:59 2003

Initializing InternalFiles… done New configuration port: ssl3://ANY:10784/(cert-file demo_certificate.pem) Opening configuration port: ssl3://ANY:10784/(cert-file demo_certificate.pem)

Does Caudium use threads?

You can start Caudium in single-threaded or multi-threaded mode. Caudium uses the thread support built into Pike, which in turn uses OS threads. At startup, a multi-threaded mode Caudium will start a number of "handler" threads. Requests are passed through one of these long lived "handler" threads.

Database Access

How do I connect to a SQL database through a webpage?

You can use the SQL-module, which provides a number of RXML tags that let you query and display data from SQL databases.

I get this error when trying to connect to a database: Couldn't connect to SQL-server Sql.Sql(): No protocol specified.

You're probably not using a complete SQL URL in your "host" attribute (for the SQL* tags) or in your pike script. A SQL URL looks like this:

protocol://user:password@host/dbname

where protocol is a supported database type, such as mysql, oracle, odbc or postgres. The other sections of the URL are optional.

I don't like having to type the SQL URL in for every SQL operation. Can I save it someplace?

Yes, using the "SQL Databases" module you can set up any number of SQL URL aliases, and use the alias name in your "host" attribute.

Can I use my favorite database?

You can use any database that your Pike has support for. Pike currently supports the following databases: Mysql, SQLite, Msql, Postgres, Sybase, Oracle and ODBC. You can find out what databases your pike has support for by using the following command:

/path/to/pike --features

Programming

How can I get a pike script to reload?

The simplest way is to go to the configuration interface, and in the virtual server, reload the pike script module. Alternatively, add this function to the beginning of your script:

int no_reload( object request_id )
{
  return 0;
}

which will cause the script to be recompiled and reloaded every time it is called. Then change the 0 to a 1 (or remove the function entirely) when you have done the debugging and want the speed.

Why doesn't writing to STDOUT work in my pike script?

Because it's not a CGI script. Output must be made via the return parameter of a required function parse(). eg :

string parse( object request_id )
{
  string outstr = "";
  outstr += "Hello World!";
  return outstr;
}

The request_id object holds all the parameters passed from the server for use in the pike script.

Can I use PHP?

Sure, though the SAPI support in PHP is notoriously buggy on servers with long lived processes (such as Caudium). A much better way to use PHP is to use FastUniscript, which gives you most of the performance with fewer stability (and security) problems.

Can I use Perl?

Sure, you can use perl in CGI, FastCGI, either of the Uniscript versions (that let you associate an interpreter with a file extension).

This Website

Who made this website?

The current website was built in 2012 and is based on an original design by Matt Hardy.

How did you make the site?

The web site is built using the FinScribe weblog/wiki application and is served using Caudium.

What about localized sites?

This is something we will probably eventually do, but right now we do not have time. If you are interested in translating to your language, please let us know.

I found a typo / error / mistake!

Please send a mail to the master of the web with details about the error.

Why does the website look so ugly with some browsers?

The Website is made using CSS{1,2,3} and HTML 4.01, your browser may not be 100% compliant with those standards.

Most recent browsers, including Firefox, Safari or Internet Explorer 7 should display this site without problem.

Pike Extensions FAQ

What is the Pike Extensions project?

The Pike Extensions (pexts) project was founded at a time when building and distributing extension modules for Pike was very difficult. The pexts project aimed to provide a home and framework for building and packaging modules that "didn't make the cut" to be distributed with the core Pike distribution.

Since that time, the situation has changed, and a number of modules (or their successors) have been included with the Pike core. As a result, the project is no longer active, though the code is still available, as it serves as a good source of inspiration and ideas for developing modules for Pike.

How do I get the source?

It is in the pexts repository on github.

Is this CPAN for Pike?

That is not our initial plan. However that is not a bad idea. A better plan might be to make an SDK and a central repository allowing anyone to create custom Pike modules without doing to much magic configure/makefile hacking. We will certainly consider this.

NOTE: The "official" external module distribution system may be found at modules.gotpike.org.

What license is used?

GPL. Pike is a GPL program so using any other license (at least any non-compatible one) is not allowed. Of course, we also want it to be possible to integrate our code into Pike, which again requires the license to be GPL.

No comments | Post a Comment | RSS Feed | BackLinks |