Cheyenne Web Server Blog
Recent Articles:
| 19-Feb-2008 | - Binaries for v0.9.18 [0017] 6 Cmts |
| 19-Feb-2008 | - Cheyenne v0.9.18 released [0016] |
| 21-Dec-2007 | - HOW-TO make Cheyenne work with PHP for non-Windows OS [0015] 3 Cmts |
| 21-Dec-2007 | - Encapped binaries also available for v0.9.17 [0014] 5 Cmts |
| 21-Dec-2007 | - Cheyenne v0.9.17 released [0013] 7 Cmts |
| 31-Jul-2007 | - Short update on Cheyenne rc1 status [0012] 8 Cmts |
| 13-Jul-2007 | - Better PHP support [0011] 9 Cmts |
| 13-Jul-2007 | - Cheyenne v0.9.16 released [0010] 0 Cmts |
| 21-Jun-2007 | - Cheyenne v0.9.15 released [0009] 0 Cmts |
| 11-Jun-2007 | - Cheyenne v0.9.14 released [0008] 0 Cmts |
| 6-Jun-2007 | - Cheyenne v0.9.13 released [0007] |
| Contents | - Index of all articles. |
19-Feb-2008 - Binaries for v0.9.18 [0017]
| OS | Encapper | Size | Download link |
|---|---|---|---|
| Windows | enface | 649Kb | download |
| Windows | enpro | 452Kb | download |
| Linux | enface | 872Kb | download |
| Linux | enpro | 534Kb | download |
| Mac OS X | enface | 873Kb | download |
| Mac OS X | enpro | 572Kb | download |
19-Feb-2008 - Cheyenne v0.9.18 released [0016]
- Download here the source package.
- FastCGI: enhanced implementation to support POSTed data larger than 64K.
- 'do-events now wrapped in a loop. (improves uptime)
- Fix for lower/uppercase log files issues.
- Fix PHP-fastcgi idle connection timeout issue.
- Client connection will now be closed after sending a 405 response. (avoids processing useless data)
- Log files access errors are now trapped. (improves uptime)
- Fix for premature event loop exiting (was introduced in previous release).
- RSP: bug fixed in accessing ressources in /public sub-folders.
- RSP: fix for databases connection URL loading from config file, now attempting to load from disk first, then if failed, from memory cache.
- Fix for bad URLs like /path/file.ext/ crashing Cheyenne. (by fixing the buggy 'info? mezz)
- UniServe: Added -q to slave processes command-line.
- Enhanced 'on-status-code support, can now be declared at domain or webapp level.
- Fix for a security issue on Windows: /..%5C.. URL forms are now catched preventing an attacker from getting files out of the www root directory.
21-Dec-2007 - HOW-TO make Cheyenne work with PHP for non-Windows OS [0015]
The purpose of the following patch is to make FastCGI in PHP work the same on all OSes.1) If you have PHP v5.2.1 or higher with sources, you can skip 2) & 3) else :
2) Download latest PHP sources from http://www.php.net/downloads.php
3) Untar the archive anywhere you want
4) Go to PHP install folder
5) Patching PHP source :
Open a REBOL console, then :
;---- cut'n paste the following code in REBOL's console ----
patch-php: has [buffer pos][
target: %sapi/cgi/fastcgi.c
if none? attempt [buffer: read target][
print "unable to find the file to patch!!"
exit
]
either parse buffer [
thru "int fcgi_accept_request("
to "if (req->fd >= 0) {"
pos: to end
][
insert pos "^/^-^-^-^-break;^/^-^-^-^-"
write target buffer
print "patch applied."
][
print "failed to locate the line to patch!!"
]
]
patch-php
;---- end of code ----
6) Once the patch is applied :> ./configure --enable-fastcgi > make > sudo make install7) Check if everything is ok :
> php-cgi -h ... you should see a -b option listed meaning you got proper FastCGI support. If it fails (occured on OSX), try with a full path instead : > /usr/local/bin/php-cgi -h8) Edit Cheyenne's config file (httpd.cfg) to set the correct option in the PHP section. Non-Windows users have to also set the new 'delay option.
9) Test if all works well with : http://localhost/test.php
21-Dec-2007 - Encapped binaries also available for v0.9.17 [0014]
Cheyenne beta v0.9.17 encapped binaries (with enface) are also available for testing :Remember that Linux and OSX versions require root privileges to listen on ports < 1024.
For linux users that don't have X11 installed, the released binary won't work unless you install the X11 support libraries.
Here's how-to install the required libs without installing a full X11 desktop (Debian/Ubuntu users only) :
> apt-get install libx11-6 > apt-get install libxaw7 > apt-get install libstdc++5 > apt-get install libfreetype6
21-Dec-2007 - Cheyenne v0.9.17 released [0013]
- Download here the source package.
- Cheyenne can now run natively as NT-Service. Use the systray menu to switch between service and user mode. (switching to service mode requires admin rights)
- Several new command-line options have been added :
- -u : (Windows only) uninstall Cheyenne service (alternative to systray menu)
- -f %path/ : specify a working folder for Cheyenne's runtime files.
- -s : run as NT-service
- -fromdesk : executable was started from a user desktop
Internal use (Windows only) :
- cheyenne.r boot script refactored for cleaner and more modular approach.
- CGI handler was redefining 'read-io in a unfriendly permanent way. Now you should use 'cgi-read-io if you want to read the system/ports/input from CGI scripts.
- Fixed an issue with FastCGI apps, now local file paths are absolute instead of relative.
- Major change in modules event functions prototype, now all module events
are called with only one argument : 'req (the request objet). The HTTPd
context is also now reachable from module's context using 'service word.
For example :
service/conf => loaded configuration file
- RSP session timeouts can now be set per webapp or per session, from
config file in webapps using the 'timeout keyword or from RSP code using
the session/timeout property. The 'timeout keyword need a time! value.
Example :
timeout 00:30 ; session timeout set to 30 minutes
- BugFix in REBOL CGI scripts header handler introduced in previous betas.
- If a 'Content-Length header is not sent by the client in a POST or PUT request, now Cheyenne returns a "400 Bad Request" response.
- A new config file keyword 'post-mem-limit allows to define the threshold for disk-based temporary storage of POST/PUT data instead of buffering in memory (raw data of arbitrary size can now be sent with POST/PUT).
- New 'listen keyword in configuration file in 'globals section allows to define the HTTPd listen ports. If the -p command line option is used, it overrides the ports defined by 'listen.
- A new header 'Internal-Referer has been added to save the previous requested URL when a request is internally forwarded.
- New config keyword in 'globals: 'set-mime allows to add new mime types.
If the mime type is already defined, it will be replaced by the new definition.
Syntax :
set-mime type/sub-type .extension or set-mime type/sub-type [.ext1 .ext2 ...]
- Fixed PHP support for non-Windows platforms. Added a new 'delay option in 'extapp definition block to allow slower processes finish booting before trying to obtain a connection.(This may happen on slower machines). PHP support tested successfully on Windows, Linux and OSX using PHP 5.2.5.
- Minor additions to FastCGI protocol handler.
- 'mod-userdir refactored :
- cleaner and shorter code.
- 'user and 'group keywords accept a name or integer ID.
- task-master's slave processes are now SETUID too.
- Cheyenne doesn't check anymore for a valid system/license, but now just for the /Library component.
- Bug fixed (from online bugtracker) :
#0010034 : Configuration: PHP execution stops working after a configuration reload #0010032 : CGI: posting large amount of data fails #0010026 : HTTP: protocol domain.com/?a=1 get redirected to domain.com/?a=1/
31-Jul-2007 - Short update on Cheyenne rc1 status [0012]
As you might have noticed, the development and releases cycle rate has reduce since a couple of weeks because I'm now only part time on Cheyenne. I've been called to work on some big projects for new customers, so I'll be able to work on REBOL projects only 1 or 2 days per week. That was the "bad" news. The good news is that Cheyenne is very close to 1.0 release candidate 1!I've been working these last weeks, part time, on the Cheyenne administration web-based console, it took me a lot of time to come up with the UI design that best suit my needs, and it still needs a lot of work to be finished. I'm not sure that this administration application will make it for 1.0. Here are some screenshots of the work-in-progress (click to enlarge):
If all goes well, the 1.0 rc1 should be released next Sunday. Then the true beta stage will start until the 1.0 gets stable enough for production (I guess a month would be enough to fix all major bugs). In the meantime, I'll produce the longly awaited documentation.
13-Jul-2007 - Better PHP support [0011]
Starting from v0.9.16, PHP support is now much more stable and easier to set up. You just need to uncomment the following lines in the HTTPD.CFG file :
;if-loaded? mod-extapp [
; extern-app [
; name php-fcgi
; url fastcgi://localhost:9999
;
; command "..\php\php-cgi.exe -b 127.0.0.1:9999"
;
; environment [
; PHP_FCGI_MAX_REQUESTS 0
; PHP_FCGI_CHILDREN 1
; ]
; ]
;]
Then change the command argument to match the name and installation path of your php-cgi executable. Path can be relative or absolute, but need to be formatted accordingly to your local filesystem and not in REBOL file format.
You can also change the listening port if it conflicts with another server. Change it both in url and command.
Launch Cheyenne, the PHP process will be launched at the same time. It will also be killed by Cheyenne on exiting. (On Windows platforms in console mode, use the Quit option in the systray menu).
If you need to launch the PHP process manually, comment the command line and follow the instructions here.
Note also, that you can have more than one php-cgi process, but the process pooling management is not yet implemented. To control the number of threads (Windows) or processes (UNIX), just set the PHP_FCGI_CHILDREN parameter to the number you want. If you don't know what this is about, just leave the default value (1). Even then, it can handle dozens of concurrent requests (thanks to the fastcgi multiplexing support added to Cheyenne 0.9.16).
13-Jul-2007 - Cheyenne v0.9.16 released [0010]
- Download here the source package.
- Localization framework added to RSP. API overview :
- #[text] in static parts of RSP pages will be translated.
- new function: say "data" : translate a string! value in the current language
- session's new 'lang variable can set the current language.
- new config file options to control default language and locales resources folder.
- Decode-cgi rewrote from scratch. Cleaner and 2-3 times faster than before.
- RSP request params decoding rewrote. Now GET and POST parameters are unified in request/content.
- BugFix for encapping %misc/mime-types file.
- File upload support redesigned. Now big files (user defined threshold) are directly written to disk in temporary files, instead of being held in memory. The temporary files are deleted once the request is completed. So now Cheyenne supports files upload up to 2Gb (R2 port! limitation).
- CGI execution extended to any scripts (not just REBOL). If found, the shebang line (#!) is honored (on all platforms). Several perl scripts added in %www/ folder as demo.
- Module's 'on-started event now fired only once, when multiple HTTPd instances are listening on more than one port.
- New module : mod-extapp for launching and managing external applications. Only the start and shutdown actions are currently supported. Load balancing will be included in future.
- FastCGI protocol reliability improved and some bugs fixed.
- RSP-API documentation updated.
21-Jun-2007 - Cheyenne v0.9.15 released [0009]
- Download here the source package.
- RConsole was not started by default in the previous release. Fixed
- RSP: 'include function protection from infinite cycles changed. It's now based on a counter (5 maximum recursive includes). It's a little less cleaner than stack-based tracking but much more reliable (avoids matching paths and targets)
- HTML.r library rewritten from scratch. Now, faster and more conforming to standards (Full range of Latin1 entities supported). Fixes URL-encode bugs.
- BugFix for command line parsing in encapped Cheyenne on Linux.
- Fixed an issue with 'decode-multipart in RSP.r. File upload should work ok again.
- Added a new global function : 'rsp-log value. Outputs values in console for debugging RSP scripts. Works as 'probe.
- Reloading config file now supported. Running sessions and client connections
survive to the reloading process (needs some additional testing). Activating
config file reload is done using:
- (Windows) "Reload Config" menu option in systray icon.
- (UNIX) kill -s HUP pid
- UNIX signals SIGINT,SIGQUIT,SIGTERM now catched to allow cleaner exit and last minute actions. Triggers the new 'on-quit event for HTTPd modules.
- HTTPd internal events (not phases) refactored to be more cleaner. New module's
events added:
- 'on-started: when Cheyenne starts.
- 'on-reload: before a config file reload happens.
- 'on-reloaded: after a config file reload happens.
- 'on-quit: when Cheyenne is about to stop and quit.
- RSP sessions can now be made persistent (can survive to a server complete restart).
This option is controlled by a new config keyword: 'persist. Usage is :
persist [sessions] ; other flags can be added at will - BugFix in session cookie handling for web-apps using 'auth mode. Now the cookie is sent on the 302 redirection to the login page avoiding the creation of a "shadow session" that will never be used.
- FastCGI is under heavy work so mod-fastcgi is commented in config file to avoid fastcgi startup. If you want to play with PHP, just uncomment the line.
11-Jun-2007 - Cheyenne v0.9.14 released [0008]
- Download here the source package.
- response/forward improved :
- fully supports URLs as argument (can now forward to another virtual host)
- URL validity check (must have an explicit target)
- protection against cycle
- Command line option -p extended, now you can specify several listen ports separated by a comma (ex: -p 80,10443).
- New command line option -e : load and initialize Cheyenne without entering the event loop (needed for embedding Cheyenne in third party apps).
- Added a new experimental module: mod-embed. Purpose is to allow easy Cheyenne integration in third-party REBOL applications that require an embedded web server. (Uncomment mod-embed in httpd.cfg file to activate it)
- Added %embed-demo.r file to show a sample of the mod-embed usage and API.
- RSP: <% without %> eats all the memory. Fixed.
- URL-encoded request values were not parsed correctly. Fixed.
- RSP: fixed a typo in 'decode-params blocking the multipart data decoding and also a word ('type) leaking in GC.
- UniServe's service startup refactored to be more flexible.
