World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Gabriele 2-Jun-2007 [778x3] | the shebang stays as usual (command -cs) |
command will detect tha apache called it as fastcgi and will stay running | |
apache may run n of them though, so be careful with concurrency issues on files you access from services. | |
Robert 2-Jun-2007 [781x2] | ok, thanks. |
Alsways do a fast COMMIT ;-) and no nested transactions. | |
Terry 2-Jun-2007 [783x6] | Ok.. PHP is running on XP.. uncomment this line in httpd.cfg bind fastcgi to [.php .php3 .php4] |
So Nenad, are you considering a more native PHP implemenation to increase performance? | |
It will be interesting to see what kind of mashups we can do between Rebol and PHP. I've found PHP's XML handling particularily nice. | |
Nenad, would there be some way to post-process the php? | |
Possible to make the PHP handler a module as well? | |
PHP's mem footprint is relatively small .. around 5mb... whereas Cheyenne appears to be running 3 instances of Rebol totalling 25mb. | |
Gabriele 2-Jun-2007 [789] | that's funny, because www.rebol.net has been running for years with many rebol cgi stuff, this altme world, ios servers etc. without ever touching the swap. as soon as we installed mediawiki, with just me and carl using it, it started swapping. :) |
Terry 2-Jun-2007 [790] | Any sort of heavy load causes php-cgi.exe to crash... |
Dockimbel 2-Jun-2007 [791] | Pre or post-processing PHP: currently it would require a dedicaded mod to achieve that. |
Terry 2-Jun-2007 [792x2] | Seems like a 'best of both worlds' |
Another thing to note when downloading the PHP binaries is renaming the php.ini-dist file to php.ini | |
Graham 2-Jun-2007 [794x4] | Looks my old rsp application needs a few changes to run under this version of cheyenne |
do-sql ? | |
Is a connection opened somewhere to a sql database? | |
Or, do I edit cheyenne.r to do that? | |
Dockimbel 2-Jun-2007 [798x3] | Right, using 'do-SQL makes Cheyenne manage the connection for you. You need to define your DB connections specs in the httpd.cfg file, like this for example : |
databases [ bugs mysql://[root-:-localhost]/bugs forum mysql://root:[admin-:-localhost]/forum test mysql://[root-:-localhost]/test ] | |
then, if you're not using RT's DB drivers, you need to load your driver somewhere : %misc/rsp-init.r or %www/your-app/app-init.r (if you've defined a webapp) are good places to do so. | |
Graham 2-Jun-2007 [801x2] | this is a lot more complicated than the 2005 version :) |
so, to send a query to "bugs" ? | |
Dockimbel 2-Jun-2007 [803x2] | DO-SQL syntax : do-sql [db [word!] data [string! block! word!] /flat] |
The RSP engine will do all the opening/closing work for you | |
Graham 2-Jun-2007 [805x2] | why do you want to close the db connection? |
Can't you leave it open all the time? | |
Dockimbel 2-Jun-2007 [807] | re 2005 version: you're don't need to use do-sql if you don't want to. You can do it as usual by opening connection, sending query...closing connection. do-sql is just a higher level wrapper to save you some time. |
Graham 2-Jun-2007 [808x2] | do-sql [ bugs {select * from database} ] ? |
before I just opened the odbc connection when cheyenne started and just kept reusing the connection | |
Dockimbel 2-Jun-2007 [810] | the DB connection is done from one of the bg helper process, so if the process quits, it should close the DB connection properly. |
Graham 2-Jun-2007 [811] | I c |
Dockimbel 2-Jun-2007 [812x3] | nope, I've just copy/paste the do-sql func spec block, sorry for being confusing. |
do-sql 'bugs "select * from database" | |
do-sql leaves the DB connection opened until the process quits. | |
Graham 2-Jun-2007 [815x3] | ahh.... |
and there's a query object that holds the result of the do-sql ? | |
I'm looking at the rsp-api.html and don't see anything there | |
Dockimbel 2-Jun-2007 [818x4] | The "Global Functions" and DB-object cache are not yet documented. |
'do-sql returns the resulting recordset | |
DB-object cache => DB-cache | |
the current rsp-api doc is just an API reference documentation, I'll provide a more general explanation about RSP concepts and features separately in a few days. | |
Graham 2-Jun-2007 [822x2] | Ok. Thanks |
Does Cheyenne honor the shebang on rebol cgi scripts ? | |
Dockimbel 2-Jun-2007 [824] | It just skip it. |
Graham 2-Jun-2007 [825x2] | Or, does it just spawn a separate rebol process for it? |
Ok, I presumed it wasn't necessary | |
Dockimbel 2-Jun-2007 [827] | Cheyenne uses one of the bg process to execute the CGI. |
older newer | first last |