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

Dockimbel
2-Aug-2009
[5317]
Oh, good to know.
Graham
2-Aug-2009
[5318]
so is there a how to on running cheyenne as a service?
Dockimbel
2-Aug-2009
[5319x2]
No, it's supposed to be simple, just use the menu option...but it 
currently has several limitations:
- it requires admin privileges

- it cannot survive log off if encapped with enface or encmdview 
(the View engine is not compatible with service mode).
Graham
2-Aug-2009
[5321]
does it need to be encapped with view ?
Dockimbel
2-Aug-2009
[5322]
The first one should be fixable (I guess), the second one too...when 
View will become open source.
Graham
2-Aug-2009
[5323]
... that's R3 !
Dockimbel
2-Aug-2009
[5324]
If encapped with view, Cheyenne process will be killed when logging 
off.
Graham
2-Aug-2009
[5325]
Or is Carl open up View now?
Dockimbel
2-Aug-2009
[5326]
No, he doesn't. We'll have to wait til R3 get stable to port Cheyenne 
and fix thoses issues.
Graham
2-Aug-2009
[5327]
I guess I can use Firedaemon to run Cheyenne as a service
Dockimbel
2-Aug-2009
[5328]
Yes you can try with 3rd party tools (there's also srvany.exe). Let 
me know if it works with View.
Graham
2-Aug-2009
[5329]
well I know my view apps work with firedaemon
Janko
4-Aug-2009
[5330]
Does the latest cheyenne allow debug mode or some other option where 
you can see the errors in the browser but  the RSP DEBUG  toolbar 
isn't rendered ?
Dockimbel
4-Aug-2009
[5331]
No, but it's in my todo-list for the next release (0.9.20).
Janko
4-Aug-2009
[5332]
cool, I will be very happy when this is possible :)
Graham
5-Aug-2009
[5333x2]
Is there a way to associate a particular listen port with a webapp?
like 

webapp [
	listen [ 8000 ]
]
Dockimbel
5-Aug-2009
[5335x2]
Nope, but you can bind a domain to a specific listen port. For ex:
globals [
	listen [80 8000]
	...
]
my.domain.com:8000 [
	webapp [
		... 	; this webapp should only be accessed through port 8000
	]
]
But you should test the webapp domain:port isolation, I remember 
having bugs there and it seems to me that there were fixed, but I'm 
not completly sure.
Graham
5-Aug-2009
[5337]
I'm seeing some odd root kit like behaviours ... cheyenne is clearly 
serving up pages,, but the icon is gone from the system tray and 
it does not appear in the processes list in the windows task manager!
Dockimbel
5-Aug-2009
[5338x2]
This looks like it's working in service mode. In Task Manager, be 
sure to list processes from all users (including services).
If it's not the right explanation, then that means that your Cheyenne 
instance evolved, became self-aware and decided to hide in order 
to survive, so we shouldn't have to worry much about anything now. 
;-)
Graham
5-Aug-2009
[5340x7]
It's a concern...
Nope, it's not in services
I'll check it again if it happens again .. but it could just be a 
single evolutionary event
Of course reload config and run as a service are pretty close to 
each other ...
ah... silly.  I was running Cheyenne as a service using Firedaemon 
and had forgotten already :(
I've got some virtual sites set up as this

jerrys.com [
	root-dir %/z/pwp/www/	
	default [%login.rsp %index.html %index.rsp %index.php]
	webapp [
		; jerry's
		virtual-root "/md"
		root-dir %/z/pwp/www/md/
		auth "/md/login.rsp"
 		databases [ emr odbc://jerry ]
		;debug
	]
]	
grahams.com [
	; 3 changes, and the app-init.r
	root-dir %/x/pwp/www/	
	default [%login.rsp %index.html %index.rsp %index.php]
	webapp [
		; grahams
		virtual-root "/md"
		root-dir %/x/pwp/www/md/
		auth "/md/login.rsp"
 		databases [ emr odbc://graham ]
		;debug
	]
]
However, once someone enters one webapp, and authenticates using 
the database emr, then in the other webapp, emr now refers to the 
emr that was first opened :(
Graham
6-Aug-2009
[5347x5]
I did a search and replace to change the database handle in all my 
source rsp and r files, and altered the definition in the webapp. 
 that also does not work
But what does work is placing the database in globals.
so I have this

globals [
	databases [ db1 obdc://graham db2 dobc://jerry etc ]
]
odbc ...
in each of the above webapps, I have an app-init.r where I have defined 
myhost: blahblah ... so this is a global to be used by this webapp.

Unfortunately it looks like as soon as one web app is started by 
a visitor, then all webapps take the same value.  The value is not 
kept in the webapp's context
Dockimbel
6-Aug-2009
[5352]
I have some time allocated today to work on Cheyenne so I will give 
it a look.
Graham
6-Aug-2009
[5353]
Thanks
Dockimbel
7-Aug-2009
[5354x2]
Graham, I can't reproduce your issue. I've tried with the following 
config options : 
site1 [
	webapp [
		virtual-root "/curecode/"
		root-dir %//dev/curecode/
		locales-dir %private/locales/
		databases [
			bugs	mysql://[root-:-localhost]/bugs
		]
	]
]
site2 [
	webapp [
		virtual-root "/curecode/"
		root-dir %//dev/curecode/
		locales-dir %private/locales/
		
		databases [
			bugs	mysql://[root-:-localhost]/bugs2
		]
	]
]
Site1 shows me tickets from "bugs" db, Site2 shows me tickets from 
"bugs2" db. (Both site1 and site2 are mapped to localhost). Test 
was done using a IE session on site1 and a Chrome session on site2.
Graham
7-Aug-2009
[5356x4]
Were they done concurrently?
Both your virtual sites refer to the same physical location on the 
drive .. which is different to my setup.  I presume it's not important.
I'll see if I can replicate the issue on my localhost as well.
However, I was only able to get my production server working by using 
different database handles.
amacleod
7-Aug-2009
[5360x2]
What i sthe best way to have cheyenne send me an email alert when 
a user does something on my site (for example:  Leaves a comment 
on the comment page)


I tried to "launch" a small script but a new instance of cheyenne 
seems to start and continue running...I would think not desirable...
I was lauching from within an .rsp page..
Graham
7-Aug-2009
[5362]
It's just rebol ... so just use send
amacleod
7-Aug-2009
[5363x3]
The page is a loop so after the comment is submitted the page refreshes 
with the new comment displayed...I was afraid if the "send" got hung 
up it would be annoying for the user to wait....
Even when things go normally send there is a bit of a delay....

its all about the experience!
I added "quit" to the end of the script but NO change to the behavior.
Graham
7-Aug-2009
[5366]
I should hope not.  'Quit would cause the cheyenne instance to shut 
down unless it had been redefined which I presume it has.