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

PeterWood
13-May-2008
[2550]
I'm pretty sure that Gregg uses Rebol/Services via HTTP & CGI. I 
believe that he found it slower but more reliable than via TCP.
BrianH
13-May-2008
[2551x3]
Watch out with EXTRACT: There is a bug in the 2.7.6 version with 
binary values that was fixed, but the fix never made it into 2.7.6. 
You can get the working version from DevBase r2-mezz-series #396.
The discussions that Paul and I had resulted in some R2 optimizations 
for EXTRACT, but those optimizations never made it into the 2.7.6 
release. The semantic changes that prompted your bug fix originated 
in the R3 version of EXTRACT that we wrote back in November, and 
were a result of discussions of the severe limitations and bugs of 
the old EXTRACT.
Fortunately the binary bug only arose during the testing of the R2 
version of the new EXTRACT - the old version of EXTRACT never really 
worked with anything other than blocks anyways.
Dockimbel
13-May-2008
[2554]
Thanks for the info.
Oldes
14-May-2008
[2555]
Bug: it looks that reloading config does not updates databases.
Dockimbel
14-May-2008
[2556]
True and there's a small limitation there that I will need to solve 
in the future versions.
Oldes
14-May-2008
[2557x5]
Are you sure you want to set url, path, target and ext inside parse-request-line? 
If you do that, you cannot simply rewrite using mods.
I mean path, target and ext. Url should be set here of course so 
it can be parsed after url-translate.
Although now I see I should use mod-alias. But somehow don't know 
how - only redirect seems to work here.
ok.. found it... BUG:  if there is specified other alias type than 
'file ot 'path - Cheyenne halts on uncatched error.
And it looks the Alias is not finished as it looks just for redirects:)
Dockimbel
14-May-2008
[2562x2]
Interesting comments, I should maybe move the URL parsing later in 
the processing pipeline or, instead, provide a hook for modules to 
be able to rewrite the URL before it is parsed. Anyway, you can change 
the URL, path, target and ext (+ req/vhost) in any module's phases 
if needed, but a clean way to do it is preferable. The hard part 
for making a good rewriting engine is, IMO, to invent a good clear, 
clean and compact dialect to achieve that...regexp are not really 
my taste.
You're right about mod-alias, it's not completed yet. I found it 
might be redundant with a rewriting engine, so I left it unfinished 
until mod-rewrite comes.
Dockimbel
18-May-2008
[2564x2]
I'm letting the little indian go out : http://cheyenne-server.org
;-)
This will be the new official web site for Cheyenne. I still needs 
some time to migrate all the old stuff, including the blog.
[unknown: 5]
18-May-2008
[2566]
Very nice Doc!
Will
18-May-2008
[2567]
looks pretty 8-)
PeterWood
18-May-2008
[2568]
Excellent. The graphics look really good.
Kaj
19-May-2008
[2569]
Cool
Oldes
19-May-2008
[2570]
If I have a proxy server made in Uniserve, what is the best way to 
join it with Cheyenne?
Dockimbel
19-May-2008
[2571x2]
1) Add you service in %UniServe/services/
2) Edit %Cheyenne/cheyenne.r

3) Add in the 'set-cache block inside the %services/ section, the 
name of your service.
4) In 'do-cheyenne-app function :


- find the line "do-cache %HTTPd.r" and add after that : "do-cache 
%your-service.r"

- find the line "control/start/only 'task-master none" and add after 
that :
    "control/start/only 'your-service-name none"
That way it will work both in source mode and encapped.
Oldes
19-May-2008
[2573]
I will try it.. thanks.
Terry
19-May-2008
[2574]
How much time will you be spending on Cheyenne Doc?
Dockimbel
19-May-2008
[2575]
Hard to answer, but as it's propably the most important software 
component for my company, quite a lot I guess.
Oldes
19-May-2008
[2576x2]
And where I should add protocol? If I used to start the proxy using:

uniserve/boot/with/no-loop [services [proxy-http] protocols [http]]
I see... do-cache uniserve-path/protocols/HTTP.r
BrianH
19-May-2008
[2578]
On the web site linked above in the Chunk-encoding section: transferts 
-> transfers
Oldes
19-May-2008
[2579]
With PHP I often use code like:
<? if(something) { ?>
 normal HTML is here
<? } else { ?>
 something else here
<? } ?>

Don't you miss some way to do such a conditions?

And as I'm now writing RSP I found the RSP's <%%> tag much more difficult 
to write than PHP's <??>
Graham
19-May-2008
[2580x2]
remap your keyboard??
or, remap your keyboard%%
Dockimbel
19-May-2008
[2582x2]
Typo fixed, thanks Brian.
Same in RSP :

<% either something [ %>
    normal HTML is here
<% ][ %>
    something else here
<% ] %>
Dockimbel
20-May-2008
[2584]
Just as a reminder for those currently using Cheyenne/RSP, you can 
add the DEBUG keyword in your webapp config section in %httpd.cfg 
to display a menu with useful debugging info.
Will
21-May-2008
[2585x3]
impressed! 8) I finally gave another try at php support in cheyenne 
and after patching fastcgi.c as suggested it now works like a charm.

If you are on os x and use macports, here is a way to patch and compile:

sudo port install php5 +mysql5 +fastcgi
sudo port uninstall php5
cd /opt/local/var/macports/distfiles/php5/
sudo tar -xjf php-5.2.6.tar.bz2
>> run patch below
tar -cjf php-5.2.6.tar.bz2 php-5.2.6
sudo port install php5 +mysql5 +fastcgi checksum.skip=yes

copy of Dockimbel's patch with path fixed for this example

;---- cut'n paste the following code in REBOL's console ----

patch-php: has [buffer pos][ target: %php-5.2.6/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 ----
tar -cjf php-5.2.6.tar.bz2 php-5.2.6
should be:
sudo tar -cjf php-5.2.6.tar.bz2 php-5.2.6
just in case if you want to have macports php5 support mysql 5.1.x,
install this before php5 and php5 will recognise and use it:
sudo port install mysql5-devel +server
Terry
22-May-2008
[2588]
Is that just for Mac? I was having some problems with PC
Will
22-May-2008
[2589x3]
the php source patch is needed only for non WIN platform
btw, belcome back Terry? ;-)
I just installed drupal 6.2 in a snap on Cheyenne, I really love 
the cleaning they have done on the database structure. If only it 
was in rebol...
Dockimbel
22-May-2008
[2592]
Yep the patch is for non-Windows only.
Pekr
22-May-2008
[2593]
OT: Will, do you find Drupal better than Jumla? I downloaded both, 
just haven't tried extensively yet .... from what I saw I found Joomla 
has nice interface :-)
Will
22-May-2008
[2594]
Pekr, forget joomla, that is bloated stuff, drupal is elegant, has 
good community and good documentation. I like the cleaning they have 
done with the database structure in latest version. It looks to me 
they have so much reduced the code a good php/rebol coder could translate 
it in a week.. ;-)
Pekr
22-May-2008
[2595]
It is just that I found Joomla much more user pleasant :-)
Terry
22-May-2008
[2596x2]
Doc.. have you worked with Erlang?
Will, I only come here to keep an eye on Doc's developments. And 
get sucked into the evolution group simply because I can't resist 
:)
But I've actually found post Rebol life to be very productive.
Dockimbel
22-May-2008
[2598]
Erlang, no, I just looked at the language specs and a few examples, 
why ?
Terry
22-May-2008
[2599]
It has some features that make it ideal for serving web pages, DB 
access etc... all the stuff that's right up your alley.