r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!Cheyenne] Discussions about the Cheyenne Web Server

Terry
4-Nov-2007
[2323x3]
I spoke too soon.. 

the 0916 version running PHP on windows allows you to read the test.php 
page once.. then each subsequent refresh comes back with a "No input 
file specified." error.
ok.. .spoke too soon again.. the fix was mentioned earlier
path: form to-local-file get-modes req/in/file 'full-path
Interesting how PHP builds any SQLite DBs in Cheyenne's www folder 
by default
Terry
5-Nov-2007
[2326]
Doc, your website is currently down.
Graham
6-Nov-2007
[2327]
working for me
Oldes
7-Nov-2007
[2328]
I have same problem, but only with virtual-root. For normal php the 
fix above is working
Will
8-Nov-2007
[2329]
Everyone using Cheyenne, please go here http://softinnov.org:8000/curecode/ 
and post your bugs or feature requests
Terry
9-Nov-2007
[2330]
Hey Nenad, how does the following work?

;	extern fastcgi [
;		command	 "php -b $port"
;		pool 	 min 1 max 4
;		server	 192.168.0.100 ; port 1234
;		root-dir "/home/dk/fcgi/"
;	]
]
Chris
2-Dec-2007
[2331]
Quick question in lieu of RTFM - how do I get post data as either 
string or binary in CGI mode?
Graham
2-Dec-2007
[2332]
look at the request object
Chris
2-Dec-2007
[2333]
Global 'request is a view  function -- QM has it's own request object...
Graham
2-Dec-2007
[2334]
<HTML>
<HEAD>
	<TITLE>RSP Test Page</TITLE>
</HEAD>
<BODY bgcolor="white">
<a href="/">Back</a><br><br>
<FONT FACE="Arial" SIZE='-1'>
<B>Timestamp: </B><%=now %>
<BR><BR>
<H4>Request parameters :</H4>
<UL>
	<LI><B>HTTP Method: </B> <%=mold request/method%></LI>
	<LI><B>HTTP Port: </B> <%=mold request/server-port%></LI>
	<LI><B>Client IP address: </B> <%=mold request/client-ip%></LI>
</UL>
<H4>Request headers :</H4>
<UL><%
	foreach [name value] request/headers [
		print [<LI><B> name ":"</B> mold value </LI>]
	]
%></UL>
<H4>Request variables :</H4>
<UL><%
	either empty? request/content [
		print "<LI>No variable passed</LI>"
	][
		foreach [name value] request/content [
			print [<LI><B> name ":"</B> mold value </LI>]
		]
	]
%></UL>
<H4>Session :</H4>
<%either session/content [%>
<UL>
	<LI><B>SID: </B> <%=session/id%></LI><%
		either empty? session/content [
			print "<LI>No session variables</LI>"
		][
			foreach [name value] session/content [
				print [<LI><B> name ":"</B> mold value </LI>]
			]
		]
%></UL>
<%][%>
	<UL><LI>No session</LI></UL>
<%]%>

</FONT>
</BODY>
</HTML>
Dockimbel
5-Dec-2007
[2335x4]
Chris: use 'input word to retrieve POST data.
Graham: the API in CGI differs from the RSP API. When Cheyenne's 
CGI handler is invoked, it tries to mimic the way classic CGI scripts 
are handled by REBOL.
The current Cheyenne version redefines 'read-io in the CGI handler. 
This wasn't a good thing, so the next release will add, instead, 
a new function 'cgi-read-io that have to be used as replacement to 
'read-io.
Terry: for defining a FastCGI app in Cheyenne, take a look here (PHP 
example) : http://softinnov.org/cheyenne/blog.cgi?view=0011
Dockimbel
15-Dec-2007
[2339]
I'll release a new Cheyenne version next week, probably on Monday. 
It will be v0.9.17, not yet rc1, still a lot of details  to add or 
polish for a v1. I'd like also to finish a working version of the 
control panel for the rc1.
Pavel
16-Dec-2007
[2340]
softinnov server went offline?
Graham
16-Dec-2007
[2341]
seems down ...
Dockimbel
17-Dec-2007
[2342x2]
Softinnov.org is down for maintenance (disk crashed), it should be 
back online tonight.
Anyway, I'm still doing some testing/bugfixing for the new release, 
it should be ready a few hours after the server will be back.
Graham
17-Dec-2007
[2344]
Good to know it wasn't Cheyenne that crashed :)
Pekr
17-Dec-2007
[2345]
Graham - Cheyenne is not good enough, if it can't repair HD itself 
:-))
Dockimbel
18-Dec-2007
[2346x2]
That's a planned feature for Cheyenne v2 ;-)
We have some trouble with our provider, it hasn't yet answer to our 
HD replace request :-/. So still down...I'll set up a temporary download 
page on our softinnov.com server.
Dockimbel
20-Dec-2007
[2348x4]
After some serious hardware troubles, and a complete system reinstalling, 
softinnov.org is up again, sorry  for inconveniences.
I'm testing and packaging the new Cheyenne beta release, it should 
be online in an hour.
Cheyenne release v0.9.17 beta. Download at http://softinnov.org/tmp/cheyenne-r0917.zip
See the changelog.txt file in the archive for more info.
Will
20-Dec-2007
[2352]
As always, great great stuff! Thank you Dock!
Dockimbel
20-Dec-2007
[2353x9]
Cheyenne beta v0.9.17 encapped binaries are also available for testing 
:

Windows: http://softinnov.org/tmp/win/cheyenne.exe
Linux: http://softinnov.org/tmp/linux/cheyenne
OSX: http://softinnov.org/tmp/osx/cheyenne


Remember that Linux and OSX versions require root privileges to listen 
on ports < 1024.
Thanks Will !
For OSX users, if you experience "invalid compressed data" errors, 
see http://www.rebol.net/cgi-bin/rambo.r?id=4306&
Test this release well before using it in production. Please report 
any bugs or issues in the online bugtracker : http://www.softinnov.org:8000/curecode/project.rsp?id=4
BTW, the binary versions are built using ENFACE, so View subsystem 
is available (but VID is not included).
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
For non-Windows users, PHP need to be patch in order to work with 
Cheyenne. I'll post here a small HOW-TO in a few minutes.
...PHP needs to be patched...
HOW-TO make Cheyenne work with PHP for non-Windows OS


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 yo 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 install
	
7) 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 -h
	

8) 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.
Graham
20-Dec-2007
[2362x2]
Great stuff .. and lots of new stuff too!
Not needed for me, but perhaps encmdface would be better than enface?
Dockimbel
21-Dec-2007
[2364x2]
The issue with encapping with a /Command binary is that Cheyenne 
through CGI and RSP expose the REBOL dialect and expose all /Command 
stuff, for free...IIRC that's forbidden by REBOL license. Did this 
changed for latest SDK ?
Cheyenne v0.9.17 re-released. Now includes the source code for the 
%service.dll library. As a remainder, all the Cheyenne source code, 
including the service.dll source is release under BSD license.
Pekr
21-Dec-2007
[2366]
hmm, I have Apache installed on port 80. So I manually changed httpd.r 
port setting in the object section but it did not work. So I tried 
via conf file and now it works. I wonder if directly setting port 
number should work too?
Dockimbel
21-Dec-2007
[2367x3]
you can change the listening port(s) using the command-line :
cheyenne -p 8080
Conf file is ok too, using the 'listen keyword. You should not change 
it directly in the source code (the HTTPd.r port-id value is override 
by the following line in %cheyenne.r : foreach p any [port-id [80]][control/start/only 
'HTTPd p]
Pekr
21-Dec-2007
[2370x3]
aha .. btw - how do I get to admin portal?
How close do you think you are to 1.0 relese candidates?
I would not prolong it for much longer :-) If ppl see alpha, they 
might be scared. If you feel it is solid enough already, I would 
go for 1.0.